Changeset 2659 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-controls.php
- Timestamp:
- 03/01/2016 07:59:36 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-controls.php
r2655 r2659 22 22 } 23 23 echo '</div>'; 24 24 25 25 echo '<div id="major-publishing-actions"><div id="publishing-action">'; 26 26 echo '<span class="spinner"></span>'; … … 41 41 <div class="misc-pub-section misc-pub-plugin-status"> 42 42 <label for="post_status"><?php _e( 'Status:', 'wporg-plugins' ); ?></label> 43 <span id="plugin-status-display"><?php echo esc_html( get_post_status_object( $post->post_status )->label ); ?></span> 44 <a href="#plugin_status" class="edit-plugin-status hide-if-no-js"><span aria-hidden="true">Edit</span> <span class="screen-reader-text">Edit status</span></a> 45 46 <div id="plugin-status-select" class="hide-if-js"> 47 <input type="hidden" name="hidden_post_status" id="hidden_post_status" value="<?php echo esc_attr( $post->post_status ); ?>"> 48 <select name="post_status" id="plugin_status"> 43 <strong id="plugin-status-display"><?php echo esc_html( get_post_status_object( $post->post_status )->label ); ?></strong> 44 <button type="button" class="button-link edit-plugin-status hide-if-no-js"> 45 <span aria-hidden="true"><?php _e( 'Edit', 'wporg-plugins' ); ?></span> 46 <span class="screen-reader-text"><?php _e( 'Edit plugin status', 'wporg-plugins' ); ?></span> 47 </button> 48 49 <div id="plugin-status-select" class="plugin-control-select hide-if-js"> 50 <input type="hidden" name="hidden_post_status" id="hidden-post-status" value="<?php echo esc_attr( $post->post_status ); ?>"> 51 <select name="post_status" id="plugin-status"> 49 52 <?php 50 53 foreach ( $statuses as $statii ) { 51 54 $status_object = get_post_status_object( $statii ); 52 $selected = selected( $post->post_status, $statii, false );53 55 printf( 54 56 '<option value="%s" %s>%s</option>', 55 57 esc_attr( $statii ), 56 $selected,58 selected( $post->post_status, $statii, false ), 57 59 esc_html( $status_object->label ) 58 60 ); … … 60 62 ?> 61 63 </select> 62 < a href="#plugin_status" class="save-plugin-status hide-if-no-js button">OK</a>63 < a href="#plugin_status" class="cancel-plugin-status hide-if-no-js button-cancel">Cancel</a>64 <button type="button" class="save-plugin-status hide-if-no-js button"><?php _e( 'OK', 'wporg-plugins' ); ?></button> 65 <button type="button" class="cancel-plugin-status hide-if-no-js button-link"><?php _e( 'Cancel', 'wporg-plugins' ); ?></button> 64 66 </div> 65 67 66 68 </div><!-- .misc-pub-section --><?php 67 69 } … … 71 73 */ 72 74 protected static function display_tested_up_to() { 73 $post = get_post();74 $tested_up_to = (string) get_post_meta( $post->ID, 'tested', true );75 $versions = self::get_tested_up_to_versions( $tested_up_to );76 $tested_up_to = $versions['tested_up_to'];75 $post = get_post(); 76 $tested_up_to = (string) get_post_meta( $post->ID, 'tested', true ); 77 $versions = self::get_tested_up_to_versions( $tested_up_to ); 78 $tested_up_to = $versions['tested_up_to']; 77 79 $unknown_string = _x( 'Unknown', 'unknown version', 'wporg-plugins' ); 78 80 ?> 79 81 <div class="misc-pub-section misc-pub-tested"> 80 82 <label for="tested_with"><?php _e( 'Tested With:', 'wporg-plugins' ); ?></label> 81 <span id="tested-with-display"><?php echo ( $tested_up_to ? sprintf( 'WordPress %s', $tested_up_to ) : $unknown_string ); ?></span> 82 <a href="#tested_with" class="edit-tested-with hide-if-no-js"><span aria-hidden="true">Edit</span> <span class="screen-reader-text">Edit status</span></a> 83 84 <div id="tested-with-select" class="hide-if-js"> 85 <input type="hidden" name="hidden_tested_with" id="hidden_tested_with" value="<?php echo esc_attr( $tested_up_to ); ?>"> 86 <select name="tested_with" id="tested_with"> 83 <strong id="tested-with-display"><?php echo ( $tested_up_to ? sprintf( 'WordPress %s', $tested_up_to ) : $unknown_string ); ?></strong> 84 <button type="button" class="button-link edit-tested-with hide-if-no-js"> 85 <span aria-hidden="true"><?php _e( 'Edit', 'wporg-plugins' ); ?></span> 86 <span class="screen-reader-text"><?php _e( 'Edit tested with version', 'wporg-plugins' ); ?></span> 87 </button> 88 89 <div id="tested-with-select" class="plugin-control-select hide-if-js"> 90 <input type="hidden" name="hidden_tested_with" id="hidden-tested-with" value="<?php echo esc_attr( $tested_up_to ); ?>"> 91 <select name="tested_with" id="tested-with"> 87 92 <?php 88 93 foreach ( $versions['versions'] as $ver ) { … … 96 101 ?> 97 102 </select> 98 < a href="#tested_with" class="save-tested-with hide-if-no-js button">OK</a>99 < a href="#tested_with" class="cancel-tested-with hide-if-no-js button-cancel">Cancel</a>103 <button type="button" class="save-tested-with hide-if-no-js button"><?php _e( 'OK', 'wporg-plugins' ); ?></button> 104 <button type="button" class="cancel-tested-with hide-if-no-js button-link"><?php _e( 'Cancel', 'wporg-plugins' ); ?></button> 100 105 </div> 101 106 102 107 </div><!-- .misc-pub-section --><?php 103 108 }
Note: See TracChangeset
for help on using the changeset viewer.