g ); self::set_cache( $cache_key, $shortcode_output, self::$cache_group, $expiration ); # Cache the shortcode output } } self::$shortcode_level --; # rollback increased value return $shortcode_output; } } /** * * Just fire shortcode callback handle without considering cache version * * @param string|array $atts shortcode attributes. it could be an empty string * @param string $content shortcode inner content * @param string $shortcode_tag shortcode tag name * * @return string|void string on success or void on failure */ public static function fire_shortcode_handler( &$atts, &$content, &$shortcode_tag ) { if ( ! isset( self::$shortcodes_callback[ $shortcode_tag ] ) ) { # invalid $shortcode_tag return; } ob_start(); # Some damn plugins echo the output instead of return it! we handle this issue because we are Better Studio $output = call_user_func( self::$shortcodes_callback[ $shortcode_tag ], $atts, $content, $shortcode_tag ); $buffer = ob_get_clean(); if ( ! $output && $buffer ) { $output = $buffer; } if ( is_string( $output ) ) { return $output; } # i have no idea why the output is not string :| } /** * Get unique cache key for the shortcode * * @param string|array $atts * @param string $content * @param string $shortcode_tag * * @return string */ public static function get_cache_key( &$atts, &$content, &$shortcode_tag ) { return md5( serialize( $atts ) . $shortcode_tag . $content ); } /** * Is a shortcode available for caching * * @param string $shortcode_tag shortcode tag name * * @return bool */ public static function can_cache( $shortcode_tag ) { return isset( self::$shortcodes2cache[ $shortcode_tag ] ); } /** * Get cache duration interval * * @param string $shortcode_tag shortcode tag name * * @return int|void int on success */ public static function get_cache_duration( $shortcode_tag ) { if ( isset( self::$shortcodes2cache[ $shortcode_tag ] ) ) { $dur = self::$shortcodes2cache[ $shortcode_tag ]; if ( isset( self::$cache_intervals[ $dur ] ) ) { return self::$cache_intervals[ $dur ]; } } } } BF_Shortcode_Cache::Run(); and not activated. */ protected function premium_is_installed_not_activated( $premium_file ) { return ( ! \defined( 'WPSEO_PREMIUM_FILE' ) && \file_exists( \WP_PLUGIN_DIR . '/' . $premium_file ) ); } } bamako marche - LePays 225
large-header