__( 'WPLOOK Main Navigation', 'wplook' ),) ); } add_action( 'init', 'register_my_menus' ); wp_create_nav_menu( 'WPLOOK Main Menu', array( 'slug' => 'primary' ) ); // The default header text color define( 'HEADER_TEXTCOLOR', '666' ); // By leaving empty, we allow for random image rotation. define( 'HEADER_IMAGE', '' ); // The height and width of your custom header. // Add a filter to wplook_header_image_width and wplook_header_image_height to change these values. define( 'HEADER_IMAGE_WIDTH', apply_filters( 'wplook_header_image_width', 960 ) ); define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'wplook_header_image_height', 200 ) ); // We'll be using post thumbnails for custom header images on posts and pages. // We want them to be the size of the header image that we just defined // Larger images will be auto-cropped to fit, smaller ones will be ignored. See header.php. set_post_thumbnail_size( HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT, true ); // Add custom image sizes add_image_size( 'large-feature', HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT, true ); // Used for large feature (header) images // Turn on random header image rotation by default. add_theme_support( 'custom-header', array( 'random-default' => true ) ); // Add a way for the custom header to be styled in the admin panel that controls // custom headers. See wplook_admin_header_style(), below. add_custom_image_header( 'wplook_header_style', 'wplook_admin_header_style', 'wplook_admin_header_image' ); // Default custom headers packaged with the theme. %s is a placeholder for the theme template directory URI. register_default_headers( array( 'ipad' => array( 'url' => '%s/images/headers/ipad.jpg', 'thumbnail_url' => '%s/images/headers/ipad-thumbnail.jpg', /* translators: header image description */ 'description' => __( 'iPad', 'wplook' ) ) ) ); } endif; if ( ! function_exists( 'wplook_header_style' ) ) : /** * Styles the header image and text displayed on the blog */ function wplook_header_style() { // If no custom options for text are set, let's bail // get_header_textcolor() options: HEADER_TEXTCOLOR is default, hide text (returns 'blank') or any hex value if ( HEADER_TEXTCOLOR == get_header_textcolor() ) return; // If we get this far, we have custom styles. Let's do this. ?> Header admin panel. * Referenced via add_custom_image_header() in wplook_setup(). */ function wplook_admin_header_style() { ?> Header admin panel. * Referenced via add_custom_image_header() in wplook_setup(). */ function wplook_admin_header_image() { ?>
max_num_pages > 1 ) : ?> '; wp_widget_rss_output(array( 'url' => 'http://feeds.feedburner.com/wplook', 'title' => 'wplook news', 'items' => 5, 'show_summary' => 1, 'show_author' => 0, 'show_date' => 0 )); echo ''; } function wplook_get_date() { the_time(get_option('date_format')); } function wplook_get_time() { the_time(get_option('time_format')); } function wplook_get_date_time() { the_time(get_option('date_format')); _e(' at ', 'wplook'); the_time(get_option('time_format'));} //sidebar function wpl_sidebar_add_custom_box() { add_meta_box('wpl_sidebar', 'Sidebars', 'wpl_sidebars_custom_box','page', 'side', 'high'); add_meta_box('wpl_sidebar', 'Sidebars', 'wpl_sidebars_custom_box','post', 'side', 'high'); } /* Use the admin_menu action to define the custom boxes */ add_action('admin_menu', 'wpl_sidebar_add_custom_box'); /* prints the custom field in the new custom post section */ function wpl_sidebars_custom_box() { //get post meta value global $post; $enable_sidebar = get_post_meta($post->ID,'wpl_enable_sidebar',true) ; ?>