| @@ -1,9 +1,5 @@ | ||
| 1 | 1 | <?php |
| 2 | -if ( ! defined( 'ABSPATH' ) ) { | |
| 3 | - die( 'You are not allowed to call this page directly.' ); | |
| 4 | -} | |
| 5 | - | |
| 6 | 2 | /** |
| 7 | 3 | * @since 2.02.12 |
| 8 | 4 | */ |
| 9 | 5 | |
| @@ -12,9 +8,8 @@ | ||
| 12 | 8 | /** |
| 13 | 9 | * Get the shortcode attributes in key/value pairs from a string |
| 14 | 10 | * |
| 15 | 11 | * @since 2.02.12 |
| 16 | - * | |
| 17 | 12 | * @param string $text |
| 18 | 13 | * |
| 19 | 14 | * @return array |
| 20 | 15 | */ |
| @@ -34,9 +29,8 @@ | ||
| 34 | 29 | /** |
| 35 | 30 | * Get the name of the shortcode from the regEx |
| 36 | 31 | * |
| 37 | 32 | * @since 3.0 |
| 38 | - * | |
| 39 | 33 | * @param array $shortcodes |
| 40 | 34 | * @param int $short_key The position in the shortcodes array |
| 41 | 35 | * @param array $args |
| 42 | 36 | * |
| @@ -58,9 +52,9 @@ | ||
| 58 | 52 | $prefix = ''; |
| 59 | 53 | if ( $args['conditional_check'] ) { |
| 60 | 54 | if ( $args['conditional'] ) { |
| 61 | 55 | $prefix = 'if '; |
| 62 | - } elseif ( $args['foreach'] ) { | |
| 56 | + } else if ( $args['foreach'] ) { | |
| 63 | 57 | $prefix = 'foreach '; |
| 64 | 58 | } |
| 65 | 59 | } |
| 66 | 60 | |
| @@ -65,11 +59,11 @@ | ||
| 65 | 59 | } |
| 66 | 60 | |
| 67 | 61 | $with_tags = $args['conditional_check'] ? 3 : 2; |
| 68 | 62 | if ( ! empty( $shortcodes[ $with_tags ][ $short_key ] ) ) { |
| 69 | - $tag = str_replace( '[' . $prefix, '', $shortcodes[0][ $short_key ] ); | |
| 70 | - $tag = str_replace( ']', '', $tag ); | |
| 71 | - $tag = str_replace( chr( 194 ) . chr( 160 ), ' ', $tag ); | |
| 63 | + $tag = str_replace( '[' . $prefix, '', $shortcodes[0][ $short_key ] ); | |
| 64 | + $tag = str_replace( ']', '', $tag ); | |
| 65 | + $tag = str_replace( chr( 194 ) . chr( 160 ), ' ', $tag ); | |
| 72 | 66 | $tags = preg_split( '/\s+/', $tag, 2 ); |
| 73 | 67 | if ( is_array( $tags ) ) { |
| 74 | 68 | $tag = $tags[0]; |
| 75 | 69 | } |