| @@ -46,9 +46,9 @@ | ||
| 46 | 46 | |
| 47 | 47 | $shortcode = sh_cd_db_shortcodes_by_slug( $args[ 'slug' ] ); |
| 48 | 48 | |
| 49 | 49 | // Cache it! If a multisite, only cache the shortcode for 30 seconds. Otherwise, fall back to default cache time. |
| 50 | - $cache_time = ( true === sh_cd_is_premium() && true === in_array( $args[ 'slug' ], sh_cd_multisite_slugs() ) ) ? 30 : NULL; | |
| 50 | + $cache_time = ( true === SH_CD_IS_PREMIUM && true === in_array( $args[ 'slug' ], sh_cd_multisite_slugs() ) ) ? 30 : NULL; | |
| 51 | 51 | |
| 52 | 52 | sh_cd_cache_set( $args[ 'slug' ], $shortcode, $cache_time ); |
| 53 | 53 | |
| 54 | 54 | } |
| @@ -57,19 +57,10 @@ | ||
| 57 | 57 | if ( true === empty( $shortcode ) ) { |
| 58 | 58 | return ''; |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | - // Any other reasons this shortcode shouldn't be displayed? e.g. has the | |
| 62 | - // Premium plugin determined it's not the correct device type? etc | |
| 63 | - if ( true === apply_filters( 'sh-cd-filter-hide-shortcode', false, $shortcode ) ) { | |
| 64 | - return ''; | |
| 65 | - } | |
| 66 | - | |
| 67 | - // Let the Premium plugin (or anything else) know this shortcode was just rendered, e.g. for usage analytics | |
| 68 | - do_action( 'sh-cd-shortcode-rendered', $shortcode, $args ); | |
| 69 | - | |
| 70 | 61 | // Process other shortcodes within this one |
| 71 | - $shortcode = do_shortcode( $shortcode[ 'data' ] ); | |
| 62 | + $shortcode = do_shortcode( $shortcode ); | |
| 72 | 63 | |
| 73 | 64 | // Replace placeholders with user defined parameters |
| 74 | 65 | return sh_cd_apply_user_defined_parameters( $shortcode, $args ); |
| 75 | 66 | } |