当前位置: 首页>>代码示例>>PHP>>正文


PHP get_the_guid函数代码示例

本文整理汇总了PHP中get_the_guid函数的典型用法代码示例。如果您正苦于以下问题:PHP get_the_guid函数的具体用法?PHP get_the_guid怎么用?PHP get_the_guid使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了get_the_guid函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: heydays__add_share_button

function heydays__add_share_button()
{
    ?>
		<iframe 
				src="http://www.facebook.com/plugins/like.php
					?href=<?php 
    echo get_permalink();
    ?>
					&amp;layout=standard
					&amp;show-faces=true
					&amp;width=450
					&amp;action=recommend
					&amp;font=arial
					&amp;share=true
					&amp;url=<?php 
    echo get_the_guid();
    ?>
					&amp;colorscheme=light" 
				scrolling="no" 
				frameborder="0" 
				allowTransparency="true" 
				id="facebook-like">
		</iframe>
		<?php 
}
开发者ID:jacekdabrowski,项目名称:wp_fb_sharecontent_plugin,代码行数:25,代码来源:add_share_button.php

示例2: meta_box_callback

    public static function meta_box_callback()
    {
        ?>
		<div>
			<span id="guid_preview"><?php 
        echo get_the_guid();
        ?>
</span>
			<a href="#" id="regenerate_guid"><?php 
        echo __('regenerate', 'podlove');
        ?>
</a>
		</div>
		<span class="description">
			<?php 
        echo __('Identifier for this episode. Change it to force podcatchers to redownload media files for this episode.', 'podlove');
        ?>
		</span>

		<input type="hidden" name="_podlove_meta[guid]" id="_podlove_meta_guid" value="<?php 
        echo get_the_guid();
        ?>
">

		<script type="text/javascript">
		jQuery(function($){
			$("#regenerate_guid").on('click', function(e) {
				e.preventDefault();

				var data = {
					action: 'podlove-get-new-guid',
					post_id: jQuery("#post_ID").val()
				};

				$.ajax({
					url: ajaxurl,
					data: data,
					dataType: 'json',
					success: function(result) {
						if (result && result.guid) {
							$("#_podlove_meta_guid").val(result.guid);
							$("#guid_preview").html(result.guid);
							if ( ! $(".guid_warning").length ) {
								$(".row__podlove_meta_guid .description")
									.append("<br><strong class=\"guid_warning\">GUID regenerated. You still need to save the post.<br>Only regenerate if you messed up and need all clients to redownload all files!</strong>");
							}
						} else {
							alert("Sorry, couldn't generate new GUID.");
						}
					}
				});

				return false;
			});
		});
		</script>
		<?php 
    }
开发者ID:johannes-mueller,项目名称:podlove-publisher,代码行数:58,代码来源:custom_guid.php

示例3: albr_beforePost

function albr_beforePost($data, $postarr)
{
    if (!get_option('albr_setImgStetting')) {
        return $data;
    }
    if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {
        return $data;
    }
    $content = $data['post_content'];
    if (!substr_count($content, '<img')) {
        return $data;
    }
    $urlsForRepl = findScr($content);
    if (count($urlsForRepl)) {
        foreach ($urlsForRepl as $item) {
            $repl = get_the_guid(loadImg($item));
            $content = str_replace($item, $repl, $content);
        }
    }
    $data['post_content'] = $content;
    return $data;
}
开发者ID:alex-bro,项目名称:test_dnepr,代码行数:22,代码来源:albr_set_img.php

示例4: xtreme_get_gallery_attachment_url

