Machen Sie “Post veröffentlicht. Beitrag anzeigen “In einem neuen Tab öffnen

Wie würde ich Post published. View post Post published. View post anzeigen (auch bearbeiten und Seiten) immer in einem neuen Tab öffnen? Ich habe dies in einem iframe, aber es sieht komisch aus, wenn ein Beitrag darin ist.

Solutions Collecting From Web of "Machen Sie “Post veröffentlicht. Beitrag anzeigen “In einem neuen Tab öffnen"

Öffnen Sie die WP-Admin Bearbeitungsdatei:

  • Öffnen Sie die Datei unter: /example.com/public_html/wp-admin/edit-form-advanced.php

Bearbeiten: Bearbeiten Sie diese Zeilen so, dass sie wie die nächste aussehen, fügen Sie jedem Link target=”_blank” oder fügen Sie die gesamte Liste ein.

 $messages = array(); $messages['post'] = array( 0 => '', // Unused. Messages start at index 1. 1 => sprintf( __('Post updated. View post'), esc_url( get_permalink($post_ID) ) ), 2 => __('Custom field updated.'), 3 => __('Custom field deleted.'), 4 => __('Post updated.'), /* translators: https://wordpress.stackexchange.com/questions/173819/make-post-published-view-post-open-in-a-new-tab/%s: date and time of the revision */ 5 => isset($_GET['revision']) ? sprintf( __('Post restored to revision from https://wordpress.stackexchange.com/questions/173819/make-post-published-view-post-open-in-a-new-tab/%s'), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false, 6 => sprintf( __('Post published. View post'), esc_url( get_permalink($post_ID) ) ), 7 => __('Post saved.'), 8 => sprintf( __('Post submitted. Preview post'), esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) ), 9 => sprintf( __('Post scheduled for: %1$s. Preview post'), /* translators: Publish box date format, see http://php.net/date */ date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ), esc_url( get_permalink($post_ID) ) ), 10 => sprintf( __('Post draft updated. Preview post'), esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) ), ); $messages['page'] = array( 0 => '', // Unused. Messages start at index 1. 1 => sprintf( __('Page updated. View page'), esc_url( get_permalink($post_ID) ) ), 2 => __('Custom field updated.'), 3 => __('Custom field deleted.'), 4 => __('Page updated.'), 5 => isset($_GET['revision']) ? sprintf( __('Page restored to revision from https://wordpress.stackexchange.com/questions/173819/make-post-published-view-post-open-in-a-new-tab/%s'), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false, 6 => sprintf( __('Page published. View page'), esc_url( get_permalink($post_ID) ) ), 7 => __('Page saved.'), 8 => sprintf( __('Page submitted. Preview page'), esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) ), 9 => sprintf( __('Page scheduled for: %1$s. Preview page'), date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ), esc_url( get_permalink($post_ID) ) ), 10 => sprintf( __('Page draft updated. Preview page'), esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) ), 

(Benutze diese)

 $messages = array(); $messages['post'] = array( 0 => '', // Unused. Messages start at index 1. 1 => sprintf( __('Post updated. View post'), esc_url( get_permalink($post_ID) ) ), 2 => __('Custom field updated.'), 3 => __('Custom field deleted.'), 4 => __('Post updated.'), /* translators: https://wordpress.stackexchange.com/questions/173819/make-post-published-view-post-open-in-a-new-tab/%s: date and time of the revision */ 5 => isset($_GET['revision']) ? sprintf( __('Post restored to revision from https://wordpress.stackexchange.com/questions/173819/make-post-published-view-post-open-in-a-new-tab/%s'), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false, 6 => sprintf( __('Post published. View post'), esc_url( get_permalink($post_ID) ) ), 7 => __('Post saved.'), 8 => sprintf( __('Post submitted. Preview post'), esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) ), 9 => sprintf( __('Post scheduled for: %1$s. Preview post'), /* translators: Publish box date format, see http://php.net/date */ date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ), esc_url( get_permalink($post_ID) ) ), 10 => sprintf( __('Post draft updated. Preview post'), esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) ), ); $messages['page'] = array( 0 => '', // Unused. Messages start at index 1. 1 => sprintf( __('Page updated. View page'), esc_url( get_permalink($post_ID) ) ), 2 => __('Custom field updated.'), 3 => __('Custom field deleted.'), 4 => __('Page updated.'), 5 => isset($_GET['revision']) ? sprintf( __('Page restored to revision from https://wordpress.stackexchange.com/questions/173819/make-post-published-view-post-open-in-a-new-tab/%s'), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false, 6 => sprintf( __('Page published. View page'), esc_url( get_permalink($post_ID) ) ), 7 => __('Page saved.'), 8 => sprintf( __('Page submitted. Preview page'), esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) ), 9 => sprintf( __('Page scheduled for: %1$s. Preview page'), date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ), esc_url( get_permalink($post_ID) ) ), 10 => sprintf( __('Page draft updated. Preview page'), esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) ), ); 

Quelle: CodeBucket.io