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


PHP edit_post_link函数代码示例

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


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

示例1: ving_entry_footer

 /**
  * Prints HTML with meta information for the categories, tags and comments.
  */
 function ving_entry_footer()
 {
     global $wp_query;
     // Hide category and tag text for pages.
     if ('post' === get_post_type()) {
         /* translators: used between list items, there is a space after the comma */
         $categories_list = get_the_category_list(esc_html__(', ', 'ving'));
         if ($categories_list && ving_categorized_blog()) {
             $post = $wp_query->post;
             $cat = wp_get_post_terms($post->ID, 'category');
             $count = count($cat);
             if ($count > 1) {
                 printf('<span class="cat-links col-lg-6 col-md-6 col-sm-6 col-xs-12"><span class="text">CATEGORIES</span>' . esc_html__('%1$s', 'ving') . '</span>', $categories_list);
                 // WPCS: XSS OK.
             } else {
                 printf('<span class="cat-links col-lg-6 col-md-6 col-sm-6 col-xs-12"><span class="text">CATEGORY</span>' . esc_html__('%1$s', 'ving') . '</span>', $categories_list);
                 // WPCS: XSS OK.
             }
         }
         /* translators: used between list items, there is a space after the comma */
         $tags_list = get_the_tag_list('', esc_html__(', ', 'ving'));
         if ($tags_list) {
             printf('<span class="tags-links col-lg-5 col-md-5 col-sm-5 col-xs-12"><span class="text">TAGS</span>' . esc_html__('%1$s', 'ving') . '</span>', $tags_list);
             // WPCS: XSS OK.
         }
     }
     if (!is_single() && !post_password_required() && (comments_open() || get_comments_number())) {
         echo '<span class="comments-link">';
         comments_popup_link(esc_html__('Leave a comment', 'ving'), esc_html__('1 Comment', 'ving'), esc_html__('% Comments', 'ving'));
         echo '</span>';
     }
     edit_post_link(sprintf(esc_html__('Edit %s', 'ving'), the_title('<span class="screen-reader-text">"', '"</span>', false)), '<span class="edit-link">', '</span>');
 }
开发者ID:jasonralph,项目名称:jasonralph.org,代码行数:36,代码来源:template-tags.php

示例2: my_diapordg_column

function my_diapordg_column($column)
{
    global $post;
    if ($column == 'thumbnail') {
        echo edit_post_link(get_the_post_thumbnail($post->ID), null, null, $post->ID);
    }
}
开发者ID:alexrdg,项目名称:rodriguez_plugin,代码行数:7,代码来源:exro.php

示例3: _loa_entry_footer

 /**
  * Prints HTML with meta information for the categories, tags and comments.
  */
 function _loa_entry_footer()
 {
     // Hide category and tag text for pages.
     if ('post' === get_post_type()) {
         /* translators: used between list items, there is a space after the comma */
         $categories_list = get_the_category_list(esc_html__(', ', '_loa'));
         if ($categories_list && _loa_categorized_blog()) {
             printf('<span class="cat-links">' . esc_html__('Posted in %1$s', '_loa') . '</span>', $categories_list);
             // WPCS: XSS OK.
         }
         /* translators: used between list items, there is a space after the comma */
         $tags_list = get_the_tag_list('', esc_html__(', ', '_loa'));
         if ($tags_list) {
             printf('<span class="tags-links">' . esc_html__(', %1$s', '_loa') . '</span>', $tags_list);
             // WPCS: XSS OK.
         }
     }
     // // // // UNCOMMENT THIS FOR "Leave A Comment" IN ENTRY FOOTER // // // // //
     // if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
     // 	echo '<span class="comments-link">';
     // 	comments_popup_link( esc_html__( 'Leave a comment', '_loa' ), esc_html__( '1 Comment', '_loa' ), esc_html__( '% Comments', '_loa' ) );
     // 	echo '</span>';
     // }
     edit_post_link(sprintf(esc_html__('Edit %s', '_loa'), the_title('<span class="screen-reader-text">"', '"</span>', false)), '<span class="edit-link">', '</span>');
 }
开发者ID:dylanjharris,项目名称:loa,代码行数:28,代码来源:template-tags.php

