__('Primary Sidebar', 'azulsilver'),
'id' => 'post-content',
'description' => ('Appear on Post Contents Only'),
'before_widget' => '
',
'after_widget' => '',
'before_title' => '',
));
register_sidebar(array(
'name' => __('Secondary Sidebar', 'azulsilver'),
'id' => 'page-content',
'description' => ('Appear on Page Contents Only'),
'before_widget' => '',
'after_widget' => '',
'before_title' => '',
));
register_sidebar(array(
'name' => __('Custom Sidebar', 'azulsilver'),
'id' => 'custom-content',
'description' => ('Appear on Custom Contents Only'),
'before_widget' => '',
'after_widget' => '',
'before_title' => '',
));
}
add_action('widgets_init', 'azulsilver_widget_sidebar_setup');
function azulsilver_metadata_posted_on_setup() {
printf( __( 'Posted on %2$s by %3$s', 'azulsilver' ), 'meta-prep meta-prep-author',
sprintf( '%3$s',
get_permalink(),
esc_attr( get_the_time() ),
get_the_date('m/d/Y')
),
sprintf( '%3$s',
get_author_posts_url( get_the_author_meta( 'ID' ) ),
esc_attr( sprintf( __( 'View all posts by %s', 'azulsilver' ), get_the_author() ) ),
get_the_author()
)
);
}
function azulsilver_metadata_posted_in_setup() {
// Retrieves tag list of current post, separated by commas.
$tag_list = get_the_tag_list( '', ', ' );
if ( $tag_list ) {
$posted_in = __( 'This entry was posted under %1$s. Tag: %2$s.', 'azulsilver' );
} elseif ( is_object_in_taxonomy( get_post_type(), 'category' ) ) {
$posted_in = __( 'This entry was posted in %1$s.', 'azulsilver' );
}
// Prints the string, replacing the placeholders.
printf(
$posted_in,
get_the_category_list( ', ' ),
$tag_list,
get_permalink(),
the_title_attribute( 'echo=0' )
);
}
?>