'0', 'title'=>'Select'); foreach ($categories as $cat) { if($cat->category_count == '0') { $posts_title = 'No posts!'; } elseif($cat->category_count == '1') { $posts_title = '1 post'; } else { $posts_title = $cat->category_count . ' posts'; } $categories_array[] = array('value'=> $cat->cat_ID, 'title'=> $cat->cat_name . ' ( ' . $posts_title . ' )'); } return $categories_array; } $options = array ( array( "type" => "open"), array( "name" => "Logo", "desc" => "Set logo image", "id" => $shortname."_logo", "std" => get_bloginfo('template_url') . "/images/logo.png", "type" =>"image_upload" ), array( "name" => "Rss", "desc" => "Show Rss", "id" => $shortname."_rss", "std" => "true", "type" => "checkbox"), array( "name" => "Facebook", "desc" => "Set Facebook link", "id" => $shortname."_facebook", "std" => "http://facebook.com/", "type" => "text"), array( "name" => "Twitter", "desc" => "Set Twitter link", "id" => $shortname."_twitter", "std" => "http://twitter.com/", "type" => "text"), array( "name" => "LinkedIn", "desc" => "Set LinkedIn link", "id" => $shortname."_linkedin", "std" => "http://linkedin.com/", "type" => "text"), array( "name" => "Youtube", "desc" => "Set Youtube link", "id" => $shortname."_youtube", "std" => "http://www.youtube.com/", "type" => "text"), array( "name" => "Copyright Image", "desc" => "Set copyright image", "id" => $shortname."_copyimg", "std" => get_bloginfo('template_url') . "/images/footer_logo.png", "type" =>"image_upload_2" ), array( "name" => "Copyright Text", "desc" => "Set copyright text", "id" => $shortname."_copytext", "std" => "", "type" => "text"), array( "name" => "Posted on", "desc" => "As example it will shows 'Posted on 12 january 2013'", "id" => $shortname."_postedon", "std" => "Posted on", "type" => "text"), array( "name" => "By", "desc" => "As example it will shows 'by admin'", "id" => $shortname."_by", "std" => "by", "type" => "text"), array( "type" => "close") ); function mytheme_add_admin() { global $themename, $shortname, $options; if ( $_GET['page'] == basename(__FILE__) ) { if ( 'save' == $_REQUEST['action'] ) { foreach ($options as $value) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } foreach ($options as $value) { if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } else { delete_option( $value['id'] ); } } echo ''; die; } } add_theme_page($themename." Theme Settings","Theme Settings", 'edit_themes', basename(__FILE__), 'mytheme_admin'); } function mytheme_admin_init() { global $themename, $shortname, $options; $get_theme_options = get_option($shortname . '_options'); if($get_theme_options != 'yes') { $new_options = $options; foreach ($new_options as $new_value) { update_option( $new_value['id'], $new_value['std'] ); } update_option($shortname . '_options', 'yes'); } } if(!function_exists('get_sidebars')) { function get_sidebars() { wp_initialize_the_theme_load(); get_sidebar(); } } function mytheme_admin() { global $themename, $shortname, $options; if ( $_REQUEST['saved'] ) echo '

Settings '.$themename.' saved.

'; ?>

Theme settings


__( 'Primary Menu', 'mytheme_menu' ), ) ); /** * Add support for the Aside and Gallery Post Formats */ add_theme_support( 'post-formats', array( 'aside', 'image', 'gallery' ) ); // This theme styles the visual editor with editor-style.css to match the theme style. add_editor_style(); add_theme_support( 'post-thumbnails' ); $args = array( 'default-image' => '', 'random-default' => false, 'width' => 0, 'height' => 0, 'flex-height' => false, 'flex-width' => false, 'default-text-color' => '', 'header-text' => true, 'uploads' => true, 'wp-head-callback' => '', 'admin-head-callback' => '', 'admin-preview-callback' => '', ); add_theme_support( 'custom-header', $args ); $args = array( 'default-color' => '', 'default-image' => '', 'wp-head-callback' => '_custom_background_cb', 'admin-head-callback' => '', 'admin-preview-callback' => '' ); add_theme_support( 'custom-background', $args ); } endif; // theme_setup add_action( 'after_setup_theme', 'mytheme_setup' ); /** * Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link. */ if ( ! function_exists( 'mytheme_main_nav' ) ) : function mytheme_main_nav() { // display the wp menu if available wp_nav_menu( array( 'menu' => 'primary', /* menu name */ 'theme_location' => 'primary', /* where in the theme it's assigned */ 'container_class' => 'menu', /* container class */ 'fallback_cb' => 'mytheme_main_nav_fallback' /* menu fallback */ ) ); } endif; if ( ! function_exists( 'mytheme_main_nav_fallback' ) ) : function mytheme_main_nav_fallback() { wp_page_menu( 'show_home=Home&menu_class=menu' ); } endif; function mytheme_page_menu_args( $args ) { $args['show_home'] = 'Home'; return $args; } add_filter( 'wp_page_menu_args', 'mytheme_page_menu_args' ); /** * Search form. */ function mytheme_search_form($form) { $form = '
'; return $form; } add_filter('get_search_form', 'mytheme_search_form'); function pinboard_theme_setup() { // Set default content width based on the theme's layout. This affects the width of post images and embedded media. global $content_width; if( ! isset( $content_width ) ) $content_width = 900; } add_action( 'after_setup_theme', 'bluewaves_setup' ); add_filter( 'avatar_defaults', 'custom_gravatars' ); function custom_gravatars ( $avatar_defaults ) { $customGravatar = get_template_directory_uri().'/images/get_avatar.png'; $avatar_defaults[$customGravatar] = 'Default'; return $avatar_defaults; } if ( ! function_exists( 'bluewaves_setup' ) ): function bluewaves_setup() { // This theme styles the visual editor with editor-style.css to match the theme style. add_editor_style(); // This theme uses post thumbnails add_theme_support( 'post-thumbnails' ); // Add default posts and comments RSS feed links to head add_theme_support( 'automatic-feed-links' ); // Make theme available for translation // Translations can be filed in the /languages/ directory load_theme_textdomain( 'bluewaves', get_template_directory() . '/languages' ); // This theme uses wp_nav_menu() in one location. register_nav_menus( array( 'primary' => __( 'Primary Navigation', 'bluewaves' ), ) ); } endif; if ( ! function_exists( 'bluewaves_admin_header_style' ) ) : /** * Styles the header image displayed on the Appearance > Header admin panel. * * Referenced via add_custom_image_header() in bluewaves_setup(). */ function bluewaves_admin_header_style() { ?> ' . __( 'Continue reading ', 'bluewaves' ) . ''; }*/ /** * Replaces "[...]" (appended to automatically generated excerpts) with an ellipsis and bluewaves_continue_reading_link(). * * To override this in a child theme, remove the filter and add your own * function tied to the excerpt_more filter hook. * @return string An ellipsis */ /*function bluewaves_auto_excerpt_more( $more ) { return ' …' . bluewaves_continue_reading_link(); } add_filter( 'excerpt_more', 'bluewaves_auto_excerpt_more' ); */ /** * Adds a pretty "Continue Reading" link to custom post excerpts. * * To override this link in a child theme, remove the filter and add your own * function tied to the get_the_excerpt filter hook. * @return string Excerpt with a pretty "Continue Reading" link */ function bluewaves_custom_excerpt_more( $output ) { if ( has_excerpt() && ! is_attachment() ) { $output .= bluewaves_continue_reading_link(); } return $output; } add_filter( 'get_the_excerpt', 'bluewaves_custom_excerpt_more' ); function custom_excerpt_length( $length ) { return 100; } add_filter( 'excerpt_length', 'custom_excerpt_length'); function new_excerpt_more($more) { return '...'; } add_filter('excerpt_more', 'new_excerpt_more'); function remove_more_link() { return '...'; } add_filter('the_content_more_link', 'remove_more_link'); if ( ! function_exists( 'bluewaves_comment' ) ) : /** * Template for comments and pingbacks. * * To override this walker in a child theme without modifying the comments template * simply create your own bluewaves_comment(), and that function will be used instead. * * Used as a callback by wp_list_comments() for displaying the comments. * */ function bluewaves_comment( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; switch ( $comment->comment_type ) : case '' : ?>
  • id="li-comment-">
    %s', get_comment_author_link() ) ); ?>
    comment_approved == '0' ) : ?>
    $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
  • __( 'Primary Widget Area', 'bluewaves' ), 'id' => 'primary-widget-area', 'description' => __( 'The primary widget area', 'bluewaves' ), 'before_widget' => '
  • ', 'after_widget' => '
  • ', 'before_title' => '

    ', 'after_title' => '

    ', ) ); } /** Register sidebars by running bluewaves_widgets_init() on the widgets_init hook. */ add_action( 'widgets_init', 'bluewaves_widgets_init' ); function bluewaves_remove_recent_comments_style() { add_filter( 'show_recent_comments_widget_style', '__return_false' ); } add_action( 'widgets_init', 'bluewaves_remove_recent_comments_style' ); if ( ! function_exists( 'bluewaves_posted_on' ) ) : /** * Prints HTML with meta information for the current post-date/time and author. */ function bluewaves_posted_on() { printf( __( 'Posted on %2$s by %3$s', 'bluewaves' ), 'meta-prep meta-prep-author', sprintf( '', get_permalink(), esc_attr( get_the_time() ), get_the_date() ), sprintf( '%3$s', get_author_posts_url( get_the_author_meta( 'ID' ) ), esc_attr( sprintf( __( 'View all posts by %s', 'bluewaves' ), get_the_author() ) ), get_the_author() ) ); } endif; if ( ! function_exists( 'bluewaves_posted_in' ) ) : /** * Prints HTML with meta information for the current post (category, tags and permalink). */ function bluewaves_posted_in() { // Retrieves tag list of current post, separated by commas. $tag_list = get_the_tag_list( '', ', ' ); if ( $tag_list ) { $posted_in = __( 'This entry was posted in %1$s and tagged %2$s. Bookmark the permalink.', 'bluewaves' ); } elseif ( is_object_in_taxonomy( get_post_type(), 'category' ) ) { $posted_in = __( 'This entry was posted in %1$s. Bookmark the permalink.', 'bluewaves' ); } else { $posted_in = __( 'Bookmark the permalink.', 'bluewaves' ); } // Prints the string, replacing the placeholders. printf( $posted_in, get_the_category_list( ', ' ), $tag_list, get_permalink(), the_title_attribute( 'echo=0' ) ); } endif; function remove_category_list_rel($output){ $output = str_replace(' rel="category"', '', $output); return $output; } add_filter('wp_list_categories', 'remove_category_list_rel'); add_filter('the_category', 'remove_category_list_rel'); wp_enqueue_script("jquery"); wp_register_script( "myscript", get_template_directory_uri()."/js/scripts.js", array('jquery'), "1.0" ); wp_register_script( "myscript", get_template_directory_uri()."/js/jquery.idTabs.min.js", array('jquery'), "1.0" ); wp_enqueue_script('myscript'); add_theme_support( 'custom-header', $args ); add_theme_support( 'custom-background', $args ); function responsive_remove_gallery_css($css) { return preg_replace("##s", '', $css); } add_filter('gallery_style', 'responsive_remove_gallery_css'); /** * Filter for images */ function filter_ptags_on_images($content){ return preg_replace('/

    \s*()?\s*()\s*(<\/a>)?\s*<\/p>/iU', '\1\2\3', $content); } add_filter('the_content', 'filter_ptags_on_images'); function my_js() { ?>

     
     
     
     
     
     

     
     

    Current Logo
     
     
    />