| @@ 513-533 (lines=21) @@ | ||
| 510 | break; |
|
| 511 | } |
|
| 512 | break; |
|
| 513 | case 'tag': |
|
| 514 | // All tag pages. |
|
| 515 | if( ! $rule['minor'] ) { |
|
| 516 | if ( is_tag() ) { |
|
| 517 | $condition_result = true; |
|
| 518 | } else if ( is_singular() ) { |
|
| 519 | if( in_array( 'post_tag', get_post_taxonomies() ) ) { |
|
| 520 | $condition_result = true; |
|
| 521 | } |
|
| 522 | } |
|
| 523 | break; |
|
| 524 | } |
|
| 525 | ||
| 526 | // All pages with the specified tag term. |
|
| 527 | if ( is_tag( $rule['minor'] ) ) { |
|
| 528 | $condition_result = true; |
|
| 529 | } |
|
| 530 | else if ( is_singular() && has_term( $rule['minor'], 'post_tag' ) ) { |
|
| 531 | $condition_result = true; |
|
| 532 | } |
|
| 533 | break; |
|
| 534 | case 'category': |
|
| 535 | // All category pages. |
|
| 536 | if( ! $rule['minor'] ) { |
|
| @@ 534-555 (lines=22) @@ | ||
| 531 | $condition_result = true; |
|
| 532 | } |
|
| 533 | break; |
|
| 534 | case 'category': |
|
| 535 | // All category pages. |
|
| 536 | if( ! $rule['minor'] ) { |
|
| 537 | if ( is_category() ) { |
|
| 538 | $condition_result = true; |
|
| 539 | } |
|
| 540 | else if ( is_singular() ) { |
|
| 541 | if( in_array( 'category', get_post_taxonomies() ) ) { |
|
| 542 | $condition_result = true; |
|
| 543 | } |
|
| 544 | } |
|
| 545 | break; |
|
| 546 | } |
|
| 547 | ||
| 548 | // All pages with the specified category term. |
|
| 549 | if ( is_category( $rule['minor'] ) ) { |
|
| 550 | $condition_result = true; |
|
| 551 | } |
|
| 552 | else if ( is_singular() && has_term( $rule['minor'], 'category' ) ) { |
|
| 553 | $condition_result = true; |
|
| 554 | } |
|
| 555 | break; |
|
| 556 | case 'loggedin': |
|
| 557 | $condition_result = is_user_logged_in(); |
|
| 558 | if ( 'loggedin' !== $rule['minor'] ) { |
|