• Hi,
    preparing my theme for WP review I struggled to get sidebar registration to validate

    this won’t validate (blank space after add action):

    add_action ( ‘widgets_init’, ‘minimal_wp_widget’ );
    function minimal_wp_widget() {
    register_sidebar( array(
    ‘name’ => __( ‘Sidebar Widget Area’, ‘minimal_wp’ ),
    ‘id’ => ‘primary-widget-area’,
    ‘description’ => __( ‘sidebar’, ‘minimal_wp’ ),
    ‘before_widget’ => ‘<li id=”%1$s” class=”widget-container %2$s”>’,
    ‘after_widget’ => “”,
    ‘before_title’ => ‘<h3 class=”widget-title”>’,
    ‘after_title’ => ‘</h3>’
    ) );
    }

    this validates (no space):
    add_action( ‘widgets_init’, ‘minimal_wp_widget’ );
    …….

    I understand that the check is in line with the WP automatic review, but isn’t this too aggressive in the first place?

    cheers,
    stef

    https://wordpress.org/plugins/theme-check/

  • The topic ‘too aggressive check for add_action and register_sidebar?’ is closed to new replies.