示例4: ushipnetwork_entry_footer

 /**
  * Prints HTML with meta information for the categories, tags and comments.
  */
 function ushipnetwork_entry_footer()
 {
     // Hide category and tag text for pages.
     if ('post' === get_post_type()) {
         $byline = sprintf(esc_html_x('by %s', 'post author', 'ushipnetwork'), '<span class="author vcard"><a class="url fn n" href="' . esc_url(get_author_posts_url(get_the_author_meta('ID'))) . '">' . esc_html(get_the_author()) . '</a></span>');
         echo '<div class="byline">' . '<div class="authorship">' . $byline . '</div>' . '<div class="share">';
         include "share.php";
         echo '</div>' . '</div>';
         $posttags = get_the_tags();
         $count = 0;
         $separator = ', ';
         $output = '';
         if (!empty($posttags)) {
             echo '<span class="tag-list">tags: ';
             foreach ($posttags as $posttag) {
                 $count++;
                 if ($count <= 2) {
                     $output .= '<a href="' . esc_url(get_tag_link($posttag->term_id)) . '" alt="' . esc_attr(sprintf(__('View all posts in %s', 'textdomain'), $posttag->name)) . '">' . esc_html($posttag->name) . '</a>' . $separator;
                 }
             }
             echo trim($output, $separator);
         }
         echo '</span>';
     }
     edit_post_link(sprintf(esc_html__('Edit %s', 'ushipnetwork'), the_title('<span class="screen-reader-text">"', '"</span>', false)), '<span class="edit-link">', '</span>');
 }
开发者ID:rmikeska,项目名称:ushipnetwork,代码行数:29,代码来源:template-tags.php

示例5: crmpress_do_post_title

/**
 *
 * This function outputs the post title for all posts.
 *
 * @since 1.0
 *
 */
function crmpress_do_post_title()
{
    global $post;
    if (!is_page($post->ID) && !is_single()) {
        echo '<h2 class="entry-title">';
        ?>
			<a href="<?php 
        the_permalink();
        ?>
" title="<?php 
        the_title();
        ?>
"><?php 
        the_title();
        ?>
</a>
		<?php 
        echo '</h2>';
        ?>
	<?php 
    } elseif (!is_page($post->ID)) {
        echo '<div class="headline">';
        echo '<h2 class="entry-title">';
        echo the_title();
        echo '</h2>';
        edit_post_link(__('<em>(Edit this entry)</em>', 'crmpress'), '<p class="edit-link">', '</p>');
        echo '</div><!-- end .headline -->';
    }
}
开发者ID:netcon-source,项目名称:CRM-Press,代码行数:36,代码来源:post.php

示例6: airballoon_display_postmeta

    function airballoon_display_postmeta()
    {
        ?>
		
		<span class="meta-date">
		<?php 
        printf('<a href="%1$s" title="%2$s" rel="bookmark"><time datetime="%3$s">%4$s</time></a>', esc_url(get_permalink()), esc_attr(get_the_time()), esc_attr(get_the_date('c')), esc_html(get_the_date()));
        ?>
		</span>
		<span class="meta-author">
		<?php 
        printf('<a href="%1$s" title="%2$s" rel="author">%3$s</a>', esc_url(get_author_posts_url(get_the_author_meta('ID'))), esc_attr(sprintf(__('View all posts by %s', 'airballoon-lite'), get_the_author())), get_the_author());
        ?>
		</span>
		
	<?php 
        if (comments_open()) {
            ?>
			<span class="meta-comments">
				<?php 
            comments_popup_link(__('Leave a comment', 'airballoon-lite'), __('One comment', 'airballoon-lite'), __('% comments', 'airballoon-lite'));
            ?>
			</span>
<?php 
        }
        edit_post_link(__('Edit Post', 'airballoon-lite'));
    }
开发者ID:russtx,项目名称:tac,代码行数:27,代码来源:template-tags.php

