コード例 #1
0
 /**
  * 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>');
 }
コード例 #2
0
ファイル: exro.php プロジェクト: alexrdg/rodriguez_plugin
function my_diapordg_column($column)
{
    global $post;
    if ($column == 'thumbnail') {
        echo edit_post_link(get_the_post_thumbnail($post->ID), null, null, $post->ID);
    }
}
コード例 #3
0
ファイル: template-tags.php プロジェクト: dylanjharris/loa
 /**
  * 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>');
 }
コード例 #4
0
 /**
  * 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>');
 }
コード例 #5
0
ファイル: post.php プロジェクト: netcon-source/CRM-Press
/**
 *
 * 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 -->';
    }
}
コード例 #6
0
ファイル: template-tags.php プロジェクト: russtx/tac
    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'));
    }
コード例 #7
0
 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;
 }
コード例 #8
0
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;
        }
    }
}
コード例 #9
0
 /**
  * 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);
     }
 }
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;
}
コード例 #11
0
ファイル: template-tags.php プロジェクト: jhersonn20/myportal
	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' ));
	}
コード例 #12
0
 /**
  * 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>');
 }
コード例 #13
0
/**
 * 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>');
}
コード例 #14
0
ファイル: template-tags.php プロジェクト: kirandash/Sangeet
 /**
  * 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>';
     }
 }
コード例 #15
0
    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;
    }
コード例 #16
0
 public function manage_column($column, $post_id)
 {
     switch ($column) {
         case 'ID':
             echo edit_post_link($post_id, '<p>', '</p>', $post_id);
             break;
         case 'myauthor':
             $obj = new SLN_Wrapper_Booking($post_id);
             echo edit_post_link($obj->getDisplayName(), null, null, $post_id);
             break;
         case 'booking_status':
             echo SLN_Enum_BookingStatus::getLabel(get_post_status($post_id));
             break;
         case 'booking_date':
             echo $this->getPlugin()->format()->datetime(get_post_meta($post_id, '_sln_booking_date', true) . ' ' . get_post_meta($post_id, '_sln_booking_time', true));
             break;
         case 'booking_price':
             echo $this->getPlugin()->format()->money(get_post_meta($post_id, '_sln_booking_amount', true));
             break;
         case 'booking_attendant':
             if ($attendant = $this->getPlugin()->createBooking($post_id)->getAttendant()) {
                 echo $attendant->getName();
             } else {
                 echo "-";
             }
             break;
     }
 }
コード例 #17
0
ファイル: functions.php プロジェクト: scarecrow2003/appletree
/**
 * Displays meta information for a post
 * @return void
 */
function appletree_post_meta()
{
    if (get_post_type() == 'post') {
        echo sprintf(__('Posted %s in %s%s by %s. ', 'appletreesg.com'), get_the_time(get_option('date_format')), get_the_category_list(', '), get_the_tag_list(__(', <b>Tags</b>: ', 'appletreesg.com'), ', '), get_the_author_link());
    }
    edit_post_link(__(' (edit)', 'appletreesg.com'), '<span class="edit-link">', '</span>');
}
コード例 #18
0
function pasw_meta_box($page) {
  $children = get_pages('child_of='.$page->ID); //load all the kids
  if ( count($children) != 0 ) { //display the select box only if we have child pages
    print '<p>';
    print '<strong>'.__("Page").': </strong>';
    print '<label for="pasw_select" class="screen-reader-text">'.__("Page to display as Widget").'</label>';
    $default = (get_post_meta($page->ID, 'pasw_widget_page_id', true));
    wp_dropdown_pages('child_of='.$page->ID.'&name=pasw_select&show_option_none=None&selected='.$default);
    print '</p>';
    print '<input type="hidden" id="pasw_last_subpage" name="pasw_last_subpage" value="'.$default.'" />';
    if ($default) {
      $dtitle = get_the_title($default);
      edit_post_link('edit '. $dtitle, '<p>', '</p>', $default);
    }
  } else {
    $parentid = get_post_meta($page->ID, 'pasw_is_subpage');
    if (is_numeric($parentid[0])) {
      $title = get_the_title($parentid[0]);
      $link = get_page_link($parentid[0]);
      $editlink = get_edit_post_link($parentid[0]);
      print __("This page is a sidebar of '<a href=\"".$link."\">".$title."</a>', you can edit '".$title."' <a href=\"".$editlink."\">here</a>.");
    } else {
      print __("No sub pages found, add a subpage to use it as a widget");
    }
  }
}
コード例 #19
0
 /**
  * Prints HTML with meta information for the categories, tags and comments.
  */
 function tm_vals_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__( ', ', 'tm-vals-blog' ) );
         		if ( $categories_list && tm_vals_blog_categorized_blog() ) {
         			printf( '<span class="cat-links">' . esc_html__( 'Posted in %1$s', 'tm-vals-blog' ) . '</span>', $categories_list ); // WPCS: XSS OK.
         		}*/
         if (!is_single()) {
             printf('<a href="' . esc_url(get_permalink()) . '" class="article-more">' . __('More', 'tm-vals-blog') . '</a>');
         }
         /* translators: used between list items, there is a space after the comma */
         $tags_list = get_the_tag_list('', esc_html__(' ', 'tm-vals-blog'));
         if ($tags_list) {
             printf('<span class="tags-links">' . esc_html__('%1$s', 'tm-vals-blog') . '</span>', $tags_list);
             // WPCS: XSS OK.
         }
     }
     /*comments in 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', 'tm-vals-blog' ), esc_html__( '1 Comment', 'tm-vals-blog' ), esc_html__( '% Comments', 'tm-vals-blog' ) );
     		echo '</span>';
     	}*/
     edit_post_link(sprintf(esc_html__('Edit %s', 'tm-vals-blog'), the_title('<span class="screen-reader-text">"', '"</span>', false)), '<span class="edit-link">', '</span>');
 }
