mirror of
https://github.com/10h30/display-featured-image-genesis.git
synced 2026-06-05 15:08:20 +09:00
Update/add doc blocks
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
/**
|
||||
* Simple plugin to vary how the post/page featured image displays
|
||||
* This plugin works within the Genesis Framework, to display featured images in beautiful and dynamic ways.
|
||||
*
|
||||
* @package DisplayFeaturedImageGenesis
|
||||
* @author Robin Cornett <hello@robincornett.com>
|
||||
* @license GPL-2.0+
|
||||
* @link http://robincornett.com
|
||||
* @link https://robincornett.com
|
||||
* @copyright 2014-2016 Robin Cornett Creative, LLC
|
||||
*
|
||||
* @wordpress-plugin
|
||||
@@ -14,7 +14,7 @@
|
||||
* Description: This plugin works within the Genesis Framework, to display featured images in beautiful and dynamic ways.
|
||||
* Version: 2.5.1
|
||||
* Author: Robin Cornett
|
||||
* Author URI: http://robincornett.com
|
||||
* Author URI: https://robincornett.com
|
||||
* Text Domain: display-featured-image-genesis
|
||||
* License: GPL-2.0+
|
||||
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* @package DisplayFeaturedImageGenesis
|
||||
* @author Robin Cornett <hello@robincornett.com>
|
||||
* @license GPL-2.0+
|
||||
* @link http://robincornett.com
|
||||
* @link https://robincornett.com
|
||||
* @copyright 2015-2016 Robin Cornett Creative, LLC
|
||||
* @since 2.0.0
|
||||
*/
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* @package DisplayFeaturedImageGenesis
|
||||
* @author Robin Cornett <hello@robincornett.com>
|
||||
* @license GPL-2.0+
|
||||
* @link http://robincornett.com
|
||||
* @link https://robincornett.com
|
||||
* @copyright 2014-2016 Robin Cornett Creative, LLC
|
||||
*/
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* @package DisplayFeaturedImageGenesis
|
||||
* @author Robin Cornett <hello@robincornett.com>
|
||||
* @license GPL-2.0+
|
||||
* @link http://robincornett.com
|
||||
* @link https://robincornett.com
|
||||
* @copyright 2014-2016 Robin Cornett Creative, LLC
|
||||
* @since 1.2.1
|
||||
*/
|
||||
@@ -18,7 +18,7 @@ class Display_Featured_Image_Genesis_Common {
|
||||
* @var string
|
||||
* @since 1.4.3
|
||||
*/
|
||||
public $version = '2.5.1';
|
||||
public $version = '2.6.0';
|
||||
|
||||
/**
|
||||
* set and retrieve variables for the featured image.
|
||||
|
||||
@@ -30,6 +30,7 @@ class Display_Featured_Image_Genesis_Customizer extends Display_Featured_Image_G
|
||||
* Adds the individual sections, settings, and controls to the theme customizer
|
||||
* @param $wp_customize WP_Customize_Manager
|
||||
* @uses add_section() adds a section to the customizer
|
||||
* @since 2.6.0
|
||||
*/
|
||||
public function customizer( $wp_customize ) {
|
||||
|
||||
@@ -53,6 +54,7 @@ class Display_Featured_Image_Genesis_Customizer extends Display_Featured_Image_G
|
||||
/**
|
||||
* Build the Display Featured Image for Genesis Customizer settings panel.
|
||||
* @param $wp_customize
|
||||
* @since 2.6.0
|
||||
*/
|
||||
protected function build_fields( $wp_customize ) {
|
||||
$numbers = $this->number_fields();
|
||||
@@ -74,7 +76,9 @@ class Display_Featured_Image_Genesis_Customizer extends Display_Featured_Image_G
|
||||
}
|
||||
|
||||
/**
|
||||
* Define the number fields (height, max-height) for the customizer.
|
||||
* @return array
|
||||
* @since 2.6.0
|
||||
*/
|
||||
function number_fields() {
|
||||
return array(
|
||||
@@ -99,6 +103,11 @@ class Display_Featured_Image_Genesis_Customizer extends Display_Featured_Image_G
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Define all the checkbox fields for the customizer.
|
||||
* @return array
|
||||
* @since 2.6.0
|
||||
*/
|
||||
protected function checkbox_fields() {
|
||||
return array(
|
||||
array(
|
||||
@@ -129,6 +138,11 @@ class Display_Featured_Image_Genesis_Customizer extends Display_Featured_Image_G
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Define the control setting for the default image.
|
||||
* @return array
|
||||
* @since 2.6.0
|
||||
*/
|
||||
protected function default_image() {
|
||||
$common = new Display_Featured_Image_Genesis_Common();
|
||||
$size = $common->minimum_backstretch_width();
|
||||
@@ -142,27 +156,7 @@ class Display_Featured_Image_Genesis_Customizer extends Display_Featured_Image_G
|
||||
/**
|
||||
* @param $wp_customize WP_Customize_Manager
|
||||
* @param $setting
|
||||
*/
|
||||
protected function do_color_setting( $wp_customize, $setting ) {
|
||||
|
||||
$this->add_setting( $wp_customize, $setting );
|
||||
$wp_customize->add_control(
|
||||
new WP_Customize_Color_Control(
|
||||
$wp_customize,
|
||||
$this->section . '[' . $setting['setting'] . ']',
|
||||
array(
|
||||
'description' => $setting['description'],
|
||||
'label' => $setting['label'],
|
||||
'section' => $this->section,
|
||||
'settings' => $this->section . '[' . $setting['setting'] . ']',
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $wp_customize WP_Customize_Manager
|
||||
* @param $setting
|
||||
* @since 2.6.0
|
||||
*/
|
||||
protected function do_image_setting( $wp_customize, $setting ) {
|
||||
$this->add_setting( $wp_customize, $setting );
|
||||
@@ -183,6 +177,7 @@ class Display_Featured_Image_Genesis_Customizer extends Display_Featured_Image_G
|
||||
/**
|
||||
* @param $wp_customize WP_Customize_Manager
|
||||
* @param $setting
|
||||
* @since 2.6.0
|
||||
*/
|
||||
protected function add_control( $wp_customize, $setting ) {
|
||||
$this->add_setting( $wp_customize, $setting );
|
||||
@@ -202,6 +197,7 @@ class Display_Featured_Image_Genesis_Customizer extends Display_Featured_Image_G
|
||||
/**
|
||||
* @param $wp_customize WP_Customize_Manager
|
||||
* @param $setting
|
||||
* @since 2.6.0
|
||||
*/
|
||||
protected function add_setting( $wp_customize, $setting ) {
|
||||
$wp_customize->add_setting(
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* @package DisplayFeaturedImageGenesis
|
||||
* @author Robin Cornett <hello@robincornett.com>
|
||||
* @license GPL-2.0+
|
||||
* @link http://robincornett.com
|
||||
* @link https://robincornett.com
|
||||
* @copyright 2014-2016 Robin Cornett Creative, LLC
|
||||
*/
|
||||
|
||||
|
||||
@@ -2,12 +2,16 @@
|
||||
|
||||
/**
|
||||
* Class DisplayFeaturedImageGenesisDoSetting
|
||||
* @package DisplayFeaturedImageGenesis
|
||||
* @package Display_Featured_Image_Genesis
|
||||
* @copyright 2016 Robin Cornett
|
||||
*/
|
||||
class DisplayFeaturedImageGenesisGetSetting {
|
||||
|
||||
|
||||
/**
|
||||
* Define the default plugin settings.
|
||||
* @return mixed|void
|
||||
* @since 2.6.0
|
||||
*/
|
||||
public function defaults() {
|
||||
return apply_filters( 'displayfeaturedimagegenesis_defaults', array(
|
||||
'less_header' => 0,
|
||||
|
||||
@@ -3,14 +3,22 @@
|
||||
* @package DisplayFeaturedImageGenesis
|
||||
* @author Robin Cornett <hello@robincornett.com>
|
||||
* @license GPL-2.0+
|
||||
* @link http://robincornett.com
|
||||
* @link https://robincornett.com
|
||||
* @copyright 2014-2016 Robin Cornett Creative, LLC
|
||||
*/
|
||||
|
||||
class Display_Featured_Image_Genesis_Helper extends DisplayFeaturedImageGenesisGetSetting {
|
||||
|
||||
/**
|
||||
* Variable for the plugin setting.
|
||||
* @var $setting
|
||||
*/
|
||||
protected $setting;
|
||||
|
||||
/**
|
||||
* Base id/slug for the settings page.
|
||||
* @var string $page
|
||||
*/
|
||||
protected $page = 'displayfeaturedimagegenesis';
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* @package DisplayFeaturedImageGenesis
|
||||
* @author Robin Cornett <hello@robincornett.com>
|
||||
* @license GPL-2.0+
|
||||
* @link http://robincornett.com
|
||||
* @link https://robincornett.com
|
||||
* @copyright 2014-2016 Robin Cornett Creative, LLC
|
||||
*/
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* @package DisplayFeaturedImageGenesis
|
||||
* @author Robin Cornett <hello@robincornett.com>
|
||||
* @license GPL-2.0+
|
||||
* @link http://robincornett.com
|
||||
* @link https://robincornett.com
|
||||
* @copyright 2014-2016 Robin Cornett Creative, LLC
|
||||
*/
|
||||
class Display_Featured_Image_Genesis_Post_Meta {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* @package DisplayFeaturedImageGenesis
|
||||
* @author Robin Cornett <hello@robincornett.com>
|
||||
* @license GPL-2.0+
|
||||
* @link http://robincornett.com
|
||||
* @link https://robincornett.com
|
||||
* @copyright 2014-2016 Robin Cornett Creative, LLC
|
||||
*/
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* @package DisplayFeaturedImageGenesis
|
||||
* @author Robin Cornett <hello@robincornett.com>
|
||||
* @license GPL-2.0+
|
||||
* @link http://robincornett.com
|
||||
* @link https://robincornett.com
|
||||
* @copyright 2014-2016 Robin Cornett Creative, LLC
|
||||
*/
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* @package DisplayFeaturedImageGenesis
|
||||
* @author Robin Cornett <hello@robincornett.com>
|
||||
* @license GPL-2.0+
|
||||
* @link http://robincornett.com
|
||||
* @link https://robincornett.com
|
||||
* @copyright 2014-2016 Robin Cornett Creative, LLC
|
||||
*
|
||||
* @since 2.0.0
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* @package DisplayFeaturedImageGenesis
|
||||
* @author Robin Cornett <hello@robincornett.com>
|
||||
* @license GPL-2.0+
|
||||
* @link http://robincornett.com
|
||||
* @link https://robincornett.com
|
||||
* @copyright 2014-2016 Robin Cornett Creative, LLC
|
||||
*/
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @package DisplayFeaturedImageGenesis
|
||||
* @author Robin Cornett <hello@robincornett.com>
|
||||
* @link http://robincornett.com
|
||||
* @link https://robincornett.com
|
||||
* @copyright 2014-2016 Robin Cornett Creative, LLC
|
||||
* @license GPL-2.0+
|
||||
* @since 2.0.0
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* @package DisplayFeaturedImageGenesis
|
||||
* @author Robin Cornett <hello@robincornett.com>
|
||||
* @license GPL-2.0+
|
||||
* @link http://robincornett.com
|
||||
* @link https://robincornett.com
|
||||
* @copyright 2014-2016 Robin Cornett Creative, LLC
|
||||
* @since 2.0.0
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user