WordPress.org

Make WordPress Core

Ticket #23477: allow-secondary-button-class.patch

File allow-secondary-button-class.patch, 5.7 KB (added by jakemgold, 9 months ago)

Allows dev to specify arbitrarily unallowed classes, while removing those class requests in core.

  • wp-admin/users.php

     
    250250                wp_dropdown_users( array( 'name' => 'reassign_user', 'exclude' => array_diff( $userids, array($current_user->ID) ) ) ); ?></li> 
    251251        </ul></fieldset> 
    252252        <input type="hidden" name="action" value="dodelete" /> 
    253         <?php submit_button( __('Confirm Deletion'), 'secondary' ); ?> 
     253        <?php submit_button( __('Confirm Deletion'), '' ); ?> 
    254254<?php else : ?> 
    255255        <p><?php _e('There are no valid users selected for deletion.'); ?></p> 
    256256<?php endif; ?> 
     
    344344        ?> 
    345345<?php if ( $go_remove ) : ?> 
    346346                <input type="hidden" name="action" value="doremove" /> 
    347                 <?php submit_button( __('Confirm Removal'), 'secondary' ); ?> 
     347                <?php submit_button( __('Confirm Removal'), '' ); ?> 
    348348<?php else : ?> 
    349349        <p><?php _e('There are no valid users selected for removal.'); ?></p> 
    350350<?php endif; ?> 
  • wp-admin/includes/class-wp-media-list-table.php

     
    9595                } 
    9696 
    9797                if ( $this->detached ) { 
    98                         submit_button( __( 'Scan for lost attachments' ), 'secondary', 'find_detached', false ); 
     98                        submit_button( __( 'Scan for lost attachments' ), '', 'find_detached', false ); 
    9999                } elseif ( $this->is_trash && current_user_can( 'edit_others_posts' ) ) { 
    100100                        submit_button( __( 'Empty Trash' ), 'apply', 'delete_all', false ); 
    101101                } ?> 
  • wp-admin/includes/template.php

     
    554554 
    555555<tr><td colspan="2"> 
    556556<div class="submit"> 
    557 <?php submit_button( __( 'Add Custom Field' ), 'secondary', 'addmeta', false, array( 'id' => 'newmeta-submit', 'data-wp-lists' => 'add:the-list:newmeta' ) ); ?> 
     557<?php submit_button( __( 'Add Custom Field' ), '', 'addmeta', false, array( 'id' => 'newmeta-submit', 'data-wp-lists' => 'add:the-list:newmeta' ) ); ?> 
    558558</div> 
    559559<?php wp_nonce_field( 'add-meta', '_ajax_nonce-add-meta', false ); ?> 
    560560</td></tr> 
     
    16611661        $button_shorthand = array( 'primary', 'small', 'large' ); 
    16621662        $classes = array( 'button' ); 
    16631663        foreach ( $type as $t ) { 
    1664                 if ( 'secondary' === $t || 'button-secondary' === $t ) 
    1665                         continue; 
    16661664                $classes[] = in_array( $t, $button_shorthand ) ? 'button-' . $t : $t; 
    16671665        } 
    16681666        $class = implode( ' ', array_unique( $classes ) ); 
  • wp-admin/includes/nav-menu.php

     
    725725                        <p class="quick-search-wrap"> 
    726726                                <input type="search" class="quick-search input-with-default-title" title="<?php esc_attr_e('Search'); ?>" value="<?php echo $searched; ?>" name="quick-search-posttype-<?php echo $post_type_name; ?>" /> 
    727727                                <span class="spinner"></span> 
    728                                 <?php submit_button( __( 'Search' ), 'button-small quick-search-submit button-secondary hide-if-js', 'submit', false, array( 'id' => 'submit-quick-search-posttype-' . $post_type_name ) ); ?> 
     728                                <?php submit_button( __( 'Search' ), 'button-small quick-search-submit hide-if-js', 'submit', false, array( 'id' => 'submit-quick-search-posttype-' . $post_type_name ) ); ?> 
    729729                        </p> 
    730730 
    731731                        <ul id="<?php echo $post_type_name; ?>-search-checklist" data-wp-lists="list:<?php echo $post_type_name?>" class="categorychecklist form-no-clear"> 
     
    967967                        <p class="quick-search-wrap"> 
    968968                                <input type="search" class="quick-search input-with-default-title" title="<?php esc_attr_e('Search'); ?>" value="<?php echo $searched; ?>" name="quick-search-taxonomy-<?php echo $taxonomy_name; ?>" /> 
    969969                                <span class="spinner"></span> 
    970                                 <?php submit_button( __( 'Search' ), 'button-small quick-search-submit button-secondary hide-if-js', 'submit', false, array( 'id' => 'submit-quick-search-taxonomy-' . $taxonomy_name ) ); ?> 
     970                                <?php submit_button( __( 'Search' ), 'button-small quick-search-submit hide-if-js', 'submit', false, array( 'id' => 'submit-quick-search-taxonomy-' . $taxonomy_name ) ); ?> 
    971971                        </p> 
    972972 
    973973                        <ul id="<?php echo $taxonomy_name; ?>-search-checklist" data-wp-lists="list:<?php echo $taxonomy_name?>" class="categorychecklist form-no-clear"> 
  • wp-admin/custom-header.php

     
    732732        <?php submit_button( __( 'Crop and Publish' ), 'primary', 'submit', false ); ?> 
    733733        <?php 
    734734        if ( isset( $oitar ) && 1 == $oitar && ( current_theme_supports( 'custom-header', 'flex-height' ) || current_theme_supports( 'custom-header', 'flex-width' ) ) ) 
    735                 submit_button( __( 'Skip Cropping, Publish Image as Is' ), 'secondary', 'skip-cropping', false ); 
     735                submit_button( __( 'Skip Cropping, Publish Image as Is' ), '', 'skip-cropping', false ); 
    736736        ?> 
    737737        </p> 
    738738</form> 
  • wp-admin/themes.php

     
    260260        <?php endforeach; ?> 
    261261 
    262262        <div class="feature-container"> 
    263                 <?php submit_button( __( 'Apply Filters' ), 'button-secondary submitter', false, false, array( 'id' => 'filter-submit' ) ); ?> 
     263                <?php submit_button( __( 'Apply Filters' ), 'submitter', false, false, array( 'id' => 'filter-submit' ) ); ?> 
    264264                &nbsp; 
    265265                <a id="mini-filter-click" href="<?php echo esc_url( remove_query_arg( array('filter', 'features', 'submit') ) ); ?>"><?php _e( 'Close filters' )?></a> 
    266266        </div>