Making WordPress.org


Ignore:
Timestamp:
10/29/2014 12:44:51 AM (10 years ago)
Author:
coffee2code
Message:

Code Reference: widgetize primary landing page footer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/functions.php

    r941 r948  
    6161add_action( 'init', __NAMESPACE__ . '\\init' );
    6262add_filter( 'handbook_post_types', __NAMESPACE__ . '\\filter_handbook_post_types' );
     63add_action( 'widgets_init', __NAMESPACE__ . '\\widgets_init' );
    6364
    6465function init() {
     
    6970    add_action( 'after_switch_theme', __NAMESPACE__ . '\\add_roles' );
    7071    add_filter( 'user_has_cap', __NAMESPACE__ . '\\adjust_handbook_editor_caps', 11 );
    71     add_action( 'widgets_init', __NAMESPACE__ . '\\widgets_init' );
    7272    add_action( 'pre_get_posts', __NAMESPACE__ . '\\pre_get_posts' );
    7373    add_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\\theme_scripts_styles' );
     
    201201        'before_title'  => '<h1 class="widget-title">',
    202202        'after_title'   => '</h1><div class="widget-content">',
     203    ) );
     204
     205    register_sidebar( array(
     206        'name'          => __( 'Landing Page Footer - Left', 'wporg' ),
     207        'id'            => 'landing-footer-1',
     208        'description'   => __( 'Appears in footer of the primary landing page', 'wporg' ),
     209        'before_widget' => '<div id="%1$s" class="widget box %2$s">',
     210        'after_widget'  => '</div>',
     211        'before_title'  => '<h4 class="widget-title">',
     212        'after_title'   => '</h4>',
     213    ) );
     214
     215    register_sidebar( array(
     216        'name'          => __( 'Landing Page Footer - Center', 'wporg' ),
     217        'id'            => 'landing-footer-2',
     218        'description'   => __( 'Appears in footer of the primary landing page', 'wporg' ),
     219        'before_widget' => '<div id="%1$s" class="widget box %2$s">',
     220        'after_widget'  => '</div>',
     221        'before_title'  => '<h4 class="widget-title">',
     222        'after_title'   => '</h4>',
    203223    ) );
    204224}
Note: See TracChangeset for help on using the changeset viewer.