public function addShortcodesFrontend()
    {
        // Default content formatter
        remove_filter('the_content', 'wpautop');
        remove_filter('the_content', 'wptexturize');
        add_filter('the_content', [&$this, 'contentFormatter'], 99);

        remove_filter('comment_text', 'wpautop');
        remove_filter('comment_text', 'wptexturize');
        add_filter('comment_text', [&$this, 'contentFormatter'], 99);

        remove_filter('the_excerpt', 'wpautop');
        remove_filter('the_excerpt', 'wptexturize');
        add_filter('the_excerpt', [&$this, 'contentFormatter'], 99);

        // Iterate on configs
        foreach ($this->configs as $key => $file) {
            // Avoid special cases
            if (false !== $file && empty($file)) {
                continue;
            }

            // Add shortcode
            add_shortcode($key, function ($atts = null, $content = null) use ($key) {
                /**
                 * Hook to customize shortcode function.
                 *
                 * @var     string  $key
                 * @param   array   $atts
                 * @param   string  $content
                 * @return  string  $content
                 */
                return apply_filters('ol_zeus_shortcodes_'.$key, $atts, $content);
            });
        }
    }
public function addShortcodesFrontend()
    {
        // Default content formatter
        remove_filter('the_content', 'wpautop');
        remove_filter('the_content', 'wptexturize');
        add_filter('the_content', [&$this, 'contentFormatter'], 99);

        remove_filter('comment_text', 'wpautop');
        remove_filter('comment_text', 'wptexturize');
        add_filter('comment_text', [&$this, 'contentFormatter'], 99);

        remove_filter('the_excerpt', 'wpautop');
        remove_filter('the_excerpt', 'wptexturize');
        add_filter('the_excerpt', [&$this, 'contentFormatter'], 99);

        // Iterate on configs
        foreach ($this->configs as $key => $file) {
            // Avoid special cases
            if (false !== $file && empty($file)) {
                continue;
            }

            // Add shortcode
            add_shortcode($key, function ($atts = null, $content = null) use ($key) {
                /**
                 * Hook to customize shortcode function.
                 *
                 * @var     string  $key
                 * @param   array   $atts
                 * @param   string  $content
                 * @return  string  $content
                 */
                return apply_filters('ol_zeus_shortcodes_'.$key, $atts, $content);
            });
        }
    }
public function addShortcodesFrontend ( ) { // Default content formatter remove_filter ( 'the_content' , 'wpautop' ) ; remove_filter ( 'the_content' , 'wptexturize' ) ; add_filter ( 'the_content' , [ & $ this , 'contentFormatter' ] , 99 ) ; remove_filter ( 'comment_text' , 'wpautop' ) ; remove_filter ( 'comment_text' , 'wptexturize' ) ; add_filter ( 'comment_text' , [ & $ this , 'contentFormatter' ] , 99 ) ; remove_filter ( 'the_excerpt' , 'wpautop' ) ; remove_filter ( 'the_excerpt' , 'wptexturize' ) ; add_filter ( 'the_excerpt' , [ & $ this , 'contentFormatter' ] , 99 ) ; // Iterate on configs foreach ( $ this -> configs as $ key => $ file ) { // Avoid special cases if ( false !== $ file && empty ( $ file ) ) { continue ; } // Add shortcode add_shortcode ( $ key , function ( $ atts = null , $ content = null ) use ( $ key ) { /**
                 * Hook to customize shortcode function.
                 *
                 * @var     string  $key
                 * @param   array   $atts
                 * @param   string  $content
                 * @return  string  $content
                 */ return apply_filters ( 'ol_zeus_shortcodes_' . $ key , $ atts , $ content ) ; } ) ; } }
Enable shortcodes WP functions.
Enable shortcodes WP functions .