コード例 #20
0
ファイル: dashboard.php プロジェクト: congtrieu112/anime
 public function widget_callback()
 {
     global $un_h;
     query_posts(array('post_type' => FEEDBACK, 'posts_per_page' => 6));
     $count = 0;
     if (have_posts()) {
         echo '<ul>';
         while (have_posts() && $count++ < 5) {
             the_post();
             echo "<li>";
             echo un_get_feedback_type_span(get_the_ID(), false);
             echo " ";
             edit_post_link(esc_html(get_the_title()), '', '', get_the_ID());
             echo "";
             if (un_feedback_has_author(get_the_ID())) {
                 echo ' ';
                 _e('by');
                 echo " ";
                 un_feedback_author_link(get_the_ID());
                 echo '';
             }
             echo "</li>";
         }
         echo '</ul>';
         if (have_posts()) {
             $un_h->tag('a', array('href' => 'edit.php?order=desc&post_type=' . FEEDBACK, 'id' => 'un-view-more'), __('View all feedback', 'usernoise'));
         }
     } else {
         _e('No new feedback now.', 'usernoise');
     }
 }
コード例 #21
0
 public function getColumn($column)
 {
     global $post;
     switch ($column) {
         case 'category':
             echo get_the_term_list($post->ID, $post->post_type . '_category', '', ', ', '');
             break;
         case 'thumbnail':
             if ($post->Thumbnail) {
                 echo GummRegistry::get('Helper', 'Media')->display($post->Thumbnail->guid, array('width' => 70, 'height' => 70));
             }
             break;
         case 'gallery_album':
             echo get_the_term_list($post->ID, 'gallery_album', '', ', ', '');
             break;
         case 'portfolio_cats':
             echo get_the_term_list($post->ID, 'portfolio_cat', '', ', ', '');
             break;
         case $post->post_type . '_author':
             $author = isset($post->PostMeta['author']) ? $post->PostMeta['author'] : '';
             $organisation = isset($post->PostMeta['organisation']) ? $post->PostMeta['organisation'] : '';
             echo '<span class="testimonial_author_name">' . $author . '</span>';
             if ($organisation) {
                 echo ' - <span class="testimonial_author_occupation">' . $organisation . '</span>';
             }
             break;
         case $post->post_type . '_excerpt':
             edit_post_link(GummRegistry::get('Helper', 'Text')->truncate(get_the_excerpt(), 100, array('exact' => false)));
             break;
     }
 }
コード例 #22
0
ファイル: functions.php プロジェクト: joffcrabtree/wt-orbis
function orbis_edit_post_link()
{
    $text = '';
    $text .= '<span class="glyphicon glyphicon-pencil"></span>';
    $text .= sprintf('<span style="display: none">%s</span>', __('Edit', 'orbis'));
    edit_post_link($text);
}
コード例 #23
0
        function categori_news(){
            query_posts('cat=9&showposts=10&posts_per_page=3');

            while (have_posts()) : the_post();
                /*Dima insert*/the_excerpt(); ?>
                <div class="content-box">
                    <div class="bgr01"><div class="bgr02"><div class="bgr03">
                                <div <?php post_class() ?> id="post-<?php the_ID(); ?>" style=" float:none; ">
                                    <div class="title">
                                        <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
                                        <div class="date_all">
                                            <?php the_time('l, j ?F, Y') ?>
                                        </div>
                                        <div class="post">
                                            Написал <?php the_author_link() ?> <?php the_time('g:i A') ?>
                                        </div>
                                    </div>
                                    <div class="content_box">
                                        <?php the_content('Читать всё'); ?>
                                    </div>

                                    <div class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?></div>

                                    <div class="comments"><?php comments_popup_link('0 комментарии', 'комментарии', '% комментарии '); ?></div>
                                    <div class="link-edit"><?php edit_post_link('Edit', ''); ?></div>
                                </div>
                            </div></div></div>
                </div>
            <?php endwhile;}
