/**
  * Prints HTML with meta information for the current post-date/time and author.
  */
 function square_posted_on()
 {
     $time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
     if (get_the_time('U') !== get_the_modified_time('U')) {
         $time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>';
     }
     $time_string = sprintf($time_string, esc_attr(get_the_date('c')), esc_html(get_the_date()), esc_attr(get_the_modified_date('c')), esc_html(get_the_modified_date()));
     $posted_on = sprintf(esc_html_x('%s', 'post date', 'square'), '<a href="' . esc_url(get_permalink()) . '" rel="bookmark">' . $time_string . '</a>');
     $byline = sprintf(esc_html_x('by %s', 'post author', 'square'), '<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>');
     $comment_count = get_comments_number();
     // get_comments_number returns only a numeric value
     if (comments_open()) {
         if ($comment_count == 0) {
             $comments = __('No Comments', 'square');
         } elseif ($comment_count > 1) {
             $comments = $comment_count . __(' Comments', 'square');
         } else {
             $comments = __('1 Comment', 'square');
         }
         $comment_link = '<a href="' . get_comments_link() . '">' . $comments . '</a>';
     } else {
         $comment_link = __(' Comment Closed', 'square');
     }
     echo '<span class="posted-on"><i class="fa fa-clock-o"></i>' . $posted_on . '</span><span class="byline"> ' . $byline . '</span><span class="comment-count"><i class="fa fa-comments-o"></i>' . $comment_link . "</span>";
     // WPCS: XSS OK.
 }
