Making WordPress.org


Ignore:
Timestamp:
02/01/2018 05:00:35 PM (9 years ago)
Author:
obenland
Message:

Main: Enable subscription widget on Rosetta sites.

See #727.

Location:
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main
Files:
1 added
2 edited

Legend:

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

    r6277 r6502  
    4040                return $args;
    4141        } );
     42
     43        add_filter( 'widget_categories_args', function( $args ) {
     44                $args['number']  = 10;
     45                $args['orderby'] = 'count';
     46                $args['order']   = 'DESC';
     47
     48                return $args;
     49        } );
     50
     51        add_filter( 'widget_archives_args', function( $args ) {
     52                $args['limit'] = 12;
     53
     54                return $args;
     55        } );
     56
     57        register_sidebar( [
     58                'id'           => 'sidebar-1',
     59                'before'       => '<div class="widget">',
     60                'after'        => '</div>',
     61                'before_title' => '<h4>',
     62                'after_title'  => '</h4>',
     63        ] );
    4264}
    4365add_action( 'widgets_init', __NAMESPACE__ . '\widgets' );
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/widgets/class-wporg-widget-download.php

    r6277 r6502  
    3636         *
    3737         * @param array $args     Display arguments including 'before_widget' and 'after_widget'.
    38          * @param array $instance Settings for the current Download widget instance.
    3938         */
    40         public function widget( $args, $instance ) {
     39        public function widget( $args ) {
    4140                global $rosetta;
    4241
Note: See TracChangeset for help on using the changeset viewer.