From c1ff69527826992337e56c28febedc185aad9ad7 Mon Sep 17 00:00:00 2001
From: Jan Herzan <jan.herzan@gmail.com>
Date: Fri, 21 Mar 2014 14:50:43 +0100
Subject: [PATCH 1/2] Some no-PHP generated buttons edited to be "primary".
---
wp-admin/edit.php | 2 +-
wp-admin/includes/media.php | 2 +-
wp-admin/includes/meta-boxes.php | 6 +++---
wp-admin/includes/template.php | 2 +-
wp-admin/upload.php | 2 +-
wp-admin/user-edit.php | 4 ++--
wp-admin/users.php | 2 +-
7 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/wp-admin/edit.php b/wp-admin/edit.php
index a062b09..32a9014 100644
a
|
b
|
require_once( ABSPATH . 'wp-admin/admin-header.php' ); |
268 | 268 | <h2><?php |
269 | 269 | echo esc_html( $post_type_object->labels->name ); |
270 | 270 | if ( current_user_can( $post_type_object->cap->create_posts ) ) |
271 | | echo ' <a href="' . esc_url( admin_url( $post_new_file ) ) . '" class="add-new-h2">' . esc_html( $post_type_object->labels->add_new ) . '</a>'; |
| 271 | echo ' <a href="' . esc_url( admin_url( $post_new_file ) ) . '" class="button-primary">' . esc_html( $post_type_object->labels->add_new ) . '</a>'; |
272 | 272 | if ( ! empty( $_REQUEST['s'] ) ) |
273 | 273 | printf( ' <span class="subtitle">' . __('Search results for “%s”') . '</span>', get_search_query() ); |
274 | 274 | ?></h2> |
diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php
index 678df79..9b2db4f 100644
a
|
b
|
do_action( 'pre-plupload-upload-ui' ); ?> |
1817 | 1817 | <div class="drag-drop-inside"> |
1818 | 1818 | <p class="drag-drop-info"><?php _e('Drop files here'); ?></p> |
1819 | 1819 | <p><?php _ex('or', 'Uploader: Drop files here - or - Select Files'); ?></p> |
1820 | | <p class="drag-drop-buttons"><input id="plupload-browse-button" type="button" value="<?php esc_attr_e('Select Files'); ?>" class="button" /></p> |
| 1820 | <p class="drag-drop-buttons"><input id="plupload-browse-button" type="button" value="<?php esc_attr_e('Select Files'); ?>" class="button-primary" /></p> |
1821 | 1821 | </div> |
1822 | 1822 | </div> |
1823 | 1823 | <?php |
diff --git a/wp-admin/includes/meta-boxes.php b/wp-admin/includes/meta-boxes.php
index 68d4611..31bc63f 100644
a
|
b
|
switch ( $post->post_status ) { |
105 | 105 | <option<?php selected( $post->post_status, 'draft' ); ?> value='draft'><?php _e('Draft') ?></option> |
106 | 106 | <?php endif; ?> |
107 | 107 | </select> |
108 | | <a href="#post_status" class="save-post-status hide-if-no-js button"><?php _e('OK'); ?></a> |
| 108 | <a href="#post_status" class="save-post-status hide-if-no-js button-primary"><?php _e('OK'); ?></a> |
109 | 109 | <a href="#post_status" class="cancel-post-status hide-if-no-js button-cancel"><?php _e('Cancel'); ?></a> |
110 | 110 | </div> |
111 | 111 | |
… |
… |
echo esc_html( $visibility_trans ); ?></span> |
149 | 149 | <input type="radio" name="visibility" id="visibility-radio-private" value="private" <?php checked( $visibility, 'private' ); ?> /> <label for="visibility-radio-private" class="selectit"><?php _e('Private'); ?></label><br /> |
150 | 150 | |
151 | 151 | <p> |
152 | | <a href="#visibility" class="save-post-visibility hide-if-no-js button"><?php _e('OK'); ?></a> |
| 152 | <a href="#visibility" class="save-post-visibility hide-if-no-js button-primary"><?php _e('OK'); ?></a> |
153 | 153 | <a href="#visibility" class="cancel-post-visibility hide-if-no-js button-cancel"><?php _e('Cancel'); ?></a> |
154 | 154 | </p> |
155 | 155 | </div> |
… |
… |
function post_categories_meta_box( $post, $box ) { |
467 | 467 | <?php echo $tax->labels->parent_item_colon; ?> |
468 | 468 | </label> |
469 | 469 | <?php wp_dropdown_categories( array( 'taxonomy' => $taxonomy, 'hide_empty' => 0, 'name' => 'new'.$taxonomy.'_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => '— ' . $tax->labels->parent_item . ' —' ) ); ?> |
470 | | <input type="button" id="<?php echo $taxonomy; ?>-add-submit" data-wp-lists="add:<?php echo $taxonomy ?>checklist:<?php echo $taxonomy ?>-add" class="button category-add-submit" value="<?php echo esc_attr( $tax->labels->add_new_item ); ?>" /> |
| 470 | <input type="button" id="<?php echo $taxonomy; ?>-add-submit" data-wp-lists="add:<?php echo $taxonomy ?>checklist:<?php echo $taxonomy ?>-add" class="button-primary category-add-submit" value="<?php echo esc_attr( $tax->labels->add_new_item ); ?>" /> |
471 | 471 | <?php wp_nonce_field( 'add-'.$taxonomy, '_ajax_nonce-add-'.$taxonomy, false ); ?> |
472 | 472 | <span id="<?php echo $taxonomy; ?>-ajax-response"></span> |
473 | 473 | </p> |
diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php
index 80d6c9f..8a4d282 100644
a
|
b
|
function touch_time( $edit = 1, $for_post = 1, $tab_index = 0, $multi = 0 ) { |
727 | 727 | ?> |
728 | 728 | |
729 | 729 | <p> |
730 | | <a href="#edit_timestamp" class="save-timestamp hide-if-no-js button"><?php _e('OK'); ?></a> |
| 730 | <a href="#edit_timestamp" class="save-timestamp hide-if-no-js button-primary"><?php _e('OK'); ?></a> |
731 | 731 | <a href="#edit_timestamp" class="cancel-timestamp hide-if-no-js button-cancel"><?php _e('Cancel'); ?></a> |
732 | 732 | </p> |
733 | 733 | <?php |
diff --git a/wp-admin/upload.php b/wp-admin/upload.php
index c38a0b6..249acf9 100644
a
|
b
|
require_once( ABSPATH . 'wp-admin/admin-header.php' ); |
179 | 179 | <?php |
180 | 180 | echo esc_html( $title ); |
181 | 181 | if ( current_user_can( 'upload_files' ) ) { ?> |
182 | | <a href="media-new.php" class="add-new-h2"><?php echo esc_html_x('Add New', 'file'); ?></a><?php |
| 182 | <a href="media-new.php" class="button-primary"><?php echo esc_html_x('Add New', 'file'); ?></a><?php |
183 | 183 | } |
184 | 184 | if ( ! empty( $_REQUEST['s'] ) ) |
185 | 185 | printf( '<span class="subtitle">' . __('Search results for “%s”') . '</span>', get_search_query() ); ?> |
diff --git a/wp-admin/user-edit.php b/wp-admin/user-edit.php
index 7274f4d..e994865 100644
a
|
b
|
include (ABSPATH . 'wp-admin/admin-header.php'); |
215 | 215 | echo esc_html( $title ); |
216 | 216 | if ( ! IS_PROFILE_PAGE ) { |
217 | 217 | if ( current_user_can( 'create_users' ) ) { ?> |
218 | | <a href="user-new.php" class="add-new-h2"><?php echo esc_html_x( 'Add New', 'user' ); ?></a> |
| 218 | <a href="user-new.php" class="button-primary"><?php echo esc_html_x( 'Add New', 'user' ); ?></a> |
219 | 219 | <?php } elseif ( is_multisite() && current_user_can( 'promote_users' ) ) { ?> |
220 | | <a href="user-new.php" class="add-new-h2"><?php echo esc_html_x( 'Add Existing', 'user' ); ?></a> |
| 220 | <a href="user-new.php" class="button-primary"><?php echo esc_html_x( 'Add Existing', 'user' ); ?></a> |
221 | 221 | <?php } |
222 | 222 | } ?> |
223 | 223 | </h2> |
diff --git a/wp-admin/users.php b/wp-admin/users.php
index 1dfd73c..92db16d 100644
a
|
b
|
if ( ! empty($messages) ) { |
427 | 427 | <?php |
428 | 428 | echo esc_html( $title ); |
429 | 429 | if ( current_user_can( 'create_users' ) ) { ?> |
430 | | <a href="user-new.php" class="add-new-h2"><?php echo esc_html_x( 'Add New', 'user' ); ?></a> |
| 430 | <a href="user-new.php" class="button-primary"><?php echo esc_html_x( 'Add New', 'user' ); ?></a> |
431 | 431 | <?php } elseif ( is_multisite() && current_user_can( 'promote_users' ) ) { ?> |
432 | 432 | <a href="user-new.php" class="add-new-h2"><?php echo esc_html_x( 'Add Existing', 'user' ); ?></a> |
433 | 433 | <?php } |
--
1.8.0.msysgit.0
From c955db7040d5e0a91f55f7356e2eadcb9a0f3780 Mon Sep 17 00:00:00 2001
From: Jan Herzan <jan.herzan@gmail.com>
Date: Fri, 21 Mar 2014 14:51:08 +0100
Subject: [PATCH 2/2] Some PHP generated submit buttons edited to be
"primary".
---
wp-admin/includes/media.php | 2 +-
wp-admin/includes/template.php | 2 +-
wp-admin/users.php | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php
index 9b2db4f..c768e7c 100644
a
|
b
|
do_action( 'post-plupload-upload-ui' ); ?> |
1842 | 1842 | <p id="async-upload-wrap"> |
1843 | 1843 | <label class="screen-reader-text" for="async-upload"><?php _e('Upload'); ?></label> |
1844 | 1844 | <input type="file" name="async-upload" id="async-upload" /> |
1845 | | <?php submit_button( __( 'Upload' ), 'button', 'html-upload', false ); ?> |
| 1845 | <?php submit_button( __( 'Upload' ), 'button-primary', 'html-upload', false ); ?> |
1846 | 1846 | <a href="#" onclick="try{top.tb_remove();}catch(e){}; return false;"><?php _e('Cancel'); ?></a> |
1847 | 1847 | </p> |
1848 | 1848 | <div class="clear"></div> |
diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php
index 8a4d282..0e2346e 100644
a
|
b
|
function wp_import_upload_form( $action ) { |
838 | 838 | <input type="hidden" name="action" value="save" /> |
839 | 839 | <input type="hidden" name="max_file_size" value="<?php echo $bytes; ?>" /> |
840 | 840 | </p> |
841 | | <?php submit_button( __('Upload file and import'), 'button' ); ?> |
| 841 | <?php submit_button( __('Upload file and import') ); ?> |
842 | 842 | </form> |
843 | 843 | <?php |
844 | 844 | endif; |
diff --git a/wp-admin/users.php b/wp-admin/users.php
index 92db16d..b529c95 100644
a
|
b
|
case 'delete': |
249 | 249 | wp_dropdown_users( array( 'name' => 'reassign_user', 'exclude' => array_diff( $userids, array($current_user->ID) ) ) ); ?></li> |
250 | 250 | </ul></fieldset> |
251 | 251 | <input type="hidden" name="action" value="dodelete" /> |
252 | | <?php submit_button( __('Confirm Deletion'), 'secondary' ); ?> |
| 252 | <?php submit_button( __('Confirm Deletion') ); ?> |
253 | 253 | <?php else : ?> |
254 | 254 | <p><?php _e('There are no valid users selected for deletion.'); ?></p> |
255 | 255 | <?php endif; ?> |