%2$s';
if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
$time_string = '';
}
$time_string = sprintf( $time_string,
esc_attr( get_the_date( DATE_W3C ) ),
esc_html( get_the_date() ),
esc_attr( get_the_modified_date( DATE_W3C ) ),
esc_html( get_the_modified_date() )
);
$posted_on = ' ' . $time_string . '';
echo '' . $posted_on . ''; // WPCS: XSS OK.
}
function newstore_post_comments(){
if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
echo '';
}
}
/**
* Prints HTML with meta information for the current author.
*/
function newstore_posted_by() {
$byline = ' ' . esc_html( get_the_author() ) . ' ';
echo ' ' . $byline . ' '; // WPCS: XSS OK.
}
function newstore_post_categories(){
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__( ', ', 'newstore' ) );
if ( $categories_list ) {
/* translators: 1: list of categories. */
printf( ' %1$s ', $categories_list ); // WPCS: XSS OK.
}
}
}
function newstore_post_tags(){
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_x( ', ', 'list item separator', 'newstore' ) );
if ( $tags_list ) {
/* translators: 1: list of tags. */
printf( ' %1$s ', $tags_list ); // WPCS: XSS OK.
}
}
}
function newstore_the_edit_link(){
edit_post_link(
sprintf(
wp_kses(
/* translators: %s: Name of current post. Only visible to screen readers */
__( ' %1$s Edit %2$s', 'newstore' ),
array(
'span' => array(
'class' => array(),
),
'i' => array(
'class' => array('fa', 'pencil'),
),
)
),
'',
get_the_title()
),
'',
''
);
}
$post_meta_arr = get_theme_mod( 'newstore_post_index_meta', array( 'posted_on', 'posted_by', 'post_comments', 'post_categories',) );
// print_r($post_meta_arr);
foreach ($post_meta_arr as $key => $meta_item) {
if(function_exists('newstore_'.$meta_item)) {
add_action('newstore_post_index_meta', 'newstore_'.$meta_item);
}
}
$post_meta_arr = get_theme_mod( 'newstore_index_entry_footer', array('post_tags', 'the_edit_link') );
foreach ($post_meta_arr as $key => $meta_item) {
if(function_exists('newstore_'.$meta_item)) {
add_action('newstore_index_entry_footer', 'newstore_'.$meta_item);
}
}
$post_meta_arr = get_theme_mod( 'newstore_post_single_meta', array( 'posted_on', 'post_comments', 'posted_by') );
foreach ($post_meta_arr as $key => $meta_item) {
if(function_exists('newstore_'.$meta_item)) {
add_action('newstore_post_single_meta', 'newstore_'.$meta_item);
}
}
$post_meta_arr = get_theme_mod( 'newstore_single_entry_footer', array( 'post_categories', 'post_tags', 'the_edit_link') );
foreach ($post_meta_arr as $key => $meta_item) {
if(function_exists('newstore_'.$meta_item)) {
add_action('newstore_single_entry_footer', 'newstore_'.$meta_item);
}
}