options = $options; // Resizing method for responsive ads $this->resizing = array( 'auto' => __('Auto', 'advanced-ads'), ); } /** * GETTERS */ public function get_options() { return $this->options; } public function get_adsense_id( $ad = null ) { if ( ! empty( $ad ) ) { if ( isset( $ad->is_ad ) && true === $ad->is_ad && 'adsense' === $ad->type ) { $ad_content = json_decode( $ad->content ); if ( $ad_content && isset( $ad_content->pubId ) && !empty( $ad_content->pubId ) ) { return $ad_content->pubId; } } } return trim($this->options['adsense-id']); } public function get_limit_per_page() { return $this->options['limit-per-page']; } public function get_responsive_sizing() { $resizing = $this->resizing; $this->resizing = apply_filters('advanced-ads-gadsense-responsive-sizing', $resizing); return $this->resizing; } public static function get_instance() { if (null == self::$instance) { self::$instance = new self; } return self::$instance; } /** * ISSERS/HASSERS */ public function is_page_level_enabled() { return $this->options['page-level-enabled']; } }