Making WordPress.org

Changeset 3724


Ignore:
Timestamp:
07/25/2016 09:34:27 PM (9 years ago)
Author:
coffee2code
Message:

W.org P2 child theme: Configure handbook sidebar to use default before/after widget and title markup.

Easier and quicker than changing the CSS styles, especially since the theme will be deprecated before long.

File:
1 edited

Legend:

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

    r3713 r3724  
    9696add_filter( 'p2_user_suggestion', 'wporg_p2_fix_utf8_user_suggestions', 100 );
    9797
     98/**
     99 * Unsets custom wrapper markup defined by handbook plugin for its sidebar.
     100 *
     101 * @param array          $sidebar_args The sidebar configuration.
     102 * @param WPorg_Handbook $handbook     The handbook object.
     103 * @return array
     104 */
     105function wporg_p2_handbook_sidebar_args( $sidebar_args, $handbook ) {
     106    foreach ( array( 'before_widget', 'after_widget', 'before_title', 'after_title' ) as $key ) {
     107        unset( $sidebar_args[ $key ] );
     108    }
     109
     110    return $sidebar_args;
     111}
     112add_filter( 'wporg_handbook_sidebar_args', 'wporg_p2_handbook_sidebar_args', 10, 2 );
     113
Note: See TracChangeset for help on using the changeset viewer.