コード例 #24
0
 /**
  * Prints HTML with meta information for the categories, tags and comments.
  */
 function lyndascore_entry_footer()
 {
     // Hide category and tag text for pages.
     //	if ( 'post' === get_post_type() ) {
     //		/* translators: used between list items, list is comma separated */
     //		$categories_list = get_the_category_list( esc_html__( ', ', 'lyndascore' ) );
     //		if ( $categories_list && lyndascore_categorized_blog() ) {
     //			printf( '<span class="cat-links">' . esc_html__( 'Posted in %1$s', 'lyndascore' ) . '</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__( ', ', 'lyndascore' ) );
     //		if ( $tags_list ) {
     //			printf( '<span class="tags-links">' . esc_html__( 'Tagged %1$s', 'lyndascore' ) . '</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', 'lyndascore' ), esc_html__( '1 Comment', 'lyndascore' ), esc_html__( '% Comments', 'lyndascore' ) );
     //		echo '</span>';
     //	}
     $tags_list = get_the_tag_list('<li><i class="fa fa-tag"></i>', __('</li><li><i class="fa fa-tag"></i>', 'lyndascore'));
     if ($tags_list) {
         printf('<ul>' . __('%1$s', 'lyndascore') . '</li></ul>', $tags_list);
     }
     edit_post_link(esc_html__('Edit', 'lyndascore'), '<span class="edit-link">', '</span>');
 }
コード例 #25
0
    function widget($args, $instance)
    {
        $cache = wp_cache_get('widget_Pending_posts', 'widget');
        if (!is_array($cache)) {
            $cache = array();
        }
        if (isset($cache[$args['widget_id']])) {
            return $cache[$args['widget_id']];
        }
        ob_start();
        extract($args);
        $title = empty($instance['title']) ? __('Pending Posts', 'Pending_posts_widget') : apply_filters('widget_title', $instance['title']);
        if (!($number = (int) $instance['number'])) {
            $number = 10;
        } else {
            if ($number < 1) {
                $number = 1;
            } else {
                if ($number > 15) {
                    $number = 15;
                }
            }
        }
        $queryArgs = array('showposts' => $number, 'what_to_show' => 'posts', 'nopaging' => 0, 'post_status' => 'pending', 'caller_get_posts' => 1, 'order' => 'ASC');
        $r = new WP_Query($queryArgs);
        if ($r->have_posts()) {
            ?>
		<?php 
            echo $before_widget;
            ?>
		<?php 
            echo $before_title . $title . $after_title;
            ?>
		<ul>
		<?php 
            while ($r->have_posts()) {
                $r->the_post();
                ?>
		<li><?php 
                if (get_the_title()) {
                    the_title();
                } else {
                    the_ID();
                }
                edit_post_link('e', ' (', ')');
                ?>
</li>
		<?php 
            }
            ?>
		</ul>
		<?php 
            echo $after_widget;
            wp_reset_query();
            // Restore global post data stomped by the_post().
        }
        $cache[$args['widget_id']] = ob_get_flush();
        wp_cache_add('widget_Pending_posts', $cache, 'widget');
    }
コード例 #26
0
ファイル: template-tags.php プロジェクト: yanvalue/wordpress
 /**
  * Prints HTML with meta information for the current post-date/time and author.
  */
 function hacker_posted_on()
 {
     $time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time>';
     $time_string = sprintf($time_string, esc_attr(get_the_date('c')), esc_html(get_the_date()));
     hacker_entry_categories();
     printf('<span class="posted-on"><a href="%1$s" rel="bookmark">%2$s</a></span>', esc_url(get_permalink()), $time_string);
     edit_post_link(esc_html__('- [Edit]', 'hacker'), '<span class="edit-link">', '</span>');
 }
