__('Main menu', 'phoenix') )); add_image_size( 'slide', 130, 100, true ); /** * Sets up the content width value based on the theme's design and stylesheet. */ if ( ! isset( $content_width ) ) $content_width = 960; // This theme styles the visual editor with editor-style.css to match the theme style. add_editor_style(); // Adds RSS feed links to for posts and comments. add_theme_support( 'automatic-feed-links' ); // Add posts thumbs add_theme_support( 'post-thumbnails' ); /* * This theme supports custom background color and image, and here * we also set up the default background color. */ add_theme_support( 'custom-background', array( 'default-color' => 'fff', ) ); /* * Makes Phoenix available for translation. * * Translations can be added to the /languages/ directory. */ load_theme_textdomain( 'phoenix', get_template_directory() . '/languages' ); } endif; function phoenix_widgets_init() { register_sidebar(array( 'name' => __('Sidebar', 'phoenix'), 'description' => __('Main right area', 'phoenix'), 'id' => 'footer-sidebar', 'before_title' => '
', 'after_title' => '
', 'before_widget' => '
', 'after_widget' => '
' )); register_sidebar(array( 'name' => __('Footer Sidebar', 'phoenix'), 'description' => __('Footer area', 'phoenix'), 'id' => 'footer-sidebar', 'before_title' => '
', 'after_title' => '
', 'before_widget' => '
', 'after_widget' => '
' )); register_sidebar(array( 'name' => __('Single page sidebar', 'phoenix'), 'description' => __('Sidebar for your widgets on single pages', 'phoenix'), 'id' => 'side', 'before_title' => '
', 'after_title' => '
', 'before_widget' => '
', 'after_widget' => '
' )); } add_action( 'widgets_init', 'phoenix_widgets_init' ); /** * A safe way of adding JavaScripts to a WordPress generated page. */ if (!is_admin()) add_action('wp_enqueue_scripts', 'phoenix_js'); if (!function_exists('phoenix_js')) { function phoenix_js() { // JS at the bottom for fast page loading. // except for Modernizr which enables HTML5 elements & feature detects. wp_enqueue_script('jquery'); wp_enqueue_script('modernizr', get_template_directory_uri() . '/includes/foundation/js/vendor/custom.modernizr.js', array('jquery'), '2.6.2', false); wp_enqueue_script('zepto', get_template_directory_uri() . '/includes/foundation/js/vendor/zepto.js', array('jquery'), '1.0', false); wp_enqueue_script('foundation', get_template_directory_uri() . '/includes/foundation/js/foundation.min.js', array('jquery'), '4.3.1', false); wp_enqueue_script('main', get_template_directory_uri() . '/js/main.js', array('jquery'), '1.0', false); if ( is_singular() ) wp_enqueue_script( "comment-reply" ); // stylesheet wp_enqueue_style('foundation-style', get_template_directory_uri() . '/includes/foundation/css/foundation.min.css', false, '4.1.6'); wp_enqueue_style('phoenix-style', get_stylesheet_uri(), false, '1'); } } // Comments function phoenix_comment( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; switch ( $comment->comment_type ) : case 'pingback' : case 'trackback' : // Display trackbacks differently than normal comments. ?>
  • id="comment-">

    ', '' ); ?>

  • id="li-comment-">
    %1$s', get_comment_author_link() ); ?>
    __( 'Reply', 'phoenix' ), 'after' => '', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
    comment_approved ) : ?>

    = 2 || $page >= 2 ) $title .= " {$sep} " . sprintf( __( 'Page %s', 'phoenix' ), max( $paged, $page ) ); return $title; } function phoenix_footer_script(){ ?> _x( 'Slides', 'phoenix' ), 'singular_name' => _x( 'slides', 'phoenix' ), 'add_new' => _x( 'Add new', 'phoenix' ), 'add_new_item' => __( 'Add new slide', 'phoenix' ), 'edit_item' => __( 'Edit', 'phoenix' ), 'new_item' => __( 'New slide', 'phoenix' ), 'view_item' => __( 'View', 'phoenix' ), 'search_items' => __( 'Search slide', 'phoenix' ), 'not_found' => __( 'No any slides was found', 'phoenix' ), 'not_found_in_trash' => __( 'No any slides was found in trash', 'phoenix' ), 'parent_item_colon' => '' ); // Create an array for the $args $args = array( 'labels' => $labels, /* NOTICE: the $labels variable is used here... */ 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'query_var' => true, 'rewrite' => true, 'capability_type' => 'post', 'menu_icon' => get_bloginfo('template_directory').'/images/slides.png', 'hierarchical' => false, 'menu_position' => null, 'supports' => array( 'title', 'editor', 'thumbnail' ) ); register_post_type( 'slides', $args ); /* Register it and move on */ } // Meta fields for pages add_action('admin_init', 'phoenix_slide_extra_fields', 1); function phoenix_slide_extra_fields() { add_meta_box( 'extra_fields', 'Page Settings', 'phoenix_extra_fields_box_func', 'slides', 'normal', 'high' ); } function phoenix_extra_fields_box_func( $post ){ ?>
    $value ){ if( empty($value) ) { delete_post_meta($post_id, $key); } else { update_post_meta($post_id, $key, $value); } } return $post_id; } ?>