示例7: widget

 function widget($args, $instance)
 {
     global $post;
     /* PRINT THE WIDGET */
     extract($args, EXTR_SKIP);
     $title = !empty($instance['title']) ? $instance['title'] : '';
     if (!is_single()) {
         return;
     }
     echo $before_widget;
     if (!empty($title)) {
         echo $before_title;
         echo $title;
         echo $after_title;
     }
     $name = get_the_author_meta('display_name', $post->post_author);
     echo '<div class="large-icons">';
     echo '<ul>';
     edit_post_link('<i class="icon-pencil"></i>' . __('Edit', 'myThemes'), '<li>', '</li>');
     echo '<li><a href="' . get_day_link(get_post_time('Y', false, $post->ID), get_post_time('m', false, $post->ID), get_post_time('d', false, $post->ID)) . '">';
     echo '<time datetime="' . get_post_time('Y-m-d', false, $post->ID) . '"><i class="icon-calendar"></i>' . get_post_time(get_option('date_format'), false, $post->ID) . '</time></a></li>';
     echo '<li><a href="' . get_author_posts_url($post->post_author) . '" title="' . __('Writed by ', 'myThemes') . ' ' . $name . '"><i class="icon-user-5"></i>' . $name . '</a></li>';
     if ($post->comment_status == 'open') {
         $nr = get_comments_number($post->ID);
         if ($nr == 1) {
             $comments = $nr . ' ' . __('Comment', 'myThemes');
         } else {
             $comments = $nr . ' ' . __('Comments', 'myThemes');
         }
         echo '<li><a href="' . get_comments_link($post->ID) . '"><i class="icon-comment"></i>' . $comments . '</a></li>';
     }
     echo '</ul>';
     echo '</div>';
     echo $after_widget;
 }
开发者ID:mathieu-aubin,项目名称:verbo-linuq,代码行数:35,代码来源:my_wdg_meta.php

示例8: twentyten_posted_on

function twentyten_posted_on()
{
    $meta = array();
    $meta['author'] = sprintf(__('%1$s <span class="meta-sep">by</span> %2$s', 'wordcampbase'), sprintf('<a href="%1$s" title="%2$s" rel="bookmark"><span class="entry-date">%3$s</span></a>', get_permalink(), esc_attr(get_the_time()), get_the_date()), sprintf('<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s">%3$s</a></span>', get_author_posts_url(get_the_author_meta('ID')), sprintf(esc_attr__('View all posts by %s', 'wordcampbase'), get_the_author()), get_the_author()));
    $meta['sep'] = ' <span class="meta-sep meta-sep-bull">&bull;</span> ';
    $meta['comments'] = array('before' => '<span class="comments-link">', 'after' => '</span>', 'zero' => __('Leave a comment', 'wordcampbase'), 'one' => __('1 Comment', 'wordcampbase'), 'many' => __('% Comments', 'wordcampbase'));
    $meta['edit'] = array('title' => __('Edit', 'wordcampbase'), 'before' => '<span class="edit-link">', 'after' => '</span>');
    $meta['br'] = '<br />';
    // Just to have.
    $meta['order'] = array('author', 'sep', 'comments', 'edit');
    $meta = apply_filters('wcb_entry_meta', $meta);
    if (!is_array($meta) || !isset($meta['order'])) {
        return;
    }
    foreach ($meta['order'] as $type) {
        $content = $meta[$type];
        switch ($type) {
            case 'comments':
                echo $content['before'];
                comments_popup_link($content['zero'], $content['one'], $content['many']);
                echo $content['after'];
                break;
            case 'edit':
                if (isset($meta['sep'])) {
                    $content['before'] = $meta['sep'] . $content['before'];
                }
                edit_post_link($content['title'], $content['before'], $content['after']);
                break;
            default:
                echo $content;
        }
    }
}
开发者ID:RobStino,项目名称:wordcamp-sunshine-coast,代码行数:33,代码来源:twentyten-overrides.php

示例9: owl_column

 /**
  * Add custom column contents in administration
  * @param string $columnName
  */
 public function owl_column($columnName)
 {
     global $post;
     if ($columnName == 'thumbnail') {
         echo edit_post_link(get_the_post_thumbnail($post->ID, 'thumbnail'), null, null, $post->ID);
     }
 }
开发者ID:evaristocolomby,项目名称:owl-carousel,代码行数:11,代码来源:class-post-type.php

示例10: does_user_have_access

