Changeset 46962
- Timestamp:
- 12/15/2019 10:44:37 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/edit-tags.php
r46823 r46962 44 44 $title = $tax->labels->name; 45 45 46 if ( 'post' != $post_type ) {47 $parent_file = ( 'attachment' == $post_type ) ? 'upload.php' : "edit.php?post_type=$post_type";46 if ( 'post' !== $post_type ) { 47 $parent_file = ( 'attachment' === $post_type ) ? 'upload.php' : "edit.php?post_type=$post_type"; 48 48 $submenu_file = "edit-tags.php?taxonomy=$taxonomy&post_type=$post_type"; 49 } elseif ( 'link_category' == $tax->name ) {49 } elseif ( 'link_category' === $tax->name ) { 50 50 $parent_file = 'link-manager.php'; 51 51 $submenu_file = 'edit-tags.php?taxonomy=link_category'; … … 243 243 } 244 244 245 if ( 'category' == $taxonomy || 'link_category' == $taxonomy || 'post_tag'== $taxonomy ) {245 if ( 'category' === $taxonomy || 'link_category' === $taxonomy || 'post_tag' === $taxonomy ) { 246 246 $help = ''; 247 if ( 'category' == $taxonomy ) {247 if ( 'category' === $taxonomy ) { 248 248 $help = '<p>' . sprintf( 249 249 /* translators: %s: URL to Writing Settings screen. */ … … 251 251 'options-writing.php' 252 252 ) . '</p>'; 253 } elseif ( 'link_category' == $taxonomy ) {253 } elseif ( 'link_category' === $taxonomy ) { 254 254 $help = '<p>' . __( 'You can create groups of links by using Link Categories. Link Category names must be unique and Link Categories are separate from the categories you use for posts.' ) . '</p>'; 255 255 } else { … … 257 257 } 258 258 259 if ( 'link_category' == $taxonomy ) {259 if ( 'link_category' === $taxonomy ) { 260 260 $help .= '<p>' . __( 'You can delete Link Categories in the Bulk Action pull-down, but that action does not delete the links within the category. Instead, it moves them to the default Link Category.' ) . '</p>'; 261 261 } else { … … 271 271 ); 272 272 273 if ( 'category' == $taxonomy || 'post_tag'== $taxonomy ) {274 if ( 'category' == $taxonomy ) {273 if ( 'category' === $taxonomy || 'post_tag' === $taxonomy ) { 274 if ( 'category' === $taxonomy ) { 275 275 $help = '<p>' . __( 'When adding a new category on this screen, you’ll fill in the following fields:' ) . '</p>'; 276 276 } else { … … 285 285 } 286 286 287 if ( 'category' == $taxonomy ) {287 if ( 'category' === $taxonomy ) { 288 288 $help .= '<li>' . __( '<strong>Parent</strong> — Categories, unlike tags, can have a hierarchy. You might have a Jazz category, and under that have child categories for Bebop and Big Band. Totally optional. To create a subcategory, just choose another category from the Parent dropdown.' ) . '</li>'; 289 289 } … … 296 296 array( 297 297 'id' => 'adding-terms', 298 'title' => 'category' == $taxonomy ? __( 'Adding Categories' ) : __( 'Adding Tags' ),298 'title' => 'category' === $taxonomy ? __( 'Adding Categories' ) : __( 'Adding Tags' ), 299 299 'content' => $help, 300 300 ) … … 304 304 $help = '<p><strong>' . __( 'For more information:' ) . '</strong></p>'; 305 305 306 if ( 'category' == $taxonomy ) {306 if ( 'category' === $taxonomy ) { 307 307 $help .= '<p>' . __( '<a href="https://wordpress.org/support/article/posts-categories-screen/">Documentation on Categories</a>' ) . '</p>'; 308 } elseif ( 'link_category' == $taxonomy ) {308 } elseif ( 'link_category' === $taxonomy ) { 309 309 $help .= '<p>' . __( '<a href="https://codex.wordpress.org/Links_Link_Categories_Screen">Documentation on Link Categories</a>' ) . '</p>'; 310 310 } else { … … 373 373 374 374 <?php 375 if ( 'category' == $taxonomy ) {375 if ( 'category' === $taxonomy ) { 376 376 /** 377 377 * Fires before the Add Category form. … … 383 383 */ 384 384 do_action_deprecated( 'add_category_form_pre', array( (object) array( 'parent' => 0 ) ), '3.0.0', '{$taxonomy}_pre_add_form' ); 385 } elseif ( 'link_category' == $taxonomy ) {385 } elseif ( 'link_category' === $taxonomy ) { 386 386 /** 387 387 * Fires before the link category form. … … 488 488 wp_dropdown_categories( $dropdown_args ); 489 489 ?> 490 <?php if ( 'category' == $taxonomy ) : ?>490 <?php if ( 'category' === $taxonomy ) : ?> 491 491 <p><?php _e( 'Categories, unlike tags, can have a hierarchy. You might have a Jazz category, and under that have children categories for Bebop and Big Band. Totally optional.' ); ?></p> 492 492 <?php else : ?> … … 529 529 </p> 530 530 <?php 531 if ( 'category' == $taxonomy ) {531 if ( 'category' === $taxonomy ) { 532 532 /** 533 533 * Fires at the end of the Edit Category form. … … 539 539 */ 540 540 do_action_deprecated( 'edit_category_form', array( (object) array( 'parent' => 0 ) ), '3.0.0', '{$taxonomy}_add_form' ); 541 } elseif ( 'link_category' == $taxonomy ) {541 } elseif ( 'link_category' === $taxonomy ) { 542 542 /** 543 543 * Fires at the end of the Edit Link form. … … 590 590 </form> 591 591 592 <?php if ( 'category' == $taxonomy ) : ?>592 <?php if ( 'category' === $taxonomy ) : ?> 593 593 <div class="form-wrap edit-term-notes"> 594 594 <p> … … 614 614 <?php endif; ?> 615 615 </div> 616 <?php elseif ( 'post_tag' == $taxonomy && current_user_can( 'import' ) ) : ?>616 <?php elseif ( 'post_tag' === $taxonomy && current_user_can( 'import' ) ) : ?> 617 617 <div class="form-wrap edit-term-notes"> 618 618 <p>
Note: See TracChangeset
for help on using the changeset viewer.