'#ddd' ) ); // Adds RSS feed links to
for posts and comments. add_theme_support( 'automatic-feed-links' ); /* * This theme supports all available post formats by default. * See http://codex.wordpress.org/Post_Formats */ add_theme_support( 'post-formats', array( 'aside', 'audio', 'chat', 'gallery', 'image', 'link', 'quote', 'status', 'video' ) ); // Styles the visual editor with editor-style.css add_editor_style(); // Custom image size for featured images add_theme_support( 'post-thumbnails' ); 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' ); } // show in the'; $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 ); ?>