function does_user_have_access($content)
{
    // Grab the current user's info so that we can compare it to the "allowed" users from the ACF "User" field later.
    $current_user = wp_get_current_user();
    // Store the ACF "User" info
    $values = get_field('user_info');
    if ($values) {
        // Create an array of users that will be able to access the page from the ACF "User" field
        $users_that_can_access_this_post = array();
        foreach ($values as $value) {
            $user_IDs_that_can_access_this_post[] = $value['ID'];
        }
        // Check to see if the current user is in the "User" field's array
        if (in_array($current_user->ID, $user_IDs_that_can_access_this_post, false) || current_user_can('manage_options') || current_user_can('create_users')) {
            // Display the post
            display_all_acf_fields();
        } else {
            // Hide the post content if the user is not in the ACF "User" array
            echo 'You do not have access to this post.  Please let Toby know if you do, indeed, need access.' . edit_post_link('Edit', '', ' ');
        }
    } else {
        // If no users have been selected on this page's ACF field, then display the content for admins and display an "error" message for other users.
        if (current_user_can('manage_options') || current_user_can('create_users')) {
            // Display the contents of the post to admins
            display_all_acf_fields();
        } else {
            // Error message for non-admins.
            echo 'You do not have access to this post.  Please let Toby know if you do, indeed, need access.' . edit_post_link('Edit', '', ' ');
        }
    }
    return $content;
}
开发者ID:irenehofer,项目名称:advanced-custom-fields-login-helper,代码行数:32,代码来源:advanced-custom-fields-login-helper.php

示例11: smartline_display_postmeta

	function smartline_display_postmeta() {
		
		// Get Theme Options from Database
		$theme_options = smartline_theme_options();

		// Display Date unless user has deactivated it via settings
		if ( true == $theme_options['meta_date'] ) :
		
			smartline_meta_date();
					
		endif; 
		
		// Display Author unless user has deactivated it via settings
		if ( true == $theme_options['meta_author'] ) :	
		
			smartline_meta_author();
		
		endif; 
		
		// Display Categories unless user has deactivated it via settings
		if ( true == $theme_options['meta_category'] ) :		

			smartline_meta_categories();
			
		endif;
		
		edit_post_link( esc_html__( 'Edit Post', 'smartline-lite' ));
	}
开发者ID:jhersonn20,项目名称:myportal,代码行数:28,代码来源:template-tags.php

示例12: material_blog_entry_footer

 /**
  * Prints HTML with meta information for the categories, tags and comments.
  */
 function material_blog_entry_footer()
 {
     // Hide category and tag text for pages.
     if ('post' === get_post_type()) {
         /* translators: used between list items, there is a space after the comma */
         $categories_list = get_the_category_list(esc_html__(', ', 'material-blog'));
         if ($categories_list && material_blog_categorized_blog()) {
             printf('<span class="cat-links">' . esc_html__('%1$s', 'material-blog') . '</span>', $categories_list);
             // WPCS: XSS OK.
         }
         /* translators: used between list items, there is a space after the comma */
         $tags_list = get_the_tag_list('', esc_html__(', ', 'material-blog'));
         if ($tags_list) {
             printf('<span class="tags-links">' . esc_html__('%1$s', 'material-blog') . '</span>', $tags_list);
             // WPCS: XSS OK.
         }
     }
     /*	if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
     		echo '<span class="comments-link">';
     		comments_popup_link( esc_html__( 'Leave a comment', 'material-blog' ), esc_html__( '1 Comment', 'material-blog' ), esc_html__( '% Comments', 'material-blog' ) );
     		echo '</span>';
     	}*/
     // the function used in the header part, this part copied out to the footer separately
     edit_post_link(sprintf(esc_html__('Edit %s', 'material-blog'), the_title('<span class="screen-reader-text">"', '"</span>', false)), '<span class="edit-link">', '</span>');
 }
开发者ID:yujinyan,项目名称:material-blog-theme,代码行数:28,代码来源:template-tags.php

示例13: reactor_do_standard_header_titles

/**
 * Post header
 * in format-standard
 * 
 * @since 1.0.0
 */
function reactor_do_standard_header_titles()
{
    if (!is_single() && get_post_meta(get_the_ID(), '_amaga_titol', true) == "on") {
        edit_post_link(__('Edit'), '<div class="edit-link"><span>', '</span></div>');
        return;
    }
    if (is_single()) {
        ?>
                    <h1 class="entry-title"><?php 
        the_title();
        ?>
</h1>
<?php 
    } else {
        ?>
                    <h2 class="entry-title"><a href="<?php 
        the_permalink();
        ?>
" title="<?php 
        echo esc_attr(sprintf(__('%s', 'reactor'), the_title_attribute('echo=0')));
        ?>
" rel="bookmark"><?php 
        the_title();
        ?>
</a></h2>
<?php 
    }
    edit_post_link(__('Edit'), '<div class="edit-link"><span>', '</span></div>');
}
开发者ID:pausaura,项目名称:agora_nodes,代码行数:35,代码来源:content-posts.php

