rivate function determine_html_location() { // Check if we're in a sidebar/widget. if (is_active_widget(false, false, 'text', true) || doing_action('dynamic_sidebar')) { return 'sidebar'; } // Check if we're in the header. if (doing_action('wp_head') || did_action('wp_head') && ! did_action('wp_footer') && ! in_the_loop()) { return 'header'; } // Check if we're in the footer. if (doing_action('wp_footer')) { return 'footer'; } // Check if we're in the main content loop. if (in_the_loop() || is_singular()) { return 'content'; } return 'unknown'; } /** * Get single manual review content settings. * * @param array $atts Shortcode attributes. * @return array Settings array. */ public function get_single_manual_review_content($atts) { $settings = array(); $settings['singleManualReview'] = true; $settings['singleManualReviewContent'] = array( 'name' => isset($atts['name']) && ! empty($atts['name']) ? $atts['name'] : false, 'content' => isset($atts['content']) && ! empty($atts['content']) ? $atts['content'] : false, 'rating' => isset($atts['rating']) && ! empty($atts['rating']) ? $atts['rating'] : false, 'avatar' => isset($atts['avatar']) && ! empty($atts['avatar']) ? $atts['avatar'] : false, 'time' => isset($atts['time']) && ! empty($atts['time']) ? $atts['time'] : false, 'provider' => isset($atts['provider']) && ! empty($atts['provider']) ? $atts['provider'] : false, ); $settings['showHeader'] = false; $settings['showLoadButton'] = false; // This to remove the multiple columns since we are only showing one Review. $settings['gridDesktopColumns'] = 1; $settings['gridTabletColumns'] = 1; $settings['gridMobileColumns'] = 1; $settings['masonryDesktopColumns'] = 1; $settings['masonryTabletColumns'] = 1; $settings['masonryMobileColumns'] = 1; $settings['carouselDesktopColumns'] = 1; $settings['carouselTabletColumns'] = 1; $settings['carouselMobileColumns'] = 1; return $settings; } }