@@ 466-486 (lines=21) @@ | ||
463 | break; |
|
464 | } |
|
465 | break; |
|
466 | case 'tag': |
|
467 | // All tag pages. |
|
468 | if( ! $rule['minor'] ) { |
|
469 | if ( is_tag() ) { |
|
470 | $condition_result = true; |
|
471 | } else if ( is_singular() ) { |
|
472 | if( in_array( 'post_tag', get_post_taxonomies() ) ) { |
|
473 | $condition_result = true; |
|
474 | } |
|
475 | } |
|
476 | break; |
|
477 | } |
|
478 | ||
479 | // All pages with the specified tag term. |
|
480 | if ( is_tag( $rule['minor'] ) ) { |
|
481 | $condition_result = true; |
|
482 | } |
|
483 | else if ( is_singular() && has_term( $rule['minor'], 'post_tag' ) ) { |
|
484 | $condition_result = true; |
|
485 | } |
|
486 | break; |
|
487 | case 'category': |
|
488 | // All category pages. |
|
489 | if( ! $rule['minor'] ) { |
|
@@ 487-508 (lines=22) @@ | ||
484 | $condition_result = true; |
|
485 | } |
|
486 | break; |
|
487 | case 'category': |
|
488 | // All category pages. |
|
489 | if( ! $rule['minor'] ) { |
|
490 | if ( is_category() ) { |
|
491 | $condition_result = true; |
|
492 | } |
|
493 | else if ( is_singular() ) { |
|
494 | if( in_array( 'category', get_post_taxonomies() ) ) { |
|
495 | $condition_result = true; |
|
496 | } |
|
497 | } |
|
498 | break; |
|
499 | } |
|
500 | ||
501 | // All pages with the specified category term. |
|
502 | if ( is_category( $rule['minor'] ) ) { |
|
503 | $condition_result = true; |
|
504 | } |
|
505 | else if ( is_singular() && has_term( $rule['minor'], 'category' ) ) { |
|
506 | $condition_result = true; |
|
507 | } |
|
508 | break; |
|
509 | case 'loggedin': |
|
510 | $condition_result = is_user_logged_in(); |
|
511 | if ( 'loggedin' !== $rule['minor'] ) { |