function xtreme_get_gallery_attachment_url($post_id = 0, $target_size)
{
    $post_id = (int) $post_id;
    if (!($post =& get_post($post_id))) {
        return false;
    }
    if ('attachment' != $post->post_type) {
        return false;
    }
    $imagedata = wp_get_attachment_metadata($post->ID);
    $file = is_array($imagedata) && isset($imagedata['sizes'][$target_size]) ? dirname(get_post_meta($post->ID, '_wp_attached_file', true)) . '/' . $imagedata['sizes'][$target_size]['file'] : get_post_meta($post->ID, '_wp_attached_file', true);
    $url = '';
    if ($file) {
        //Get attached file
        if (($uploads = wp_upload_dir()) && false === $uploads['error']) {
            //Get upload directory
            if (0 === strpos($file, $uploads['basedir'])) {
                //Check that the upload base exists in the file location
                $url = str_replace($uploads['basedir'], $uploads['baseurl'], $file);
            } elseif (false !== strpos($file, 'wp-content/uploads')) {
                $url = $uploads['baseurl'] . substr($file, strpos($file, 'wp-content/uploads') + 18);
            } else {
                $url = $uploads['baseurl'] . "/{$file}";
            }
            //Its a newly uploaded file, therefor $file is relative to the basedir.
        }
    }
    if (empty($url)) {
        //If any of the above options failed, Fallback on the GUID as used pre-2.7, not recommended to rely upon this.
        $url = get_the_guid($post->ID);
    }
    if (empty($url)) {
        return false;
    }
    return $url;
}
开发者ID:katikos,项目名称:xtreme-one,代码行数:36,代码来源:xtreme-image-functions.php

示例5: job_run


