Changeset 47808 for trunk/src/wp-admin/includes/dashboard.php
- Timestamp:
- 05/16/2020 06:40:52 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/dashboard.php
r47592 r47808 138 138 } 139 139 140 if ( 'POST' == $_SERVER['REQUEST_METHOD'] && isset( $_POST['widget_id'] ) ) {140 if ( 'POST' === $_SERVER['REQUEST_METHOD'] && isset( $_POST['widget_id'] ) ) { 141 141 check_admin_referer( 'edit-dashboard-widget_' . $_POST['widget_id'], 'dashboard-widget-nonce' ); 142 142 ob_start(); // Hack - but the same hack wp-admin/widgets.php uses. … … 283 283 $num_posts = wp_count_posts( $post_type ); 284 284 if ( $num_posts && $num_posts->publish ) { 285 if ( 'post' == $post_type ) {285 if ( 'post' === $post_type ) { 286 286 /* translators: %s: Number of posts. */ 287 287 $text = _n( '%s Post', '%s Posts', $num_posts->publish ); … … 759 759 foreach ( $actions as $action => $link ) { 760 760 ++$i; 761 ( ( ( 'approve' == $action || 'unapprove' == $action ) && 2 === $i ) || 1 === $i ) ? $sep = '' : $sep = ' | '; 761 762 if ( ( ( 'approve' === $action || 'unapprove' === $action ) && 2 === $i ) || 1 === $i ) { 763 $sep = ''; 764 } else { 765 $sep = ' | '; 766 } 762 767 763 768 // Reply and quickedit need a hide-if-no-js span. 764 if ( 'reply' == $action || 'quickedit'== $action ) {769 if ( 'reply' === $action || 'quickedit' === $action ) { 765 770 $action .= ' hide-if-no-js'; 766 771 } … … 769 774 $action .= ' hidden'; 770 775 } 776 771 777 $actions_string .= "<span class='$action'>$sep$link</span>"; 772 778 } … … 785 791 ?> 786 792 787 <?php if ( ! $comment->comment_type || 'comment' == $comment->comment_type ) : ?>793 <?php if ( ! $comment->comment_type || 'comment' === $comment->comment_type ) : ?> 788 794 789 795 <div class="dashboard-comment-wrap has-row-actions <?php echo $comment_row_class; ?>"> … … 1175 1181 $widget_options[ $widget_id ]['number'] = $number; 1176 1182 1177 if ( 'POST' == $_SERVER['REQUEST_METHOD'] && isset( $_POST['widget-rss'][ $number ] ) ) {1183 if ( 'POST' === $_SERVER['REQUEST_METHOD'] && isset( $_POST['widget-rss'][ $number ] ) ) { 1178 1184 $_POST['widget-rss'][ $number ] = wp_unslash( $_POST['widget-rss'][ $number ] ); 1179 1185 $widget_options[ $widget_id ] = wp_widget_rss_process( $_POST['widget-rss'][ $number ] ); … … 1892 1898 <h3><?php _e( 'Next Steps' ); ?></h3> 1893 1899 <ul> 1894 <?php if ( 'page' == get_option( 'show_on_front' ) && ! get_option( 'page_for_posts' ) ) : ?>1900 <?php if ( 'page' === get_option( 'show_on_front' ) && ! get_option( 'page_for_posts' ) ) : ?> 1895 1901 <li><?php printf( '<a href="%s" class="welcome-icon welcome-edit-page">' . __( 'Edit your front page' ) . '</a>', get_edit_post_link( get_option( 'page_on_front' ) ) ); ?></li> 1896 1902 <li><?php printf( '<a href="%s" class="welcome-icon welcome-add-page">' . __( 'Add additional pages' ) . '</a>', admin_url( 'post-new.php?post_type=page' ) ); ?></li> 1897 <?php elseif ( 'page' == get_option( 'show_on_front' ) ) : ?>1903 <?php elseif ( 'page' === get_option( 'show_on_front' ) ) : ?> 1898 1904 <li><?php printf( '<a href="%s" class="welcome-icon welcome-edit-page">' . __( 'Edit your front page' ) . '</a>', get_edit_post_link( get_option( 'page_on_front' ) ) ); ?></li> 1899 1905 <li><?php printf( '<a href="%s" class="welcome-icon welcome-add-page">' . __( 'Add additional pages' ) . '</a>', admin_url( 'post-new.php?post_type=page' ) ); ?></li>
Note: See TracChangeset
for help on using the changeset viewer.