'#ddd' ) ); // Adds support of custom header add_theme_support( 'custom-header' ); // Adds RSS feed links to
for posts and comments. add_theme_support( 'automatic-feed-links' ); add_theme_support( 'title-tag' ); // Styles the visual editor with editor-style.css add_editor_style(); // Custom image size for featured images add_image_size( 'post-featured-image', 542, 9999 ); // image size for slider add_image_size( 'slide', 940, 344, true ); // image size for attachment add_image_size( 'attachment', 540, 360, true ); // image size for custom-header add_image_size( 'custom-header', 940, 9999, true ); // register menu of theme register_nav_menu( 'primary', __( 'Navigation Menu', 'archy' ) ); } // Adds script of navigation menu function archy_register_scripts() { // Adds JavaScript to pages with the comment form to support sites with // threaded comments (when in use). if ( is_singular() && comments_open() ) { wp_enqueue_script( 'comment-reply' ); } // Adds functions realized on script.js wp_enqueue_script( 'archy-script', get_template_directory_uri() . '/js/script.js', array( 'jquery', 'jquery-ui-core', 'jquery-effects-core', 'jquery-effects-drop', ) ); //Detect plugin. For use on Front End only. include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); // Adds script oriented for http://wordpress.org/plugins/gallery-plugin/ and http://bestwebsoft.com/plugin/portfolio-plugin/ // check for plugin using plugin name if ( is_plugin_active( 'gallery-plugin/gallery-plugin.php' ) || is_plugin_active( 'portfolio/portfolio.php' ) ) { wp_enqueue_script( 'archy-pluginsScript', get_template_directory_uri() . '/js/plugins-script.js' ); } // Load the main stylesheet wp_enqueue_style( 'archy-style', get_stylesheet_uri() ); // Loads the Internet Explorer specific stylesheet. wp_enqueue_style( 'archy-style-ie', get_template_directory_uri() . '/styles/ie78.css', array( 'archy-style' ) ); wp_style_add_data( 'archy-style-ie', 'conditional', 'lt IE 9' ); } /* backwards compatibility title-tag */ if ( ! function_exists( '_wp_render_title_tag' ) ) { /* customize title if WP version < 4.1 */ function archy_wp_title( $title, $sep = '|' ) { global $page, $paged; if ( is_feed() ) { return $title; } /* Add the blog name */ $title .= get_bloginfo( 'name' ); /* Add the blog description for the home/front page. */ $site_description = get_bloginfo( 'description', 'display' ); if ( $site_description && ( is_home() || is_front_page() ) ) { $title .= " $sep $site_description "; } /* Add a page number if necessary: */ if ( $paged >= 2 || $page >= 2 ) { $title .= " $sep " . sprintf( __( 'Page %s', 'archy' ), max( $paged, $page ) ); } return $title; } /* add wp_title filter if WP version < 4.1 */ add_filter( 'wp_title', 'archy_wp_title' ); /* render title in wp_head if WP version < 4.1 */ function archy_render_title() { ?>'; $output .= $caption; $output .= '
'; echo $output; }; } } /* * Adds a box to the main column on the Post and Page edit screens. */ function archy_slider_add_custom_box() { $screens = array( 'post', 'page' ); foreach ( $screens as $screen ) { add_meta_box( 'showonslider', __( 'Slider', 'archy' ), 'archy_slider_inner_custom_box', $screen ); } } if ( ! function_exists( 'slider_inner_custom_box' ) ) : /** * Prints the box content. * * @param WP_Post $post The object for the current post/page. */ function archy_slider_inner_custom_box( $post ) { // Add an nonce field so we can check for it later. wp_nonce_field( 'slider_inner_custom_box', 'slider_inner_custom_box_nonce' ); /* * Use get_post_meta() to retrieve an existing value * from the database and use the value for the form. */ $caption = get_post_meta( $post->ID, '_caption_slider', true ); $is_check = get_post_meta( $post->ID, '_add_to_slider', true ); ?>