Example #2
0
 /**
  * Prints HTML with meta information for the current post-date/time and author.
  */
 function impronta_metadata()
 {
     // Hide category and tag text for pages.
     if ('post' === get_post_type()) {
         echo '<p class="metadata">';
         $byline = sprintf(esc_html_x('By %s', 'post author', 'impronta'), '<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 $byline;
         /* translators: used between list items, there is a space after the comma */
         $categories_list = get_the_category_list(esc_html__(', ', 'impronta'));
         if ($categories_list && impronta_categorized_blog()) {
             printf('<span class="cat-links">' . esc_html_x('on %1$s ', 'on categories', 'impronta') . '</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__(', ', 'impronta'));
         if ($tags_list) {
             printf(esc_html__('tagged %1$s', 'impronta'), $tags_list);
             // WPCS: XSS OK.
         }
         if (!is_single() && !post_password_required() && (comments_open() || get_comments_number())) {
             if (get_comments_number(get_the_id()) == 0) {
                 echo esc_html__('- ', 'impronta');
             } else {
                 echo esc_html__('with ', 'impronta');
             }
             comments_popup_link(esc_html__('Leave a comment', 'impronta'), esc_html__('1 Comment', 'impronta'), esc_html__('% Comments', 'impronta'));
         }
         if (is_sticky()) {
             echo ' - ' . '<i class="feature-star fa fa-star" data-toggle="tooltip" data-placement="right" title="' . esc_attr__('Featured Post', 'impronta') . '"></i>';
         }
         echo '</p>';
     }
 }
Example #3
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>');
 }
Example #4
0
/**
 * Registers sidebars.
 *
 * @since  1.0.0
 * @access public
 * @return void
 */
function vaidusworld_register_sidebars()
{
    hybrid_register_sidebar(array('id' => 'primary', 'name' => esc_html_x('Primary', 'sidebar', 'vaidusworld'), 'description' => esc_html__('Add sidebar description.', 'vaidusworld')));
    // hybrid_register_sidebar(
    // 	array(
    // 		'id'          => 'header-right',
    // 		'name'        => esc_html_x( 'Header Right', 'sidebar', 'vaidusworld' ),
    // 		'description' => esc_html__( 'Add sidebar description.', 'vaidusworld' )
    // 	)
    // );
    //
    // hybrid_register_sidebar(
    // 	array(
    // 		'id'          => 'footer-1',
    // 		'name'        => esc_html_x( 'Footer 1', 'sidebar', 'vaidusworld' ),
    // 		'description' => esc_html__( 'Add sidebar description.', 'vaidusworld' )
    // 	)
    // );
    //
    // hybrid_register_sidebar(
    // 	array(
    // 		'id'          => 'footer-2',
    // 		'name'        => esc_html_x( 'Footer 2', 'sidebar', 'vaidusworld' ),
    // 		'description' => esc_html__( 'Add sidebar description.', 'vaidusworld' )
    // 	)
    // );
    //
    // hybrid_register_sidebar(
    // 	array(
    // 		'id'          => 'footer-3',
    // 		'name'        => esc_html_x( 'Footer 3', 'sidebar', 'vaidusworld' ),
    // 		'description' => esc_html__( 'Add sidebar description.', 'vaidusworld' )
    // 	)
    // );
}
/**
 * Registers sidebars.
 *
 * @since  1.0.0
 * @access public
 * @return void
 */
function ubuntugnome_register_sidebars()
{
    hybrid_register_sidebar(array('id' => 'footer-1', 'name' => esc_html_x('Footer 1', 'sidebar', 'magik'), 'description' => esc_html__('Add sidebar description.', 'magik')));
    hybrid_register_sidebar(array('id' => 'footer-2', 'name' => esc_html_x('Footer 2', 'sidebar', 'magik'), 'description' => esc_html__('Add sidebar description.', 'magik')));
    hybrid_register_sidebar(array('id' => 'footer-3', 'name' => esc_html_x('Footer 3', 'sidebar', 'magik'), 'description' => esc_html__('Add sidebar description.', 'magik')));
    hybrid_register_sidebar(array('id' => 'footer-4', 'name' => esc_html_x('Footer 4', 'sidebar', 'magik'), 'description' => esc_html__('Add sidebar description.', 'magik')));
}
Example #6
0
 /**
  * Modify the output of the field on the fronted profile.
  *
  * @since 1.2.0
  * @param  string $value the value of the field.
  * @param  object $field field details.
  * @return string        the formatted field value.
  */
 public static function output_html($value, $field)
 {
     if ($value == '1') {
         $value = esc_html_x('Yes', 'Used when displaying the value of a checkbox field within the profile page.', 'wpaam');
     }
     return $value;
 }
Example #7
0
    /**
     * Prints HTML with meta information for the current post-date/time and author.
     */
    function river_radio_posted_on()
    {
        $time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
        if (get_the_time('U') !== get_the_modified_time('U')) {
            $time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>';
        }
        $time_string = sprintf($time_string, esc_attr(get_the_date('c')), esc_html(get_the_date()), esc_attr(get_the_modified_date('c')), esc_html(get_the_modified_date()));
        $posted_on = sprintf(esc_html_x('%s', 'post date', 'river-radio'), '<a href="' . esc_url(get_permalink()) . '" rel="bookmark">' . $time_string . '</a>');
        $byline = sprintf(esc_html_x('%s', 'post author', 'river-radio'), '<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 '<span class="byline icons"><i class="fa fa-headphones"></i>
 ' . $byline . '</span><span class="posted-on icons"><i class="fa fa-calendar"></i>
' . $posted_on . '</span>';
        // WPCS: XSS OK.
        if ('post' === get_post_type()) {
            $tags_list = get_the_tag_list('', esc_html__(', ', 'river-radio'));
            if ($tags_list) {
                printf('<span class="tags-links icons"><i class="fa fa-music"></i>
' . esc_html__('%1$s', 'river-radio') . '</span>  ', $tags_list);
                // WPCS: XSS OK.
            }
            $categories_list = get_the_category_list(esc_html__(', ', 'river-radio'));
            if ($categories_list && river_radio_categorized_blog()) {
                printf('<span class="cat-links icons"><i class="fa fa-map-marker"></i>
' . esc_html__('%1$s', 'river-radio') . '</span>', $categories_list);
                // WPCS: XSS OK.
            }
        }
    }
Example #8
0
 /**
  * Prints HTML with meta information for the current post-date/time and author.
  */
 function ocin_lite_metadata()
 {
     echo '<ul>';
     $time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
     if (get_the_time('U') !== get_the_modified_time('U')) {
         $time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>';
     }
     $time_string = sprintf($time_string, esc_attr(get_the_date('c')), esc_html(get_the_date()), esc_attr(get_the_modified_date('c')), esc_html(get_the_modified_date()));
     echo '<li class="meta_date">' . $time_string . '</li>';
     $byline = sprintf(esc_html_x('by %s', 'post author', 'ocin-lite'), '<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 '<li class="meta_comments">' . $byline . '</li>';
     if (!is_single() && !post_password_required() && (comments_open() || get_comments_number())) {
         echo '<li class="meta_date"><span class="comments-link">';
         comments_popup_link(esc_html__('Leave a comment', 'ocin-lite'), esc_html__('1 Comment', 'ocin-lite'), esc_html__('% Comments', 'ocin-lite'));
         echo '</span></li>';
     }
     // Hide category and tag text for pages.
     if ('post' === get_post_type() && is_single()) {
         /* translators: used between list items, there is a space after the comma */
         $categories_list = get_the_category_list(esc_html__(', ', 'ocin-lite'));
         if ($categories_list && ocin_lite_categorized_blog()) {
             printf('<li class="meta_categories"><span class="cat-links">' . esc_html__('Posted in %1$s', 'ocin-lite') . '</span></li>', $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__(', ', 'ocin-lite'));
         if ($tags_list) {
             printf('<li class="meta_tags"><span class="tags-links">' . esc_html__('Tagged %1$s', 'ocin-lite') . '</span></li>', $tags_list);
             // WPCS: XSS OK.
         }
     }
     echo '</ul>';
 }
Example #9
0
 /**
  * Adds the settings page to the Settings menu.
  *
  * @wp-hook admin_menu
  *
  * @return void
  */
 public function add()
 {
     $menu_title = esc_html_x('Taxonomies', 'Menu item title', 'linked-taxonomies');
     $capability = $this->settings_page->get_capability('list');
     $menu_slug = $this->settings_page->get_slug();
     add_options_page($this->title, $menu_title, $capability, $menu_slug, array($this, 'render'));
 }
    /**
     * Display Template List Table
     */
    public static function display_template_management_view()
    {
        self::run_management_actions();
        echo '<div class="wrap">';
        ?>

        <h2><?php 
        _e('Manage Templates', 'landing-pages');
        ?>
            <a href="edit.php?post_type=landing-page&page=lp_templates_upload"
               class="add-new-h2"><?php 
        echo esc_html_x('Add New Template', 'template');
        ?>
</a>
        </h2>
        <?php 
        $myListTable = new Landing_Pages_Templates_List_Table();
        $myListTable->prepare_items();
        ?>
        <form method="post">
            <input type="hidden" name="page" value="my_list_test"/>
            <?php 
        $myListTable->search_box('search', 'search_id');
        ?>
        </form>
        <form method="post" id='bulk_actions'>

        <?php 
        $myListTable->display();
        echo '</div></form>';
    }
Example #11
0
 /**
  * Prints HTML with meta information for the current post-date/time and author.
  */
 function jkl_index_posted_on()
 {
     $time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
     if (get_the_time('U') !== get_the_modified_time('U')) {
         $time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>';
     }
     $time_string = sprintf($time_string, esc_attr(get_the_date('c')), esc_html(get_the_date()), esc_attr(get_the_modified_date('c')), esc_html(get_the_modified_date()));
     $byline = sprintf(esc_html('%s'), '<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>');
     if ('chat' === get_post_format() || 'image' === get_post_format() || 'gallery' === get_post_format() || 'audio' === get_post_format() || 'video' === get_post_format()) {
         $string = ucwords(get_post_format());
         $posted_on = $string . ': <a href="' . esc_url(get_permalink()) . '" rel="bookmark">' . $time_string . '</a>';
     } else {
         $posted_on = sprintf(esc_html_x('Date: %s', 'post date', 'jkl'), '<a href="' . esc_url(get_permalink()) . '" rel="bookmark">' . $time_string . '</a>');
     }
     $meta_class = is_single() ? 'format-small-meta' : 'meta-content-index';
     echo '<div class="' . $meta_class . '">';
     echo '<span class="posted-on">' . $posted_on . '</span>';
     // WPCS: XSS OK.
     if (is_single()) {
         echo '<span class="byline">' . $byline . '</span>';
         if (!has_post_format('quote')) {
             jkl_better_taxonomy_listing('category', 1);
         }
     }
     echo '</div><!-- .meta-content-index -->';
 }
 /**
  * Prints HTML with meta information for the current post-date/time and author.
  */
 function pleiadesweb_posted_on()
 {
     // POSTED ON
     $time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
     if (get_the_time('U') !== get_the_modified_time('U')) {
         $time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>';
     }
     $time_string = sprintf($time_string, esc_attr(get_the_date('c')), esc_html(get_the_date()), esc_attr(get_the_modified_date('c')), esc_html(get_the_modified_date()));
     $posted_on = sprintf('<i class="fa fa-calendar"></i>' . esc_html_x(' %s', 'post date', 'pleiadesweb'), '<a href="' . esc_url(get_permalink()) . '" rel="bookmark">' . $time_string . '</a>');
     // AUTHOR
     $byline = sprintf(esc_html_x('| escrito por %s', 'post author', 'pleiadesweb'), '<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 '<span class="posted-on">' . $posted_on . '</span><span class="byline"> ' . $byline . '</span>';
     // CATEGORIES
     /* translators: used between list items, there is a space after the comma */
     $categories_list = get_the_category_list(esc_html__(', ', 'pleiadesweb'));
     if ($categories_list && pleiadesweb_categorized_blog()) {
         echo ' | </i><span class="category-list">' . $categories_list . '</span>';
     }
     // COMMENTS
     if (!post_password_required() && (comments_open() || '0' != get_comments_number())) {
         echo ' | <span class="comments-link">';
         comments_popup_link(__('Deja un comentario', 'my-simone'), __('1 comentario', 'my-simone'), __('% comentarios', 'my-simone'));
         echo '</span>';
     }
     //!post_password_required()
 }
 /**
  * Prints HTML with meta information for the current post-date/time and author.
  */
 function abc_nuorisotominta_posted_on()
 {
     $time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
     /*
     	if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
     		$time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>';
     	}
     */
     $time_string = sprintf($time_string, esc_attr(get_the_date('c')), esc_html(get_the_date()), esc_attr(get_the_modified_date('c')), esc_html(get_the_modified_date()));
     $posted_on = sprintf(esc_html_x('Опубликовано %s', 'post date', 'abc-nuorisotominta'), '<a href="' . esc_url(get_permalink()) . '" rel="bookmark">' . $time_string . '</a>');
     /*
     	$posted_on = sprintf(
     		esc_html_x( 'Posted on %s', 'post date', 'abc-nuorisotominta' ),
     		'<a href="' . esc_url( get_permalink() ) . '" rel="bookmark">' . $time_string . '</a>'
     	);
     */
     /*
     	$byline = sprintf(
     		esc_html_x( 'by %s', 'post author', 'abc-nuorisotominta' ),
     		'<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 '<span class="posted-on">' . $posted_on . '</span><span class="byline"> ' . $byline . '</span>';
     // WPCS: XSS OK.
 }
Example #14
0
/**
 * Registers sidebars.
 *
 * @since  1.0.0
 * @access public
 * @return void
 */
function magik_register_sidebars()
{
    hybrid_register_sidebar(array('id' => 'primary', 'name' => esc_html_x('Primary', 'sidebar', 'magik'), 'description' => esc_html__('Add sidebar description.', 'magik')));
    hybrid_register_sidebar(array('id' => 'footer-1', 'name' => esc_html_x('Footer 1', 'sidebar', 'magik'), 'description' => esc_html__('Add sidebar description.', 'magik')));
    hybrid_register_sidebar(array('id' => 'footer-2', 'name' => esc_html_x('Footer 2', 'sidebar', 'magik'), 'description' => esc_html__('Add sidebar description.', 'magik')));
    hybrid_register_sidebar(array('id' => 'footer-3', 'name' => esc_html_x('Footer 3', 'sidebar', 'magik'), 'description' => esc_html__('Add sidebar description.', 'magik')));
}
Example #15
0
 /**
  * Prints HTML with meta information for the current post-date/time and author.
  */
 function usbasske_posted_on()
 {
     $time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
     if (get_the_time('U') !== get_the_modified_time('U')) {
         $time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>';
     }
     $time_string = sprintf($time_string, esc_attr(get_the_date('c')), esc_html(get_the_date()), esc_attr(get_the_modified_date('c')), esc_html(get_the_modified_date()));
     $posted_on = sprintf(esc_html_x('Posted on %s', 'post date', 'usbasske'), '<a href="' . esc_url(get_permalink()) . '" rel="bookmark">' . $time_string . '</a>');
     $byline = sprintf(esc_html_x('by %s', 'post author', 'usbasske'), '<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>');
     // Display the author avatar if the author has a Gravatar
     $author_id = get_the_author_meta('ID');
     if (usbasske_validate_gravatar($author_id)) {
         echo '<div class="meta-content has-avatar">';
         echo '<div class="author-avatar">' . get_avatar($author_id) . '</div>';
     } else {
         echo '<div class="meta-content">';
     }
     echo '<span class="byline"> ' . $byline . '</span><span class="posted-on">' . $posted_on . '</span>';
     // WPCS: XSS OK.
     if (!post_password_required() && (comments_open() || get_comments_number())) {
         echo '<span class="comments-link">';
         comments_popup_link(esc_html__('Leave a comment', 'usbasske'), esc_html__('1 Comment', 'usbasske'), esc_html__('% Comments', 'usbasske'));
         echo '</span>';
     }
     echo '</div><!-- .meta-content -->';
 }
Example #16
0
/**
 * Prints HTML with meta information for the current post-date/time and author.
 */
function bemmy_posted_on()
{
    $byline = sprintf(esc_html_x('%s', 'post author', 'bemmy'), '<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>');
    $posted_in = '';
    // Hide category and tag text for pages.
    if ('post' === get_post_type()) {
        /* translators: used between list items, there is a space after the comma */
        $tags_list = get_the_tag_list('', esc_html__(', ', 'bemmy'));
        if ($tags_list) {
            $posted_in .= sprintf(' on <span class="tags-links">' . esc_html__(' %1$s', 'bemmy') . '</span>', $tags_list);
            // WPCS: XSS OK.
        }
        /* translators: used between list items, there is a space after the comma */
        $categories_list = get_the_category_list(esc_html__(', ', 'bemmy'));
        if ($categories_list && bemmy_categorized_blog()) {
            $posted_in .= sprintf(' <span class="cat-links">' . esc_html__(' in %1$s', 'bemmy') . '</span>', $categories_list);
            // WPCS: XSS OK.
        }
    }
    echo '<span class="artcile__meta-byline"> ' . $byline . '</span><span class="article__meta-in">' . $posted_in . '</span>';
    // WPCS: XSS OK.
    $time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
    if (get_the_time('U') !== get_the_modified_time('U')) {
        $time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>';
    }
    $time_string = sprintf($time_string, esc_attr(get_the_date('c')), esc_html(get_the_date()), esc_attr(get_the_modified_date('c')), esc_html(get_the_modified_date()));
    $posted_on = sprintf('<span class="sep"> | </span>' . esc_html_x(' %s', 'post date', 'bemmy'), '<a href="' . esc_url(get_permalink()) . '" rel="bookmark">' . $time_string . '</a>');
    echo $posted_on;
}
Example #17
0
 /**
  * Prints HTML with meta information for the current post-date/time and author.
  */
 function munsa_lite_posted_on()
 {
     // Set up entry date.
     printf('<span class="entry-date"><span class="screen-reader-text">%1$s </span><a href="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s" ' . hybrid_get_attr('entry-published') . '>%4$s</time></a></span>', esc_html_x('Posted on', 'Used before publish date.', 'munsa-lite'), esc_url(get_permalink()), esc_attr(get_the_date('c')), esc_html(get_the_date()));
     // Set up byline.
     printf('<span class="byline"><span class="entry-author" ' . hybrid_get_attr('entry-author') . '><span class="screen-reader-text">%1$s </span><a class="entry-author-link" href="%2$s" rel="author" itemprop="url"><span itemprop="name">%3$s</span></a></span></span>', esc_html_x('Author', 'Used before post author name.', 'munsa-lite'), esc_url(get_author_posts_url(get_the_author_meta('ID'))), get_the_author());
 }
 /**
  * Prints HTML with meta information for the current post-date/time and author.
  */
 function i4_lms_posted_on()
 {
     $time_string = '<time class="announcement-posted-date published" datetime="%1$s">%2$s</time>';
     $time_string = sprintf($time_string, esc_attr(get_the_date('c')), esc_html(get_the_date()), esc_attr(get_the_date('c')), esc_html(get_the_date()));
     $posted_on = sprintf(esc_html_x('%s', 'post date', 'i4web'), '<a href="' . esc_url(get_permalink()) . '" rel="bookmark">' . $time_string . '</a>');
     return $time_string;
     // WPCS: XSS OK.
 }
 public function __construct()
 {
     $widget_ops = array('classname' => 'barcelona-widget-slider-posts', 'description' => esc_html_x('Displays the specified posts as a slider', 'Slider Posts widget description', 'barcelona'));
     parent::__construct('barcelona-slider-posts', sprintf(esc_html_x('%s Slider Posts', 'Slider Posts widget name', 'barcelona'), BARCELONA_THEME_NAME), $widget_ops);
     add_action('save_post', array($this, 'flush_widget_cache'));
     add_action('deleted_post', array($this, 'flush_widget_cache'));
     add_action('switch_theme', array($this, 'flush_widget_cache'));
 }
 /**
  * Load JS scripts.
  */
 public function load_scripts()
 {
     $min = defined('SCRIPT_DEBUG') && true === SCRIPT_DEBUG ? '' : '.min';
     wp_enqueue_script('wpml_tm_translate_independently', WPML_TM_TRANSLATE_INDEPENDENTLY_URL . "/assets/js/wpml_tm_translate_independently{$min}.js", array('jquery'), WPML_TM_TRANSLATE_INDEPENDENTLY_VERSION);
     $message = esc_html_x('You are about to translate duplicated posts.', '1/2 Confirm to disconnect duplicates', 'sitepress') . "\n";
     $message .= esc_html_x('These items will be automatically disconnected from originals, so translation is not lost when you update the originals.', '2/2 Confirm to disconnect duplicates', 'sitepress');
     wp_localize_script('wpml_tm_translate_independently', 'wpml_tm_translate_independently', array('message' => $message));
 }
 public function __construct()
 {
     $widget_ops = array('classname' => 'barcelona-widget-posts', 'description' => esc_html_x('Displays the posts with more stylish way', 'Posts widget description', 'barcelona'));
     parent::__construct('barcelona-recent-posts', sprintf(esc_html_x('%s Posts', 'Posts widget name', 'barcelona'), BARCELONA_THEME_NAME), $widget_ops);
     add_action('save_post', array($this, 'flush_widget_cache'));
     add_action('deleted_post', array($this, 'flush_widget_cache'));
     add_action('switch_theme', array($this, 'flush_widget_cache'));
 }
Example #22
0
/**
 * Displays a taxonomy dropdown box metabox
 *
 * @param \WP_Post $post The currently edited post
 * @param array $metabox Contains args from the add_meta_box func. Important one: pass in a Taxonomy object.
 */
function create_taxonomy_dropdown_metabox($post, $metabox)
{
    $taxonomy = $metabox['args']['taxonomy'];
    //bail if invalid taxonomy or not an object
    if (!is_object($taxonomy) || is_object($taxonomy) && !get_taxonomy($taxonomy->name)) {
        return;
    }
    // uses same noncename as default box so no save_post hook needed
    wp_nonce_field('taxonomy_' . $taxonomy->name, 'taxonomy_noncename');
    // get terms associated with this post
    $names = get_the_terms(get_the_ID(), $taxonomy->name);
    // get all terms in this taxonomy
    $terms = (array) get_terms($taxonomy->name, 'hide_empty=0');
    if (!$terms) {
        echo '<p>' . sprintf(esc_html_x('No %s created.', 'When no terms are present, i.e. "No publications created."', 'eight-day-week'), esc_html($taxonomy->labels->name)) . '</p>';
        return;
    }
    // filter the ids out of the terms
    $existing = !is_wp_error($names) && !empty($names) ? (array) wp_list_pluck($names, 'term_id') : [];
    // Check if taxonomy is hierarchical
    // Terms are saved differently between types
    $h = $taxonomy->hierarchical;
    // default value
    $default_val = $h ? 0 : '';
    // input name
    $name = $h ? 'tax_input[' . $taxonomy->name . '][]' : 'tax_input[' . $taxonomy->name . ']';
    $default_text = sprintf(_x('No %s', 'Provides a select option for choosing "no" term.', 'eight-day-week'), esc_html($taxonomy->labels->singular_name));
    $select = '';
    $selected_term = false;
    $select .= '<select name="' . esc_attr($name) . '" id="' . esc_attr($taxonomy->name) . '_dropdownlist">';
    if (count($terms) > 1) {
        //default option
        $select .= '<option value="' . esc_attr($default_val) . '"';
        $select .= esc_attr(selected(empty($existing), true, false));
        $select .= '>' . esc_html($default_text) . '</option>';
    }
    // loop terms and check if they're associated with this post
    if ($terms) {
        foreach ($terms as $term) {
            $val = $h ? $term->term_id : $term->slug;
            $select .= '<option value="' . absint($val) . '"';
            // if so, they get "checked"
            $selected = !empty($existing) && in_array((int) $term->term_id, $existing) || count($terms) <= 1;
            $select .= selected($selected, true, false);
            $select .= '> ' . esc_html($term->name) . '</option>';
            //this is used for print prod users
            if ($selected) {
                $selected_term = $term->name;
            }
        }
    }
    $select .= '</select>';
    if (User\current_user_can_edit_print_issue()) {
        echo wp_kses($select, ['option' => ['value' => [], 'selected' => []], 'select' => ['name' => [], 'id' => []]]);
    } else {
        echo '<p> ' . esc_html($selected_term ? $selected_term : $default_text) . '</p>';
    }
}
 public function print_totals()
 {
     $total_checked_in_label = esc_html_x('Checked in:', 'attendee summary', 'event-tickets');
     $total_deleted_label = esc_html_x('Deleted Attendees:', 'attendee summary', 'event-tickets');
     $total_checked_in = $this->get_total_checked_in();
     $total_deleted = $this->get_total_deleted();
     $deleted_list_item = $total_deleted ? "<li> <strong>{$total_deleted_label}</strong> {$total_deleted} </li>" : '';
     echo "\n\t\t\t<ul>\n\t\t\t\t<li> <strong>{$total_checked_in_label}</strong> {$total_checked_in} </li>\n\t\t\t\t{$deleted_list_item}\n\t\t\t</ul>\n\t\t";
 }
Example #24
0
 /**
  * Prints HTML with meta information author , post link, comments
  */
 function solus_home_footer()
 {
     $post_link = "<span class='home-post-link'><a class='read_more_link' href='" . get_the_permalink() . "'>Read More</a></span>";
     $author = sprintf(esc_html_x('by %s', 'post author', 'solus'), '<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 $post_link . '<span class="home_author">' . $author . '</span>';
     echo '<span class="comments-link">';
     comments_popup_link(esc_html__('Leave a comment', 'solus'), esc_html__('1 Comment', 'solus'), esc_html__('% Comments', 'solus'));
     echo '</span>';
 }
Example #25
0
 /**
  * Prints HTML with meta information for the current post-date/time and author.
  */
 function square_one_posted_on()
 {
     $time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
     $time_string = sprintf($time_string, esc_attr(get_the_date('c')), esc_html(get_the_date()), esc_attr(get_the_modified_date('c')), esc_html(get_the_modified_date()));
     $posted_on = sprintf(esc_html_x('Posted on %s', 'post date', 'square-one'), '<a href="' . esc_url(get_permalink()) . '" rel="bookmark">' . $time_string . '</a>');
     $byline = sprintf(esc_html_x('by %s', 'post author', 'square-one'), '<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 '<span class="posted-on">' . $posted_on . '</span><span class="byline"> ' . $byline . '</span>';
     // WPCS: XSS OK.
 }
 public static function enqueue_js()
 {
     wp_enqueue_script('wpml-tm-translation-basket-and-options', WPML_TM_URL . '/res/js/translation-basket-and-options.js', array('wpml-tm-scripts', 'jquery-ui-progressbar'), WPML_TM_VERSION);
     $message = esc_html_x('You are about to translate duplicated posts.', '1/2 Confirm to disconnect duplicates', 'sitepress') . "\n";
     $message .= esc_html_x('These items will be automatically disconnected from originals, so translation is not lost when you update the originals.', '2/2 Confirm to disconnect duplicates', 'sitepress');
     $tm_basket_data = array('nonce' => array(), 'strings' => array('done_msg' => __("Done! ", 'wpml-translation-management'), 'jobs_committed' => sprintf(__("<p>Jobs committed...</p><p>You can check current status of this job in  <a href='%s'>Translation Jobs tab</a>.</p>", 'wpml-translation-management'), admin_url('admin.php?page=' . WPML_TM_FOLDER . '/menu/main.php&sm=jobs')), 'jobs_committing' => __('Committing jobs...', 'wpml-translation-management'), 'error_occurred' => __('An error occurred:', 'wpml-translation-management'), 'error_not_allowed' => __('You are not allowed to run this action.', 'wpml-translation-management'), 'batch' => __('Batch', 'wpml-translation-management'), 'error_no_translators' => __('No selected translators!', 'wpml-translation-management'), 'rollbacks' => __('Rollback jobs...', 'wpml-translation-management'), 'rolled' => __('Batch rolled back', 'wpml-translation-management'), 'errors' => __('Errors:', 'wpml-translation-management')), 'tmi_message' => $message);
     $tm_basket_data = apply_filters('translation_basket_and_options_js_data', $tm_basket_data);
     wp_localize_script('wpml-tm-translation-basket-and-options', 'tm_basket_data', $tm_basket_data);
     wp_enqueue_script('wpml-tm-translation-basket-and-options');
 }
Example #27
0
 function receptar_theme_options_array($options = array())
 {
     //Preparing output
     /**
      * Theme customizer options array
      */
     $options = array(100 . 'colors' => array('id' => 'colors', 'type' => 'section', 'create_section' => esc_html_x('Colors', 'Customizer section title.', 'receptar'), 'in_panel' => esc_html_x('Theme', 'Customizer panel title.', 'receptar'), 'in_panel-description' => '<h3>' . esc_html__('Theme Credits', 'receptar') . '</h3><p class="description">' . sprintf(esc_html_x('%1$s is free WordPress theme developed by %2$s. You can obtain other professional WordPress themes at %3$s. Thank you for using this awesome theme!', '1: linked theme name, 2: theme author name, 3: theme author link.', 'receptar'), '<a href="' . esc_url(wp_get_theme()->get('ThemeURI')) . '" target="_blank"><strong>' . esc_html(wp_get_theme()->get('Name')) . '</strong></a>', esc_html(wp_get_theme()->get('Author')), '<strong><a href="' . esc_url(wp_get_theme()->get('AuthorURI')) . '" target="_blank">' . esc_html(wp_get_theme()->get('AuthorURI')) . '</a></strong>') . '</p>' . '<p><a href="' . esc_url(wp_get_theme()->get('ThemeURI')) . '#donate" class="donation-link" target="_blank">' . esc_html__('Donate', 'receptar') . '</a></p>'), 100 . 'colors' . 100 => array('type' => 'theme-customizer-html', 'content' => '<h3>' . esc_html__('Accent color', 'receptar') . '</h3>'), 100 . 'colors' . 110 => array('type' => 'color', 'id' => 'color' . '-accent', 'label' => esc_html__('Accent color', 'receptar'), 'description' => esc_html__('This color affects links, buttons and other elements of the website', 'receptar'), 'default' => '#e53739'), 100 . 'colors' . 120 => array('type' => 'color', 'id' => 'color' . '-accent-text', 'label' => esc_html__('Accent text color', 'receptar'), 'description' => esc_html__('Color of text over accent color background', 'receptar'), 'default' => '#ffffff'), 100 . 'colors' . 200 => array('type' => 'theme-customizer-html', 'content' => '<h3>' . esc_html__('Header', 'receptar') . '</h3>'), 100 . 'colors' . 210 => array('type' => 'color', 'id' => 'color' . '-header-background', 'label' => esc_html__('Background color', 'receptar'), 'default' => '#2a2c2e'), 100 . 'colors' . 220 => array('type' => 'color', 'id' => 'color' . '-header-text', 'label' => esc_html__('Text color', 'receptar'), 'default' => '#ffffff'), 100 . 'colors' . 300 => array('type' => 'theme-customizer-html', 'content' => '<h3>' . esc_html__('Sidebar', 'receptar') . '</h3>'), 100 . 'colors' . 310 => array('type' => 'color', 'id' => 'color' . '-sidebar-background', 'label' => esc_html__('Background color', 'receptar'), 'default' => '#1a1c1e'), 100 . 'colors' . 320 => array('type' => 'color', 'id' => 'color' . '-sidebar-text', 'label' => esc_html__('Text color', 'receptar'), 'default' => '#9a9c9e'), 100 . 'colors' . 330 => array('type' => 'color', 'id' => 'color' . '-sidebar-headings', 'label' => esc_html__('Headings color', 'receptar'), 'default' => '#ffffff'), 100 . 'colors' . 340 => array('type' => 'color', 'id' => 'color' . '-sidebar-border', 'label' => esc_html__('Borders color', 'receptar'), 'default' => '#3a3c3e'), 100 . 'colors' . 400 => array('type' => 'theme-customizer-html', 'content' => '<h3>' . esc_html__('Content', 'receptar') . '</h3>'), 100 . 'colors' . 410 => array('type' => 'color', 'id' => 'color' . '-content-background', 'label' => esc_html__('Background color', 'receptar'), 'default' => '#ffffff'), 100 . 'colors' . 420 => array('type' => 'color', 'id' => 'color' . '-content-text', 'label' => esc_html__('Text color', 'receptar'), 'default' => '#6a6c6e'), 100 . 'colors' . 430 => array('type' => 'color', 'id' => 'color' . '-content-headings', 'label' => esc_html__('Headings color', 'receptar'), 'default' => '#1a1c1e'), 100 . 'colors' . 440 => array('type' => 'color', 'id' => 'color' . '-content-border', 'label' => esc_html__('Borders color', 'receptar'), 'default' => '#eaecee'), 100 . 'colors' . 450 => array('type' => 'theme-customizer-html', 'content' => '<h4>' . esc_html__('Alternative colors', 'receptar') . '</h4>'), 100 . 'colors' . 460 => array('type' => 'color', 'id' => 'color' . '-content-alt-background', 'label' => esc_html__('Background color', 'receptar'), 'default' => '#2a2c2e'), 100 . 'colors' . 470 => array('type' => 'color', 'id' => 'color' . '-content-alt-text', 'label' => esc_html__('Text color', 'receptar'), 'default' => '#9a9c9e'), 100 . 'colors' . 480 => array('type' => 'color', 'id' => 'color' . '-content-alt-headings', 'label' => esc_html__('Headings color', 'receptar'), 'default' => '#ffffff'), 100 . 'colors' . 490 => array('type' => 'color', 'id' => 'color' . '-content-alt-border', 'label' => esc_html__('Borders color', 'receptar'), 'default' => '#3a3c3e'), 100 . 'colors' . 800 => array('type' => 'theme-customizer-html', 'content' => '<h3>' . esc_html__('Footer', 'receptar') . '</h3>'), 100 . 'colors' . 810 => array('type' => 'color', 'id' => 'color' . '-footer-background', 'label' => esc_html__('Background color', 'receptar'), 'default' => '#f5f7f9'), 100 . 'colors' . 820 => array('type' => 'color', 'id' => 'color' . '-footer-text', 'label' => esc_html__('Text color', 'receptar'), 'default' => '#9a9c9e'), 200 . 'fonts' => array('id' => 'fonts', 'type' => 'section', 'create_section' => esc_html_x('Fonts', 'Customizer section title.', 'receptar'), 'in_panel' => esc_html_x('Theme', 'Customizer panel title.', 'receptar')), 200 . 'fonts' . 100 => array('type' => 'theme-customizer-html', 'content' => '<p class="description">' . sprintf(esc_html_x('This theme does not restrict you to a predefined set of fonts. Please use any font service (such as %s) plugin you want and set the plugin according to the information below.', '%s is replaced with linked examples of web fonts libraries such as Google Fonts or Adobe Typekit.', 'receptar'), '<a href="http://www.google.com/fonts" target="_blank"><strong>Google Fonts</strong></a>, <a href="https://typekit.com/fonts" target="_blank"><strong>Adobe Typekit</strong></a>') . '</p>' . '<p>' . esc_html__('List of CSS selectors for predefined theme font sets:', 'receptar') . '</p>' . '<ol>' . '<li><strong>' . esc_html_x('Texts:', 'CSS selector group name.', 'receptar') . '</strong><br />' . '<code>html</code>' . '</li>' . '<li><strong>' . esc_html_x('Headings:', 'CSS selector group name.', 'receptar') . '</strong><br />' . '<code>h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6, .entry-category, .entry-title .entry-edit</code>' . '</li>' . '<li><strong>' . esc_html_x('Logo:', 'CSS selector group name.', 'receptar') . '</strong><br />' . '<code>h1, .h1, blockquote</code>' . '</li>' . '</ol>' . '<p>' . sprintf(esc_html__('By default the theme uses %1$s font for texts, %2$s font for headings and %3$s font for logo.', 'receptar'), '<a href="http://www.google.com/fonts/specimen/Roboto" target="_blank">Roboto</a>', '<a href="https://www.google.com/fonts/specimen/Roboto+Condensed" target="_blank">Roboto Condensed</a>', '<a href="http://www.google.com/fonts/specimen/Alegreya" target="_blank">Alegreya</a>') . '</p>'));
     //Output
     return apply_filters('wmhook_receptar_theme_options_array_output', $options);
 }
Example #28
0
 /**
  * Prints HTML with meta information for the current post-date/time and author.
  */
 function knight_wallace_posted_on()
 {
     $time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
     if (get_the_time('U') !== get_the_modified_time('U')) {
         $time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>';
     }
     $time_string = sprintf($time_string, esc_attr(get_the_date('c')), esc_html(get_the_date()), esc_attr(get_the_modified_date('c')), esc_html(get_the_modified_date()));
     $posted_on = sprintf(esc_html_x('%s', 'post date', 'knight_wallace'), '<a href="' . esc_url(get_permalink()) . '" rel="bookmark">' . $time_string . '</a>');
     echo '<span class="posted-on">' . $posted_on . '</span>';
     // WPCS: XSS OK.
 }
 /**
  * Prints HTML with meta information for the current post-date/time and author.
  */
 function the_minimal_posted_on()
 {
     $time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
     $time_string = sprintf($time_string, esc_attr(get_the_date('c')), esc_html(get_the_date('F jS, Y')));
     $posted_on = sprintf(esc_html_x('%s', 'post date', 'the-minimal'), '<a href="' . esc_url(get_permalink()) . '" rel="bookmark">' . $time_string . '</a>');
     $byline = sprintf(esc_html_x('%s', 'post author', 'the-minimal'), '<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>');
     $comment_count = sprintf(_nx('1 Comment', '%1$s Comments', get_comments_number(), 'comments title', 'the-minimal'), number_format_i18n(get_comments_number()));
     $comment = sprintf(esc_html_x('%s', 'post comment', 'the-minimal'), '<a href="' . esc_url(get_permalink()) . '" rel="bookmark">' . $comment_count . '</a>');
     echo '<span class="date">' . $posted_on . '</span><span class="name">' . $byline . '</span><span class="comments">' . $comment . '</span>';
     // WPCS: XSS OK.
 }
 /**
  * Prints HTML with meta information for the current post-date/time and author.
  */
 function reddit_posted_on()
 {
     $time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
     if (get_the_time('U') !== get_the_modified_time('U')) {
         $time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>';
     }
     $time_string = sprintf($time_string, esc_attr(get_the_date('c')), esc_html(get_the_date()), esc_attr(get_the_modified_date('c')), esc_html(get_the_modified_date()));
     $posted_on = sprintf(esc_html_x('%s', 'post date', 'reddit'), '' . $time_string . '');
     echo '<span class="posted-on">' . $posted_on . '</span><span class="byline"> ' . $byline . '</span>';
     // WPCS: XSS OK.
 }