Changeset 47219 for trunk/src/wp-admin/includes/meta-boxes.php
- Timestamp:
- 02/09/2020 04:52:28 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/meta-boxes.php
r47207 r47219 158 158 <?php 159 159 160 if ( 'private' == $post->post_status ) {160 if ( 'private' === $post->post_status ) { 161 161 $post->post_password = ''; 162 162 $visibility = 'private'; … … 165 165 $visibility = 'password'; 166 166 $visibility_trans = __( 'Password protected' ); 167 } elseif ( $post_type == 'post'&& is_sticky( $post->ID ) ) {167 } elseif ( 'post' === $post_type && is_sticky( $post->ID ) ) { 168 168 $visibility = 'public'; 169 169 $visibility_trans = __( 'Public, Sticky' ); … … 181 181 <div id="post-visibility-select" class="hide-if-js"> 182 182 <input type="hidden" name="hidden_post_password" id="hidden-post-password" value="<?php echo esc_attr( $post->post_password ); ?>" /> 183 <?php if ( $post_type == 'post') : ?>183 <?php if ( 'post' === $post_type ) : ?> 184 184 <input type="checkbox" style="display:none" name="hidden_post_sticky" id="hidden-post-sticky" value="sticky" <?php checked( is_sticky( $post->ID ) ); ?> /> 185 185 <?php endif; ?> 186 186 <input type="hidden" name="hidden_post_visibility" id="hidden-post-visibility" value="<?php echo esc_attr( $visibility ); ?>" /> 187 187 <input type="radio" name="visibility" id="visibility-radio-public" value="public" <?php checked( $visibility, 'public' ); ?> /> <label for="visibility-radio-public" class="selectit"><?php _e( 'Public' ); ?></label><br /> 188 <?php if ( $post_type == 'post'&& current_user_can( 'edit_others_posts' ) ) : ?>188 <?php if ( 'post' === $post_type && current_user_can( 'edit_others_posts' ) ) : ?> 189 189 <span id="sticky-span"><input id="sticky" name="sticky" type="checkbox" value="sticky" <?php checked( is_sticky( $post->ID ) ); ?> /> <label for="sticky" class="selectit"><?php _e( 'Stick this post to the front page' ); ?></label><br /></span> 190 190 <?php endif; ?> … … 264 264 <fieldset id="timestampdiv" class="hide-if-js"> 265 265 <legend class="screen-reader-text"><?php _e( 'Date and time' ); ?></legend> 266 <?php touch_time( ( $action === 'edit'), 1 ); ?>266 <?php touch_time( ( 'edit' === $action ), 1 ); ?> 267 267 </fieldset> 268 268 </div><?php // /misc-pub-section ?> … … 599 599 <div id="<?php echo $tax_name; ?>-all" class="tabs-panel"> 600 600 <?php 601 $name = ( $tax_name == 'category') ? 'post_category' : 'tax_input[' . $tax_name . ']';601 $name = ( 'category' === $tax_name ) ? 'post_category' : 'tax_input[' . $tax_name . ']'; 602 602 // Allows for an empty term set to be sent. 0 is an invalid term ID and will be ignored by empty() checks. 603 603 echo "<input type='hidden' name='{$name}[]' value='0' />"; … … 1149 1149 <fieldset><legend class="screen-reader-text"><span><?php _e( 'Target' ); ?></span></legend> 1150 1150 <p><label for="link_target_blank" class="selectit"> 1151 <input id="link_target_blank" type="radio" name="link_target" value="_blank" <?php echo ( isset( $link->link_target ) && ( $link->link_target == '_blank') ? 'checked="checked"' : '' ); ?> />1151 <input id="link_target_blank" type="radio" name="link_target" value="_blank" <?php echo ( isset( $link->link_target ) && ( '_blank' === $link->link_target ) ? 'checked="checked"' : '' ); ?> /> 1152 1152 <?php _e( '<code>_blank</code> — new window or tab.' ); ?></label></p> 1153 1153 <p><label for="link_target_top" class="selectit"> 1154 <input id="link_target_top" type="radio" name="link_target" value="_top" <?php echo ( isset( $link->link_target ) && ( $link->link_target == '_top') ? 'checked="checked"' : '' ); ?> />1154 <input id="link_target_top" type="radio" name="link_target" value="_top" <?php echo ( isset( $link->link_target ) && ( '_top' === $link->link_target ) ? 'checked="checked"' : '' ); ?> /> 1155 1155 <?php _e( '<code>_top</code> — current window or tab, with no frames.' ); ?></label></p> 1156 1156 <p><label for="link_target_none" class="selectit"> 1157 <input id="link_target_none" type="radio" name="link_target" value="" <?php echo ( isset( $link->link_target ) && ( $link->link_target == '') ? 'checked="checked"' : '' ); ?> />1157 <input id="link_target_none" type="radio" name="link_target" value="" <?php echo ( isset( $link->link_target ) && ( '' === $link->link_target ) ? 'checked="checked"' : '' ); ?> /> 1158 1158 <?php _e( '<code>_none</code> — same window or tab.' ); ?></label></p> 1159 1159 </fieldset>
Note: See TracChangeset
for help on using the changeset viewer.