示例14: sangeet_entry_footer

 /**
  * Prints HTML with meta information for the categories, tags and comments.
  */
 function sangeet_entry_footer()
 {
     // Hide category and tag text for pages.
     if ('post' === get_post_type()) {
         /* translators: used between list items, there is a space after the comma */
         $categories_list = get_the_category_list(esc_html__(', ', 'sangeet'));
         if ($categories_list && sangeet_categorized_blog()) {
             printf('<span class="cat-links">' . esc_html__('%1$s', 'sangeet') . '</span>', $categories_list);
             // WPCS: XSS OK.
         }
         /* translators: used between list items, there is a space after the comma */
         $tags_list = get_the_tag_list('', esc_html__(', ', 'sangeet'));
         if ($tags_list) {
             printf('<span class="tags-links">' . esc_html__('%1$s', 'sangeet') . '</span>', $tags_list);
             // WPCS: XSS OK.
         }
     }
     if (!is_single() && !post_password_required() && (comments_open() || get_comments_number())) {
         echo '<span class="comments-link">';
         comments_popup_link(esc_html__('Leave a comment', 'sangeet'), esc_html__('1 Comment', 'sangeet'), esc_html__('% Comments', 'sangeet'));
         echo '</span>';
     }
     edit_post_link(sprintf(esc_html__('Edit %s', 'sangeet'), the_title('<span class="screen-reader-text">"', '"</span>', false)), '<span class="edit-link">', '</span>');
     if (!is_single()) {
         echo '<span class="continue-reading"><a href="' . get_permalink() . '" title="' . esc_html__('Continue Reading ', 'sangeet') . get_the_title() . '" rel="bookmark">' . esc_html__('Continue Reading ', 'sangeet') . '</a></span>';
     }
 }
开发者ID:kirandash,项目名称:Sangeet,代码行数:30,代码来源:template-tags.php

示例15: widget

    function widget($args, $instance)
    {
        extract($args);
        echo $before_widget;
        echo $before_title . 'Active Projects' . $after_title;
        $order = array('Dev', 'Maintenance', 'Edit', 'Design', 'Dev Complete', 'Project Complete');
        echo '<ol>';
        foreach ($order as $order_item) {
            global $prefix;
            $args = array('category_name' => 'active-project', 'posts_per_page' => '-1', 'meta_query' => array(array('key' => $prefix . 'project_status', 'value' => $order_item)));
            $active = new WP_Query($args);
            global $prefix;
            $prefix = '_crm_';
            while ($active->have_posts()) {
                $active->the_post();
                global $post;
                $project_name = get_custom_field($prefix . 'project_name');
                if (!empty($project_name)) {
                    $name = $project_name . ' (' . get_the_title() . ')';
                } else {
                    $name = get_the_title();
                }
                ?>
				<li><a href="<?php 
                the_permalink();
                ?>
"><?php 
                echo $name;
                ?>
</a> <?php 
                edit_post_link('Edit', '(', ')');
                ?>
<br /> 
				<?php 
                $status_summary = get_custom_field($prefix . 'status_summary');
                $status = get_custom_field($prefix . 'project_status');
                if (!empty($status)) {
                    echo '<strong>Status:</strong> ' . $status;
                }
                if (!empty($status_summary)) {
                    echo ' | ' . $status_summary;
                }
                if (!empty($status) || !empty($status_summary)) {
                    echo '<br />';
                }
                $started = get_custom_field($prefix . 'start_date');
                if ($started) {
                    echo '<strong>Started:</strong> ' . date('F j, Y', strtotime($started)) . ',';
                }
                $revenue = get_custom_field($prefix . 'revenue');
                $expense = get_custom_field($prefix . 'expense');
                if ($revenue) {
                    echo 'Budget: $' . number_format($revenue - $expense) . '</li>';
                }
            }
        }
        echo '</ol>';
        wp_reset_query();
        echo $after_widget;
    }
开发者ID:joshuadavidnelson,项目名称:Genesis-CRM,代码行数:60,代码来源:widget-active-projects.php


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