コード例 #27
0
ファイル: functions.php プロジェクト: JordiCruells/mwt
function theme_get_metadata_icons($icons = '', $class = '')
{
    global $post;
    if (!is_string($icons) || theme_strlen($icons) == 0) {
        return;
    }
    $icons = explode(",", str_replace(' ', '', $icons));
    if (!is_array($icons) || count($icons) == 0) {
        return;
    }
    $result = array();
    for ($i = 0; $i < count($icons); $i++) {
        $icon = $icons[$i];
        switch ($icon) {
            case 'date':
                $result[] = '<span class="mmb-postdateicon">' . sprintf(__('<span class="%1$s"></span> %2$s', THEME_NS), 'date', sprintf('<span class="entry-date" title="%1$s">%2$s</span>', esc_attr(get_the_time()), get_the_date())) . '</span>';
                break;
            case 'author':
                $result[] = '<span class="mmb-postauthoricon">' . sprintf(__('<span class="%1$s">By</span> %2$s', THEME_NS), 'author', 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', THEME_NS)), get_the_author()), get_the_author())) . '</span>';
                break;
            case 'category':
                $categories = get_the_category_list(', ');
                if (theme_strlen($categories) == 0) {
                    break;
                }
                $result[] = '<span class="mmb-postcategoryicon">' . sprintf(__('<span class="%1$s">Posted in</span> %2$s', THEME_NS), 'categories', get_the_category_list(', ')) . '</span>';
                break;
            case 'tag':
                $tags_list = get_the_tag_list('', ', ');
                if (!$tags_list) {
                    break;
                }
                $result[] = '<span class="mmb-posttagicon">' . sprintf(__('<span class="%1$s">Tagged</span> %2$s', THEME_NS), 'tags', $tags_list) . '</span>';
                break;
            case 'comments':
                if (!comments_open() || !theme_get_option('theme_allow_comments')) {
                    break;
                }
                theme_ob_start();
                comments_popup_link(__('Leave a comment', THEME_NS), __('1 Comment', THEME_NS), __('% Comments', THEME_NS));
                $result[] = '<span class="mmb-postcommentsicon">' . theme_ob_get_clean() . '</span>';
                break;
            case 'edit':
                if (!current_user_can('edit_post', $post->ID)) {
                    break;
                }
                theme_ob_start();
                edit_post_link(__('Edit', THEME_NS), '');
                $result[] = '<span class="mmb-postediticon">' . theme_ob_get_clean() . '</span>';
                break;
        }
    }
    $result = implode(theme_get_option('theme_metadata_separator'), $result);
    if (theme_is_empty_html($result)) {
        return;
    }
    return "<div class=\"mmb-post{$class}icons mmb-metadata-icons\">{$result}</div>";
}
コード例 #28
0
 /**
  * Prints HTML with meta information for the categories, tags and comments.
  */
 function wpsp_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', 'learninginstitute'), esc_html__('1 Comment', 'learninginstitute'), esc_html__('% Comments', 'learninginstitute'));
         echo '</span>';
     }
     edit_post_link(sprintf(esc_html__('Edit %s', 'learninginstitute'), the_title('<span class="screen-reader-text">"', '"</span>', false)), '<span class="edit-link">', '</span>');
 }
コード例 #29
0
ファイル: c_widget_edit.php プロジェクト: jbogota/blog-king
/**
 * @desc Output of  the Category
 * @author Georg Leciejewski
 */
function c_widget_edit($args, $number = 1)
{
    $options = get_option('c_widget_edit');
    $before_widget = stripslashes($options[$number]['before_widget']);
    $after_widget = stripslashes($options[$number]['after_widget']);
    echo $before_widget;
    edit_post_link('<img src="' . get_bloginfo(template_directory) . '/images/edit.png" alt="Edit Link" />', '<span class="editlink">', '</span>');
    echo $after_widget;
}
コード例 #30
-1
 /**
  * Prints HTML with meta information for the categories, tags and comments.
  */
 function xmaps_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__(', ', 'xmaps'));
         if ($categories_list && xmaps_categorized_blog()) {
             printf('<span class="cat-links">' . esc_html__('Posted in %1$s', 'xmaps') . '</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__(', ', 'xmaps'));
         if ($tags_list) {
             printf('<span class="tags-links">' . esc_html__('Tagged %1$s', 'xmaps') . '</span>', $tags_list);
             // WPCS: XSS OK.
         }
     }
     if (!is_single() && !post_password_required() && (comments_open() || get_comments_number())) {
         echo '<span class="comments-link">';
         /* translators: %s: post title */
         comments_popup_link(sprintf(wp_kses(__('Leave a Comment<span class="screen-reader-text"> on %s</span>', 'xmaps'), array('span' => array('class' => array()))), get_the_title()));
         echo '</span>';
     }
     edit_post_link(sprintf(esc_html__('Edit %s', 'xmaps'), the_title('<span class="screen-reader-text">"', '"</span>', false)), '<span class="edit-link">', '</span>');
 }