/** * set parameters for scripts, etc. to run. * * @since 1.1.3 */ public function manage_output() { $this->setting = displayfeaturedimagegenesis_get_setting(); if ($this->quit_now()) { return; } $this->common = new Display_Featured_Image_Genesis_Common(); $this->item = Display_Featured_Image_Genesis_Common::get_image_variables(); add_filter('jetpack_photon_override_image_downsize', '__return_true'); add_action('wp_enqueue_scripts', array($this, 'load_scripts')); }
/** * set parameters for scripts, etc. to run. * * @since 1.1.3 */ public function manage_output() { $settings = new Display_Featured_Image_Genesis_Settings(); $this->displaysetting = $settings->get_display_setting(); $skip = $this->displaysetting['exclude_front']; $post_types = array('attachment', 'revision', 'nav_menu_item'); $skipped_types = apply_filters('display_featured_image_genesis_skipped_posttypes', $post_types); if (is_admin() || in_array(get_post_type(), $skipped_types) || $skip && is_front_page()) { return; } $this->common = new Display_Featured_Image_Genesis_Common(); $this->item = Display_Featured_Image_Genesis_Common::get_image_variables(); add_action('wp_enqueue_scripts', array($this, 'load_scripts')); add_filter('body_class', array($this, 'add_body_class')); }
/** * Custom Post Type image uploader * * @return image * * @since 2.0.0 */ public function set_cpt_image($args) { $item = Display_Featured_Image_Genesis_Common::get_image_variables(); $post_type = $args['post_type']->name; if (empty($this->displaysetting['post_type'][$post_type])) { $this->displaysetting['post_type'][$post_type] = $id = ''; } $id = $this->displaysetting['post_type'][$post_type]; $name = 'displayfeaturedimagegenesis[post_type][' . esc_attr($post_type) . ']'; if ($id) { echo wp_kses_post($this->render_image_preview($id)); } $this->render_buttons($id, $name); if (empty($id)) { return; } $description = sprintf(__('View your <a href="%1$s" target="_blank">%2$s</a> archive.', 'display-featured-image-genesis'), esc_url(get_post_type_archive_link($post_type)), esc_attr($args['post_type']->label)); printf('<p class="description">%s</p>', wp_kses_post($description)); }