__( 'Primary Menu', 'good-by-circathemes' ), 'secondary' => __( 'Secondary Menu', 'good-by-circathemes' ), 'footer' => __( 'Footer Menu', 'good-by-circathemes' ), ) ); /** * Enable support for Post Formats */ add_theme_support( 'post-formats', array( 'video' ) ); } endif; // good-by-circathemes_setup add_action( 'after_setup_theme', 'circathemes_setup' ); /** * Setup the WordPress core custom background feature. * * Use add_theme_support to register support for WordPress 3.4+ * as well as provide backward compatibility for WordPress 3.3 * using feature detection of wp_get_theme() which was introduced * in WordPress 3.4. * * @todo Remove the 3.3 support when WordPress 3.6 is released. * * Hooks into the after_setup_theme action. */ function circathemes_register_custom_background() { $args = array( 'default-color' => 'eeeeee', 'default-image' => '',//get_template_directory_uri() . '/img/background-pattern.png', ); $args = apply_filters( 'circathemes_custom_background_args', $args ); if ( function_exists( 'wp_get_theme' ) ) { add_theme_support( 'custom-background', $args ); } else { define( 'BACKGROUND_COLOR', $args['default-color'] ); if ( ! empty( $args['default-image'] ) ) define( 'BACKGROUND_IMAGE', $args['default-image'] ); add_theme_support('custom-background',$args['default-image']); } } add_action( 'after_setup_theme', 'circathemes_register_custom_background' ); /** * Register widgetized area and update sidebar with default widgets * * @since circathemes 1.0 */ function circathemes_widgets_init() { register_sidebar( array( 'name' => __( 'Sidebar', 'good-by-circathemes' ), 'id' => 'sidebar-1', 'before_widget' => '', 'before_title' => '
', 'after_title' => '
', 'widget_id' =>'%1$s', 'widget_position' => 'sidebar', ) ); register_sidebar( array( 'name' => __( 'Homepage Content', 'good-by-circathemes' ), 'id' => 'homepage-content-widgets', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '
', 'after_title' => '
', 'widget_id' =>'%1$s', 'widget_position' => 'main-content', ) ); register_sidebar( array( 'name' => __( 'Header Ad', 'good-by-circathemes' ), 'id' => 'header-ad', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '
', 'after_title' => '
', 'widget_id' =>'%1$s', 'widget_position' => 'main-content', ) ); $page_args = array( 'post_type' => 'page', 'meta_key' => '_wp_page_template', 'meta_value' => 'widgetized-page.php', ); $list_pages = get_posts($page_args); //print_r($list_pages); foreach( $list_pages as $w_page ){ register_sidebar( array( 'name' => $w_page->post_title, 'id' => $w_page->post_name, 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', 'widget_id' =>'%1$s', ) ); } } add_action( 'widgets_init', 'circathemes_widgets_init' ); /** * Enqueue scripts and styles */ function circathemes_scripts() { wp_enqueue_style( 'style', get_stylesheet_uri() ); wp_enqueue_script('jquery'); wp_enqueue_script( 'good', get_template_directory_uri() . '/js/good.js', array( 'jquery' ), '20120206', true ); wp_enqueue_script( 'imagesloaded', get_template_directory_uri() . '/js/jquery.imagesloaded.min.js', array( 'jquery' ), '20120206', true ); wp_enqueue_script( 'flexslider', get_template_directory_uri() . '/js/jquery.flexslider.min.js', array( 'jquery' ), '20120206', true ); wp_enqueue_script( 'fitvids', get_template_directory_uri() . '/js/jquery.fitvids.js', array( 'jquery' ), '20120206', true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } if ( is_singular() && wp_attachment_is_image() ) { wp_enqueue_script( 'keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20120202' ); } } add_action( 'wp_enqueue_scripts', 'circathemes_scripts', 20 ); /** * Implement the Custom Header feature */ //require( get_template_directory() . '/inc/custom-header.php' ); /** * Get theme option set by customizer */ function circathemes_get_option($optname){ return get_theme_mod($optname); } /************* COMMENT LAYOUT *********************/ // Comment Layout function circathemes_comment($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?>
  • >
    ' ); ?> %s', 'good-by-circathemes'), get_comment_author_link()) ?>

    , $depth, 'max_depth' => $args['max_depth']))) ?>

    comment_approved == '0') : ?>