'',
'before_widget' => '
',
'after_widget' => "\n",
'before_title' => '\n",
) );
// End Register Widgets
// Start Dynamic Copyright
if ( ! function_exists( 'bns_dynamic_copyright' ) ) {
function bns_dynamic_copyright() {
/* Get all posts */
$all_posts = get_posts( 'post_status=publish&order=ASC' );
/* Get first post */
$first_post = $all_posts[0];
/* Get date of first post */
$first_date = $first_post->post_date_gmt;
$first_year = substr( $first_date, 0, 4 );
if ( $first_year == '' ) {
$first_year = date( Y );
}
/* Display common footer copyright notice */
_e( 'Copyright © ', 'desk-mess-mirrored' );
/* Display first post year and current year */
if ( $first_year == date( 'Y' ) ) {
/* Only display current year if no posts in previous years */
echo date( 'Y' );
} else {
echo $first_year . "-" . date( 'Y' );
}
/* Display blog name from 'General Settings' page and link to site home page */
echo ' ' . get_bloginfo( 'name', 'display' ) .' ';
_e( 'All rights reserved.', 'desk-mess-mirrored' );
}
}
// End Dynamic Copyright
// Start Theme Version
if ( ! function_exists( 'bns_theme_version' ) ) {
function bns_theme_version () {
$theme_version = ''; /* Clear variable */
/* Get details of the theme / child theme */
$blog_css_url = get_stylesheet_directory() . '/style.css';
$my_theme_data = get_theme_data( $blog_css_url );
$parent_blog_css_url = get_template_directory() . '/style.css';
$parent_theme_data = get_theme_data( $parent_blog_css_url );
/* Create and append to string to be displayed */
$theme_version .= '
' . $my_theme_data['Name'] . ' v' . $my_theme_data['Version'];
if ( $blog_css_url != $parent_blog_css_url ) {
$theme_version .= __( ' a child of the ', 'desk-mess-mirrored' ) . $parent_theme_data['Name'] . ' v' . $parent_theme_data['Version'];
}
$theme_version .= __( ' theme from ', 'desk-mess-mirrored') . 'BuyNowShop.com.';
/* Display string */
echo $theme_version . '';
}
}
// End Theme Version
// Tell WordPress to run desk_mess_mirrored_setup() when the 'after_setup_theme' hook is run. */
add_action( 'after_setup_theme', 'desk_mess_mirrored_setup' );
if ( ! function_exists( 'desk_mess_mirrored_setup' ) ):
function desk_mess_mirrored_setup(){
// This theme uses post thumbnails
add_theme_support( 'post-thumbnails', array( 'post', 'page' ) );
// Add default posts and comments RSS feed links to head
add_theme_support( 'automatic-feed-links' );
// Add theme support for editor-style
add_editor_style();
// This theme allows users to set a custom background
add_custom_background();
// Add wp_nav_menu() custom menu support
function dmm_nav_menu() {
if ( function_exists( 'wp_nav_menu' ) )
wp_nav_menu( array(
'theme_location' => 'top-menu',
'fallback_cb' => 'dmm_list_pages'
) );
else
dmm_list_pages();
}
function dmm_list_pages() {
if ( is_home() || is_front_page() ) {
wp_list_pages( 'title_li=' );
} else { ?>
get_the_modified_date() ) {
echo ''; /* CSS wrapper for modified date details */
echo 'Last modified by ' . get_the_modified_author() . ' on ' . get_the_modified_date();
echo '
';
}
}
}
// End BNS Modified Post
// Set the content width based on the theme's design and stylesheet, see #main-blog element in style.css
if ( ! isset( $content_width ) ) $content_width = 580;
?>