//.........这里部分代码省略.........
         if ('all' == $job_object->job['wpexportcontent']) {
             $menu_xml .= $this->wxr_nav_menu_terms();
         }
         $menu_xml .= "\t<generator>http://wordpress.org/?v=" . get_bloginfo_rss('version') . "</generator>\n";
         $written = file_put_contents($job_object->steps_data[$job_object->step_working]['wpexportfile'], $menu_xml, FILE_APPEND);
         if ($written === FALSE) {
             $job_object->log(__('WP Export file could not written.', 'backwpup'), E_USER_ERROR);
             return FALSE;
         }
         unset($menu_xml);
         $job_object->steps_data[$job_object->step_working]['substep'] = 'posts';
         $job_object->substeps_done++;
         $job_object->update_working_data();
         $job_object->do_restart_time();
     }
     if ($job_object->steps_data[$job_object->step_working]['substep'] == 'posts') {
         if (!empty($job_object->steps_data[$job_object->step_working]['post_ids'])) {
             $wp_query->in_the_loop = true;
             // Fake being in the loop.
             // fetch 20 posts at a time rather than loading the entire table into memory
             while ($next_posts = array_splice($job_object->steps_data[$job_object->step_working]['post_ids'], 0, 20)) {
                 $where = 'WHERE ID IN (' . join(',', $next_posts) . ')';
                 $posts = $wpdb->get_results("SELECT * FROM {$wpdb->posts} {$where}");
                 $wxr_post = '';
                 // Begin Loop
                 foreach ($posts as $post) {
                     /* @var WP_Post $post */
                     $is_sticky = is_sticky($post->ID) ? 1 : 0;
                     $wxr_post .= "\t<item>\n";
                     $wxr_post .= "\t\t<title>" . apply_filters('the_title_rss', $post->post_title) . "</title>\n";
                     $wxr_post .= "\t\t<link>" . esc_url(apply_filters('the_permalink_rss', get_permalink($post))) . "</link>\n";
                     $wxr_post .= "\t\t<pubDate>" . mysql2date('D, d M Y H:i:s +0000', get_post_time('Y-m-d H:i:s', true, $post), false) . "</pubDate>\n";
                     $wxr_post .= "\t\t<dc:creator>" . $this->wxr_cdata(get_the_author_meta('login', $post->post_author)) . "</dc:creator>\n";
                     $wxr_post .= "\t\t<guid isPermaLink=\"false\">" . esc_url(get_the_guid($post->ID)) . "</guid>\n";
                     $wxr_post .= "\t\t<description></description>\n";
                     $wxr_post .= "\t\t<content:encoded>" . $this->wxr_cdata(apply_filters('the_content_export', $post->post_content)) . "</content:encoded>\n";
                     $wxr_post .= "\t\t<excerpt:encoded>" . $this->wxr_cdata(apply_filters('the_excerpt_export', $post->post_excerpt)) . "</excerpt:encoded>\n";
                     $wxr_post .= "\t\t<wp:post_id>" . $post->ID . "</wp:post_id>\n";
                     $wxr_post .= "\t\t<wp:post_date>" . $post->post_date . "</wp:post_date>\n";
                     $wxr_post .= "\t\t<wp:post_date_gmt>" . $post->post_date_gmt . "</wp:post_date_gmt>\n";
                     $wxr_post .= "\t\t<wp:comment_status>" . $post->comment_status . "</wp:comment_status>\n";
                     $wxr_post .= "\t\t<wp:ping_status>" . $post->ping_status . "</wp:ping_status>\n";
                     $wxr_post .= "\t\t<wp:post_name>" . $post->post_name . "</wp:post_name>\n";
                     $wxr_post .= "\t\t<wp:status>" . $post->post_status . "</wp:status>\n";
                     $wxr_post .= "\t\t<wp:post_parent>" . $post->post_parent . "</wp:post_parent>\n";
                     $wxr_post .= "\t\t<wp:menu_order>" . $post->menu_order . "</wp:menu_order>\n";
                     $wxr_post .= "\t\t<wp:post_type>" . $post->post_type . "</wp:post_type>\n";
                     $wxr_post .= "\t\t<wp:post_password>" . $post->post_password . "</wp:post_password>\n";
                     $wxr_post .= "\t\t<wp:is_sticky>" . $is_sticky . "</wp:is_sticky>\n";
                     if ($post->post_type == 'attachment') {
                         $wxr_post .= "\t\t<wp:attachment_url>" . wp_get_attachment_url($post->ID) . "</wp:attachment_url>\n";
                     }
                     $wxr_post .= $this->wxr_post_taxonomy();
                     $postmeta = $wpdb->get_results($wpdb->prepare("SELECT * FROM {$wpdb->postmeta} WHERE post_id = %d", $post->ID));
                     foreach ($postmeta as $meta) {
                         if (apply_filters('wxr_export_skip_postmeta', false, $meta->meta_key, $meta)) {
                             continue;
                         }
                         $wxr_post .= "\t\t<wp:postmeta>\n\t\t\t<wp:meta_key>" . $meta->meta_key . "</wp:meta_key>\n\t\t\t<wp:meta_value>" . $this->wxr_cdata($meta->meta_value) . "</wp:meta_value>\n\t\t</wp:postmeta>\n";
                     }
                     $comments = $wpdb->get_results($wpdb->prepare("SELECT * FROM {$wpdb->comments} WHERE comment_post_ID = %d AND comment_approved <> 'spam'", $post->ID));
                     foreach ($comments as $c) {
                         $wxr_post .= "\t\t<wp:comment>\n";
                         $wxr_post .= "\t\t\t<wp:comment_id>" . $c->comment_ID . "</wp:comment_id>\n";
                         $wxr_post .= "\t\t\t<wp:comment_author>" . $this->wxr_cdata($c->comment_author) . "</wp:comment_author>\n";
                         $wxr_post .= "\t\t\t<wp:comment_author_email>" . $c->comment_author_email . "</wp:comment_author_email>\n";
开发者ID:demochko-ol,项目名称:hezy,代码行数:67,代码来源:class-jobtype-wpexp.php

示例6: sell_media_show_file_info

/**
 * Show additional file info
 *
 * @since 1.9.2
 * @param int $post_id Item ID
 * @return void
 */
function sell_media_show_file_info()
{
    $post = get_post();
    $attachment_id = sell_media_get_attachment_id($post->ID);
    $media_dims = '';
    $meta = wp_get_attachment_metadata($attachment_id);
    $filename = basename(get_attached_file($attachment_id));
    $postguid = get_the_guid($attachment_id);
    echo '<h2 class="widget-title sell-media-item-details-title">' . __('Details', 'sell_media') . '</h2>';
    echo '<ul class="sell-media-item-details">';
    echo '<li class="filename"><span class="title">' . __('File Name', 'sell_media') . ':</span> ' . $filename . '</li>';
    echo '<li class="fileid"><span class="title">' . __('File ID', 'sell_media') . ':</span> ' . $attachment_id . '</li>';
    preg_match('/^.*?\\.(\\w+)$/', $filename, $ext);
    echo '<li class="filetype"><span class="title">' . __('File Type', 'sell_media') . ':</span> ' . esc_html(strtoupper($ext[1])) . ' (' . get_post_mime_type($attachment_id) . ')</li>';
    echo '<li class="filesize"><span class="title">' . __('File Size', 'sell_media') . ':</span> ' . sell_media_get_filesize($post->ID, $attachment_id) . '</li>';
    if (isset($meta['width'], $meta['height'])) {
        echo '<li class="filedims"><span class="title">' . __('Dimensions', 'sell_media') . ':</span> ' . $meta['width'] . ' x ' . $meta['height'] . '</li>';
    }
    if (wp_get_post_terms($post->ID, 'collection')) {
        echo '<li class="collections"><span class="title">' . __('Collections', 'sell_media') . ':</span> ' . sell_media_get_taxonomy_terms('collection') . '</li>';
    }
    if (wp_get_post_terms($post->ID, 'keywords') && !get_query_var('id')) {
        echo '<li class="keywords"><span class="title">' . __('Keywords', 'sell_media') . ':</span> ' . sell_media_get_taxonomy_terms('keywords') . '</li>';
    }
    if (preg_match('#^(audio|video)/#', get_post_mime_type($attachment_id))) {
        echo '<li class="length"><span class="title">' . __('Length', 'sell_media') . ':</span> ' . $meta['length_formatted'] . '</li>';
        echo '<li class="bitrate"><span class="title">' . __('Bitrate', 'sell_media') . ':</span> ' . round($meta['bitrate'] / 1000) . 'kb/s</li>';
    }
    echo do_action('sell_media_additional_list_items', $post->ID);
    echo '</ul>';
}
开发者ID:rickalday,项目名称:Sell-Media,代码行数:38,代码来源:template-tags.php

示例7: _transition_post_status

/**
 * _transition_post_status() - Hook {@internal Missing Short Description}}
 *
 * {@internal Missing Long Description}}
 *
 * @package WordPress
 * @subpackage Post
 * @since 2.3
 *
 * @uses $wpdb
 *
 * @param string $new_status {@internal Missing Description}}
 * @param string $old_status {@internal Missing Description}}
 * @param object $post Object type containing the post information
 */
function _transition_post_status($new_status, $old_status, $post)
{
    global $wpdb;
    if ($old_status != 'publish' && $new_status == 'publish') {
        // Reset GUID if transitioning to publish and it is empty
        if ('' == get_the_guid($post->ID)) {
            $wpdb->update($wpdb->posts, array('guid' => get_permalink($post->ID)), array('ID' => $post->ID));
        }
        do_action('private_to_published', $post->ID);
        // Deprecated, use private_to_publish
    }
    // Always clears the hook in case the post status bounced from future to draft.
    wp_clear_scheduled_hook('publish_future_post', $post->ID);
}
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:29,代码来源:post.php

示例8: _transition_post_status

/**
 * Hook for managing future post transitions to published.
 *
 * @since 2.3.0
 * @access private
 *
 * @see wp_clear_scheduled_hook()
 * @global wpdb $wpdb WordPress database abstraction object.
 *
 * @param string  $new_status New post status.
 * @param string  $old_status Previous post status.
 * @param WP_Post $post       Post object.
 */
function _transition_post_status($new_status, $old_status, $post)
{
    global $wpdb;
    if ($old_status != 'publish' && $new_status == 'publish') {
        // Reset GUID if transitioning to publish and it is empty.
        if ('' == get_the_guid($post->ID)) {
            $wpdb->update($wpdb->posts, array('guid' => get_permalink($post->ID)), array('ID' => $post->ID));
        }
        /**
         * Fires when a post's status is transitioned from private to published.
         *
         * @since 1.5.0
         * @deprecated 2.3.0 Use 'private_to_publish' instead.
         *
         * @param int $post_id Post ID.
         */
        do_action('private_to_published', $post->ID);
    }
    // If published posts changed clear the lastpostmodified cache.
    if ('publish' == $new_status || 'publish' == $old_status) {
        foreach (array('server', 'gmt', 'blog') as $timezone) {
            wp_cache_delete("lastpostmodified:{$timezone}", 'timeinfo');
            wp_cache_delete("lastpostdate:{$timezone}", 'timeinfo');
            wp_cache_delete("lastpostdate:{$timezone}:{$post->post_type}", 'timeinfo');
        }
    }
    if ($new_status !== $old_status) {
        wp_cache_delete(_count_posts_cache_key($post->post_type), 'counts');
        wp_cache_delete(_count_posts_cache_key($post->post_type, 'readable'), 'counts');
    }
    // Always clears the hook in case the post status bounced from future to draft.
    wp_clear_scheduled_hook('publish_future_post', array($post->ID));
}
开发者ID:SayenkoDesign,项目名称:ividf,代码行数:46,代码来源:post.php

示例9: get_the_guid

$image_10 = get_the_guid(82);
$link_10 = get_permalink(25);
$image_11 = get_the_guid(83);
$link_11 = get_permalink(32);
$image_12 = get_the_guid(84);
$link_12 = "http://mathildedufort.tumblr.com/";
$image_13 = get_the_guid(85);
$link_13 = get_permalink(175);
// row 4
$image_14 = get_the_guid(86);
$link_14 = get_permalink(39);
$image_15 = get_the_guid(87);
$link_15 = get_permalink(48);
$image_16 = get_the_guid(88);
$link_16 = get_permalink(46);
$image_17 = get_the_guid(89);
$link_17 = get_permalink(27);
?>


<?php 
get_header();
?>

<div id="header">
	<h1>MATHILDE DUFORT</h1>
	<h2>Graphiste freelance</h2>
	<p id="header_link_p"><a href="mailto:mathildedufort@hotmail.com">mathildedufort@hotmail.com</a> - 06 62 89 94 26</p>
</div>

<div id="main_container">
开发者ID:simon6023,项目名称:mathildedufort,代码行数:31,代码来源:front-page.php

示例10: the_guid

function the_guid($id = 0)
{
    echo get_the_guid($id);
}
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:4,代码来源:post-template.php

示例11: post

 public function post($post)
 {
     $oxymel = new WP_Export_Oxymel();
     $GLOBALS['wp_query']->in_the_loop = true;
     $GLOBALS['post'] = $post;
     setup_postdata($post);
     $oxymel->item->contains->title(apply_filters('the_title_rss', $post->post_title))->link(esc_url(apply_filters('the_permalink_rss', get_permalink())))->pubDate(mysql2date('D, d M Y H:i:s +0000', get_post_time('Y-m-d H:i:s', true), false))->tag('dc:creator', get_the_author_meta('login'))->guid(esc_url(get_the_guid()), array('isPermaLink' => 'false'))->description('')->tag('content:encoded')->contains->cdata($post->post_content)->end->tag('excerpt:encoded')->contains->cdata($post->post_excerpt)->end->tag('wp:post_id', $post->ID)->tag('wp:post_date', $post->post_date)->tag('wp:post_date_gmt', $post->post_date_gmt)->tag('wp:comment_status', $post->comment_status)->tag('wp:ping_status', $post->ping_status)->tag('wp:post_name', $post->post_name)->tag('wp:status', $post->post_status)->tag('wp:post_parent', $post->post_parent)->tag('wp:menu_order', $post->menu_order)->tag('wp:post_type', $post->post_type)->tag('wp:post_password', $post->post_password)->tag('wp:is_sticky', $post->is_sticky)->optional('wp:attachment_url', wp_get_attachment_url($post->ID));
     foreach ($post->terms as $term) {
         $oxymel->category(array('domain' => $term->taxonomy, 'nicename' => $term->slug))->contains->cdata($term->name)->end;
     }
     foreach ($post->meta as $meta) {
         $oxymel->tag('wp:postmeta')->contains->tag('wp:meta_key', $meta->meta_key)->tag('wp:meta_value')->contains->cdata($meta->meta_value)->end->end;
     }
     foreach ($post->comments as $comment) {
         $oxymel->tag('wp:comment')->contains->tag('wp:comment_id', $comment->comment_ID)->tag('wp:comment_author')->contains->cdata($comment->comment_author)->end->tag('wp:comment_author_email', $comment->comment_author_email)->tag('wp:comment_author_url', esc_url($comment->comment_author_url))->tag('wp:comment_author_IP', $comment->comment_author_IP)->tag('wp:comment_date', $comment->comment_date)->tag('wp:comment_date_gmt', $comment->comment_date_gmt)->tag('wp:comment_content')->contains->cdata($comment->comment_content)->end->tag('wp:comment_approved', $comment->comment_approved)->tag('wp:comment_type', $comment->comment_type)->tag('wp:comment_parent', $comment->comment_parent)->tag('wp:comment_user_id', $comment->user_id)->oxymel($this->comment_meta($comment))->end;
     }
     $oxymel->end;
     return $oxymel->to_string();
 }
开发者ID:Jaace,项目名称:wp-cli,代码行数:19,代码来源:class-wp-export-wxr-formatter.php

示例12: get_comment_guid

/**
 * Retrieve the feed GUID for the current comment.
 *
 * @package WordPress
 * @subpackage Feed
 * @since unknown
 *
 * @return bool|string false on failure or guid for comment on success.
 */
function get_comment_guid()
{
    global $comment;
    if (!is_object($comment)) {
        return false;
    }
    return get_the_guid($comment->comment_post_ID) . '#comment-' . $comment->comment_ID;
}
开发者ID:pravinhirmukhe,项目名称:flow1,代码行数:17,代码来源:feed.php

示例13: get_comment_guid

/**
 * Retrieve the feed GUID for the current comment.
 *
 * @since 2.5.0
 *
 * @param int|object $comment_id Optional comment object or id. Defaults to global comment object.
 * @return false|string false on failure or guid for comment on success.
 */
function get_comment_guid($comment_id = null)
{
    $comment = get_comment($comment_id);
    if (!is_object($comment)) {
        return false;
    }
    return get_the_guid($comment->comment_post_ID) . '#comment-' . $comment->comment_ID;
}
开发者ID:RA2WP,项目名称:RA2WP,代码行数:16,代码来源:feed.php

示例14: dynamic_inline_style

function dynamic_inline_style()
{
    $custom_css = '';
    $main_color = get_theme_mod('main_color');
    if ($main_color == '' || $main_color == NULL) {
        $main_color = '#D12F2F';
    }
    $bg_color = get_theme_mod('background-color');
    if ($bg_color == '' || $bg_color == NULL) {
        $bg_color = '#E5E5E5';
    }
    $bg_img = get_theme_mod('background-image');
    $em_font = get_theme_mod('emphasis-font');
    if ($em_font == '' || $em_font == NULL) {
        $em_font = 'font-62';
    }
    $body_font = get_theme_mod('body-font');
    if ($body_font == '' || $body_font == NULL) {
        $body_font = 'font-0';
    }
    $em_font_index = (int) substr($em_font, strpos($em_font, '-') + 1);
    $body_font_index = (int) substr($body_font, strpos($body_font, '-') + 1);
    // dynamic inline css
    if ($main_color) {
        $custom_css .= 'a,
#top-page-list ul li a,
.news-box.break li h3.title a:hover,
#flexible-home-layout-section .news-box .meta a:hover,
.post-wrapper .meta > div:hover,
.related-post .meta a:hover,
.related-news .meta a:hover,
#flexible-home-layout-section .news-box.slider h3.title a:hover,
.post-header .meta a:hover,
#copyright a:hover,
#selectnav2 {
	color: ' . $main_color . ';
}
::-webkit-scrollbar-thumb {
	background-color: ' . $main_color . ';
}

.header-line-2,
#drop-down-menu > div > ul > li:hover > a,
#drop-down-menu ul.sub-menu li a:hover,
#flexible-home-layout-section .news-box h2.title a,
#flexible-home-layout-section .news-box.hot .item-first,
#flexible-home-layout-section .news-box.slider .dots li.active,
.tagcloud a,
#respond form #submit,

#contact-form .show-all a {
	background-color: ' . $main_color . ';
}
.post-body blockquote {
	border-top-color: ' . $main_color . ';
}';
    }
    if ($bg_color || $bg_img) {
        $custom_css .= 'body {
' . ($bg_img ? 'background-image: url(' . $bg_img . ');' : '') . ($bg_color ? 'background-color: ' . $bg_color . ';' : '') . '
}';
    }
    $em_font_text = 'Oswald';
    $body_font_text = 'Arial';
    // google font
    if ($em_font && $body_font) {
        global $Google_Font_List;
        // loading google fonts
        if (strpos($em_font, 'cufont') === false) {
            $em_font_text = $Google_Font_List[$em_font_index];
            if ($em_font_index > 6) {
                echo '<link href="http://fonts.googleapis.com/css?family=' . str_replace(' ', '+', $em_font_text) . '" rel="stylesheet" type="text/css">';
                /*
                $custom_css .='
                @import url(http://fonts.googleapis.com/css?family='.str_replace(' ', '+', $em_font_text).');';
                */
            }
        } else {
            $fid = get_the_ID($em_font_index);
            $fname = get_the_title($em_font_index);
            $fguid = get_the_guid($em_font_index);
            $custom_css .= '@font-face {
  font-family: \'' . $fname . '\';
  src: url(' . $fguid . ') format(\'woff\');
}';
            $em_font_text = $fname;
        }
        if (strpos($body_font, 'cufont') === false) {
            $body_font_text = $Google_Font_List[$body_font_index];
            if ($body_font_index > 6) {
                echo '<link href="http://fonts.googleapis.com/css?family=' . str_replace(' ', '+', $body_font_text) . '" rel="stylesheet" type="text/css">';
                /*
                $custom_css .='
                @import url(http://fonts.googleapis.com/css?family='.str_replace(' ', '+', $body_font_text).');';
                */
            }
        } else {
            $fid = get_the_ID($body_font_index);
            $fname = get_the_title($body_font_index);
            $fguid = get_the_guid($body_font_index);
//.........这里部分代码省略.........
开发者ID:bencet,项目名称:presszo,代码行数:101,代码来源:display_customize.php

示例15: get_header

 * * Created by PhpStorm.
 * User: georgrokita
 * Date: 16.07.15
 * Time: 18:16
*/
get_header();
echo '<div id="primary" class="content-area">';
echo '<main id="main" class="site-main" role="main">';
$args = array('post_type' => 'event', 'posts_per_page' => 10);
$loop = new WP_Query($args);
while ($loop->have_posts()) {
    $loop->the_post();
    $ID = get_the_ID();
    $the_title = get_the_title();
    $the_content = get_the_content();
    $urlLink = get_the_guid();
    echo '<article id="post-' . $ID . '" class="post-' . $ID . ' post type-post status-publish format-standard hentry category-allgemein">';
    echo '<header class="entry-header">
           <h1 class="entry-title"><a href="' . $urlLink . '" rel="bookmark">' . $the_title . '</a></h1>
            <div class="entry-meta">
            <span class="posted-on"><a href="' . $urlLink . '" rel="bookmark"></span>
                 <div class="entry-content">
                 <h4> ' . $the_content . '</h4>
                                <p>' . $the_content . '</p>
                                    </div><!-- .entry-content -->';
    the_excerpt();
    echo '<footer class="entry-meta">
        <span class="comments-link"><a href="http://localhost/wordpress/?p=45#respond" title="Kommentiere HTWK Eine Hochschule mit Unterstufenniveau">Hinterlassen Sie einen Kommentar</a></span>
        <span class="edit-link"><a class="post-edit-link" href="http://localhost/wordpress/wp-admin/post.php?post=' . $ID . '&amp;action=edit">Editieren</a></span>	</footer><!-- .entry-meta -->
        </article>';
}
开发者ID:rokigeorg,项目名称:radiate_child,代码行数:31,代码来源:page-event.php


注:本文中的get_the_guid函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。