private static function getData()
    {
        global $post;
        $return = apply_filters('balise-anchor-getData', null);
        if (!$return) {
            if (!is_singular() || (function_exists('is_shop') && is_shop())) {
                /**
                 * If the post is an archive or the product page(woocommerce) load template page and
                 */
                $return = new PostWrapper($post, true);
                if ((function_exists('is_shop') && is_shop())) {
                    $return = new PostWrapper(get_post(wc_get_page_id('shop')), true);
                }
                if (get_option('page_for_posts')) {
                    $return = new PostWrapper(get_post(get_option('page_for_posts')), true);
                }
                $return->posts = array();
                while (have_posts()) {
                    the_post();
                    $subreturn = new PostWrapper($post, true);
                    $return->posts[] = $subreturn;
                }
            } else {
                $return = new PostWrapper($post, true);
            }
        }
        return $return;
    }
private static function getData()
    {
        global $post;
        $return = apply_filters('balise-anchor-getData', null);
        if (!$return) {
            if (!is_singular() || (function_exists('is_shop') && is_shop())) {
                /**
                 * If the post is an archive or the product page(woocommerce) load template page and
                 */
                $return = new PostWrapper($post, true);
                if ((function_exists('is_shop') && is_shop())) {
                    $return = new PostWrapper(get_post(wc_get_page_id('shop')), true);
                }
                if (get_option('page_for_posts')) {
                    $return = new PostWrapper(get_post(get_option('page_for_posts')), true);
                }
                $return->posts = array();
                while (have_posts()) {
                    the_post();
                    $subreturn = new PostWrapper($post, true);
                    $return->posts[] = $subreturn;
                }
            } else {
                $return = new PostWrapper($post, true);
            }
        }
        return $return;
    }
private static function getData ( ) { global $ post ; $ return = apply_filters ( 'balise-anchor-getData' , null ) ; if ( ! $ return ) { if ( ! is_singular ( ) || ( function_exists ( 'is_shop' ) && is_shop ( ) ) ) { /**
                 * If the post is an archive or the product page(woocommerce) load template page and
                 */ $ return = new PostWrapper ( $ post , true ) ; if ( ( function_exists ( 'is_shop' ) && is_shop ( ) ) ) { $ return = new PostWrapper ( get_post ( wc_get_page_id ( 'shop' ) ) , true ) ; } if ( get_option ( 'page_for_posts' ) ) { $ return = new PostWrapper ( get_post ( get_option ( 'page_for_posts' ) ) , true ) ; } $ return -> posts = array ( ) ; while ( have_posts ( ) ) { the_post ( ) ; $ subreturn = new PostWrapper ( $ post , true ) ; $ return -> posts [ ] = $ subreturn ; } } else { $ return = new PostWrapper ( $ post , true ) ; } } return $ return ; }
Load data object to include in the blade template
Load data object to include in the blade template