Changeset 32983 for trunk/src/wp-admin/includes/class-wp-press-this.php
- Timestamp:
- 06/28/2015 04:58:56 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-press-this.php
r32944 r32983 147 147 } 148 148 149 $forceRedirect = false; 150 149 151 if ( 'publish' === get_post_status( $post_id ) ) { 150 152 $redirect = get_post_permalink( $post_id ); 153 } elseif ( isset( $_POST['pt-force-redirect'] ) && $_POST['pt-force-redirect'] === 'true' ) { 154 $forceRedirect = true; 155 $redirect = get_edit_post_link( $post_id, 'js' ); 151 156 } else { 152 157 $redirect = false; … … 166 171 167 172 if ( $redirect ) { 168 wp_send_json_success( array( 'redirect' => $redirect ) );173 wp_send_json_success( array( 'redirect' => $redirect, 'force' => $forceRedirect ) ); 169 174 } else { 170 175 wp_send_json_success( array( 'postSaved' => true ) ); … … 1330 1335 <input type="hidden" name="wp-preview" id="wp-preview" value="" /> 1331 1336 <input type="hidden" name="post_title" id="post_title" value="" /> 1337 <input type="hidden" name="pt-force-redirect" id="pt-force-redirect" value="" /> 1332 1338 <?php 1333 1339 … … 1457 1463 <div class="split-button"> 1458 1464 <div class="split-button-head"> 1459 <button type="button" class="publish-button split-button-primary"><?php 1460 echo ( current_user_can( 'publish_posts' ) ) ? __( 'Publish' ) : __( 'Submit for Review' ); 1461 ?></button><button type="button" class="split-button-toggle" aria-haspopup="true" aria-expanded="false"> 1465 <button type="button" class="publish-button split-button-primary" aria-live="polite"> 1466 <span class="publish"><?php echo ( current_user_can( 'publish_posts' ) ) ? __( 'Publish' ) : __( 'Submit for Review' ); ?></span> 1467 <span class="saving-draft"><?php _e( 'Saving...' ); ?></span> 1468 </button><button type="button" class="split-button-toggle" aria-haspopup="true" aria-expanded="false"> 1462 1469 <i class="dashicons dashicons-arrow-down-alt2"></i> 1463 1470 <span class="screen-reader-text"><?php _e('More actions'); ?></span> … … 1465 1472 </div> 1466 1473 <ul class="split-button-body"> 1467 <li><button type="button" class="button-subtle draft-button split-button-option" aria-live="polite"><?php _e( 'Save Draft' ); ?></button></li>1468 <li>< a href="<?php echo esc_url( get_edit_post_link( $post_ID ) ); ?>" class="edit-post-link split-button-option" target="_blank"><?php _e( 'Standard Editor' ); ?></a></li>1474 <li><button type="button" class="button-subtle draft-button split-button-option"><?php _e( 'Save Draft' ); ?></button></li> 1475 <li><button type="button" class="button-subtle standard-editor-button split-button-option"><?php _e( 'Standard Editor' ); ?></button></li> 1469 1476 <li><button type="button" class="button-subtle preview-button split-button-option"><?php _e( 'Preview' ); ?></button></li> 1470 1477 </ul>
Note: See TracChangeset
for help on using the changeset viewer.