| @@ 696-715 (lines=20) @@ | ||
| 693 | break; |
|
| 694 | } |
|
| 695 | break; |
|
| 696 | case 'tag': |
|
| 697 | // All tag pages. |
|
| 698 | if ( ! $rule['minor'] ) { |
|
| 699 | if ( is_tag() ) { |
|
| 700 | $condition_result = true; |
|
| 701 | } elseif ( is_singular() ) { |
|
| 702 | if ( in_array( 'post_tag', get_post_taxonomies() ) ) { |
|
| 703 | $condition_result = true; |
|
| 704 | } |
|
| 705 | } |
|
| 706 | break; |
|
| 707 | } |
|
| 708 | ||
| 709 | // All pages with the specified tag term. |
|
| 710 | if ( is_tag( $rule['minor'] ) ) { |
|
| 711 | $condition_result = true; |
|
| 712 | } elseif ( is_singular() && has_term( $rule['minor'], 'post_tag' ) ) { |
|
| 713 | $condition_result = true; |
|
| 714 | } |
|
| 715 | break; |
|
| 716 | case 'category': |
|
| 717 | // All category pages. |
|
| 718 | if ( ! $rule['minor'] ) { |
|
| @@ 716-735 (lines=20) @@ | ||
| 713 | $condition_result = true; |
|
| 714 | } |
|
| 715 | break; |
|
| 716 | case 'category': |
|
| 717 | // All category pages. |
|
| 718 | if ( ! $rule['minor'] ) { |
|
| 719 | if ( is_category() ) { |
|
| 720 | $condition_result = true; |
|
| 721 | } elseif ( is_singular() ) { |
|
| 722 | if ( in_array( 'category', get_post_taxonomies() ) ) { |
|
| 723 | $condition_result = true; |
|
| 724 | } |
|
| 725 | } |
|
| 726 | break; |
|
| 727 | } |
|
| 728 | ||
| 729 | // All pages with the specified category term. |
|
| 730 | if ( is_category( $rule['minor'] ) ) { |
|
| 731 | $condition_result = true; |
|
| 732 | } elseif ( is_singular() && has_term( $rule['minor'], 'category' ) ) { |
|
| 733 | $condition_result = true; |
|
| 734 | } |
|
| 735 | break; |
|
| 736 | case 'loggedin': |
|
| 737 | $condition_result = is_user_logged_in(); |
|
| 738 | if ( 'loggedin' !== $rule['minor'] ) { |
|