mirror of
https://github.com/10h30/display-featured-image-genesis.git
synced 2026-06-05 15:08:20 +09:00
Update for PHP8, version bump to 3.2.4
This commit is contained in:
@@ -12,7 +12,10 @@
|
|||||||
* Plugin Name: Display Featured Image for Genesis
|
* Plugin Name: Display Featured Image for Genesis
|
||||||
* Plugin URI: https://github.com/robincornett/display-featured-image-genesis/
|
* Plugin URI: https://github.com/robincornett/display-featured-image-genesis/
|
||||||
* Description: This plugin works within the Genesis Framework, to display featured images in beautiful and dynamic ways.
|
* Description: This plugin works within the Genesis Framework, to display featured images in beautiful and dynamic ways.
|
||||||
* Version: 3.2.2
|
* Version: 3.2.3
|
||||||
|
* Requires at least: 5.2
|
||||||
|
* Requires PHP: 7.4
|
||||||
|
* Tested up to: 6.4
|
||||||
* Author: Robin Cornett
|
* Author: Robin Cornett
|
||||||
* Author URI: https://robincornett.com
|
* Author URI: https://robincornett.com
|
||||||
* Text Domain: display-featured-image-genesis
|
* Text Domain: display-featured-image-genesis
|
||||||
|
|||||||
@@ -97,7 +97,6 @@ class Display_Featured_Image_Genesis_Admin {
|
|||||||
$new_columns['featured_image'] = __( 'Image', 'display-featured-image-genesis' );
|
$new_columns['featured_image'] = __( 'Image', 'display-featured-image-genesis' );
|
||||||
|
|
||||||
return array_merge( $new_columns, $columns );
|
return array_merge( $new_columns, $columns );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -119,7 +118,7 @@ class Display_Featured_Image_Genesis_Admin {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$taxonomy = filter_input( INPUT_POST, 'taxonomy', FILTER_SANITIZE_STRING );
|
$taxonomy = filter_input( INPUT_POST, 'taxonomy', FILTER_SANITIZE_SPECIAL_CHARS );
|
||||||
$taxonomy = ! is_null( $taxonomy ) ? $taxonomy : get_current_screen()->taxonomy;
|
$taxonomy = ! is_null( $taxonomy ) ? $taxonomy : get_current_screen()->taxonomy;
|
||||||
$args = array(
|
$args = array(
|
||||||
'image_id' => $image_id,
|
'image_id' => $image_id,
|
||||||
@@ -128,7 +127,6 @@ class Display_Featured_Image_Genesis_Admin {
|
|||||||
);
|
);
|
||||||
|
|
||||||
echo wp_kses_post( $this->admin_featured_image( $args ) );
|
echo wp_kses_post( $this->admin_featured_image( $args ) );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -156,7 +154,6 @@ class Display_Featured_Image_Genesis_Admin {
|
|||||||
);
|
);
|
||||||
|
|
||||||
echo wp_kses_post( $this->admin_featured_image( $args ) );
|
echo wp_kses_post( $this->admin_featured_image( $args ) );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -199,7 +196,6 @@ class Display_Featured_Image_Genesis_Admin {
|
|||||||
);
|
);
|
||||||
|
|
||||||
return $this->admin_featured_image( $args );
|
return $this->admin_featured_image( $args );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ class Display_Featured_Image_Genesis_Common {
|
|||||||
* @var string
|
* @var string
|
||||||
* @since 1.4.3
|
* @since 1.4.3
|
||||||
*/
|
*/
|
||||||
public $version = '3.2.2';
|
public $version = '3.2.3';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var $instance
|
* @var $instance
|
||||||
|
|||||||
@@ -1,311 +1,311 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Display Featured Image for Genesis
|
* Display Featured Image for Genesis
|
||||||
*
|
*
|
||||||
* @package DisplayFeaturedImageGenesis
|
* @package DisplayFeaturedImageGenesis
|
||||||
* @author Robin Cornett <hello@robincornett.com>
|
* @author Robin Cornett <hello@robincornett.com>
|
||||||
* @link https://github.com/robincornett/display-featured-image-genesis/
|
* @link https://github.com/robincornett/display-featured-image-genesis/
|
||||||
* @copyright 2014-2020 Robin Cornett
|
* @copyright 2014-2020 Robin Cornett
|
||||||
* @license GPL-2.0+
|
* @license GPL-2.0+
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Main plugin class.
|
* Main plugin class.
|
||||||
*
|
*
|
||||||
* @package DisplayFeaturedImageGenesis
|
* @package DisplayFeaturedImageGenesis
|
||||||
*/
|
*/
|
||||||
class Display_Featured_Image_Genesis {
|
class Display_Featured_Image_Genesis {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Admin area class: handles columns.
|
* Admin area class: handles columns.
|
||||||
* @var Display_Featured_Image_Genesis_Admin $admin
|
* @var Display_Featured_Image_Genesis_Admin $admin
|
||||||
*/
|
*/
|
||||||
protected $admin;
|
protected $admin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds new author meta.
|
* Adds new author meta.
|
||||||
* @var Display_Featured_Image_Genesis_Author $author
|
* @var Display_Featured_Image_Genesis_Author $author
|
||||||
*/
|
*/
|
||||||
protected $author;
|
protected $author;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var $customizer Display_Featured_Image_Genesis_Customizer
|
* @var $customizer Display_Featured_Image_Genesis_Customizer
|
||||||
*/
|
*/
|
||||||
protected $customizer;
|
protected $customizer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* All archive description functions.
|
* All archive description functions.
|
||||||
* @var Display_Featured_Image_Genesis_Description $description
|
* @var Display_Featured_Image_Genesis_Description $description
|
||||||
*/
|
*/
|
||||||
protected $description;
|
protected $description;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles all image output functionality
|
* Handles all image output functionality
|
||||||
* @var Display_Featured_Image_Genesis_Output $output
|
* @var Display_Featured_Image_Genesis_Output $output
|
||||||
*/
|
*/
|
||||||
protected $output;
|
protected $output;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates metabox on post edit page
|
* Updates metabox on post edit page
|
||||||
* @var Display_Featured_Image_Genesis_Post_Meta $post_meta
|
* @var Display_Featured_Image_Genesis_Post_Meta $post_meta
|
||||||
*/
|
*/
|
||||||
protected $post_meta;
|
protected $post_meta;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles RSS feed output
|
* Handles RSS feed output
|
||||||
* @var Display_Featured_Image_Genesis_RSS $rss
|
* @var Display_Featured_Image_Genesis_RSS $rss
|
||||||
*/
|
*/
|
||||||
protected $rss;
|
protected $rss;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets up settings page for the plugin.
|
* Sets up settings page for the plugin.
|
||||||
* @var Display_Featured_Image_Genesis_Settings $settings
|
* @var Display_Featured_Image_Genesis_Settings $settings
|
||||||
*/
|
*/
|
||||||
protected $settings;
|
protected $settings;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles term meta.
|
* Handles term meta.
|
||||||
* @var Display_Featured_Image_Genesis_Taxonomies $taxonomies
|
* @var Display_Featured_Image_Genesis_Taxonomies $taxonomies
|
||||||
*/
|
*/
|
||||||
protected $taxonomies;
|
protected $taxonomies;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register widgets and related shortcodes.
|
* Register widgets and related shortcodes.
|
||||||
*
|
*
|
||||||
* @var \DisplayFeaturedImageGenesisWidgets
|
* @var \DisplayFeaturedImageGenesisWidgets
|
||||||
*/
|
*/
|
||||||
protected $widgets;
|
protected $widgets;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Display_Featured_Image_Genesis constructor.
|
* Display_Featured_Image_Genesis constructor.
|
||||||
*
|
*
|
||||||
* @param $admin
|
* @param $admin
|
||||||
* @param $author
|
* @param $author
|
||||||
* @param $customizer
|
* @param $customizer
|
||||||
* @param $output
|
* @param $output
|
||||||
* @param $post_meta
|
* @param $post_meta
|
||||||
* @param $rss
|
* @param $rss
|
||||||
* @param $settings
|
* @param $settings
|
||||||
* @param $taxonomies
|
* @param $taxonomies
|
||||||
* @param $widgets
|
* @param $widgets
|
||||||
*/
|
*/
|
||||||
public function __construct( $admin, $author, $customizer, $output, $post_meta, $rss, $settings, $taxonomies, $widgets ) {
|
public function __construct( $admin, $author, $customizer, $output, $post_meta, $rss, $settings, $taxonomies, $widgets ) {
|
||||||
$this->admin = $admin;
|
$this->admin = $admin;
|
||||||
$this->author = $author;
|
$this->author = $author;
|
||||||
$this->customizer = $customizer;
|
$this->customizer = $customizer;
|
||||||
$this->output = $output;
|
$this->output = $output;
|
||||||
$this->post_meta = $post_meta;
|
$this->post_meta = $post_meta;
|
||||||
$this->rss = $rss;
|
$this->rss = $rss;
|
||||||
$this->settings = $settings;
|
$this->settings = $settings;
|
||||||
$this->taxonomies = $taxonomies;
|
$this->taxonomies = $taxonomies;
|
||||||
$this->widgets = $widgets;
|
$this->widgets = $widgets;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Main plugin function. Starts up all the things.
|
* Main plugin function. Starts up all the things.
|
||||||
*/
|
*/
|
||||||
public function run() {
|
public function run() {
|
||||||
if ( 'genesis' !== basename( get_template_directory() ) ) {
|
if ( 'genesis' !== basename( get_template_directory() ) ) {
|
||||||
add_action( 'admin_init', array( $this, 'deactivate' ) );
|
add_action( 'admin_init', array( $this, 'deactivate' ) );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once plugin_dir_path( __FILE__ ) . 'helper-functions.php';
|
require_once plugin_dir_path( __FILE__ ) . 'helper-functions.php';
|
||||||
|
|
||||||
// Plugin setup
|
// Plugin setup
|
||||||
add_action( 'after_setup_theme', array( $this, 'add_plugin_supports' ) );
|
add_action( 'after_setup_theme', array( $this, 'add_plugin_supports' ) );
|
||||||
add_action( 'plugins_loaded', array( $this, 'load_textdomain' ) );
|
add_action( 'plugins_loaded', array( $this, 'load_textdomain' ) );
|
||||||
add_filter( 'plugin_action_links_' . DISPLAYFEATUREDIMAGEGENESIS_BASENAME, array( $this, 'add_settings_link' ) );
|
add_filter( 'plugin_action_links_' . DISPLAYFEATUREDIMAGEGENESIS_BASENAME, array( $this, 'add_settings_link' ) );
|
||||||
add_action( 'init', array( $this, 'check_settings' ) );
|
add_action( 'init', array( $this, 'check_settings' ) );
|
||||||
|
|
||||||
// Admin
|
// Admin
|
||||||
add_action( 'admin_init', array( $this->admin, 'set_up_columns' ) );
|
add_action( 'admin_init', array( $this->admin, 'set_up_columns' ) );
|
||||||
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
|
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
|
||||||
|
|
||||||
// Widgets
|
// Widgets
|
||||||
add_action( 'widgets_init', array( $this->widgets, 'register_widgets' ) );
|
add_action( 'widgets_init', array( $this->widgets, 'register_widgets' ) );
|
||||||
add_action( 'widgets_init', array( $this->widgets, 'register_shortcodes' ) );
|
add_action( 'widgets_init', array( $this->widgets, 'register_shortcodes' ) );
|
||||||
add_action( 'init', array( $this->widgets, 'register_blocks' ) );
|
add_action( 'init', array( $this->widgets, 'register_blocks' ) );
|
||||||
add_action( 'admin_enqueue_scripts', array( $this->widgets, 'enqueue_scripts' ) );
|
add_action( 'admin_enqueue_scripts', array( $this->widgets, 'enqueue_scripts' ) );
|
||||||
|
|
||||||
// Taxonomies, Authors
|
// Taxonomies, Authors
|
||||||
add_filter( 'displayfeaturedimagegenesis_get_taxonomies', array( $this->taxonomies, 'remove_post_status_terms' ) );
|
add_filter( 'displayfeaturedimagegenesis_get_taxonomies', array( $this->taxonomies, 'remove_post_status_terms' ) );
|
||||||
add_action( 'admin_init', array( $this->taxonomies, 'set_taxonomy_meta' ) );
|
add_action( 'admin_init', array( $this->taxonomies, 'set_taxonomy_meta' ) );
|
||||||
add_action( 'admin_init', array( $this->author, 'set_author_meta' ) );
|
add_action( 'admin_init', array( $this->author, 'set_author_meta' ) );
|
||||||
|
|
||||||
// Post Meta
|
// Post Meta
|
||||||
add_action( 'add_meta_boxes', array( $this->post_meta, 'add_metabox' ), 10, 2 );
|
add_action( 'add_meta_boxes', array( $this->post_meta, 'add_metabox' ), 10, 2 );
|
||||||
add_filter( 'admin_post_thumbnail_html', array( $this->post_meta, 'meta_box' ), 10, 2 );
|
add_filter( 'admin_post_thumbnail_html', array( $this->post_meta, 'meta_box' ), 10, 2 );
|
||||||
add_action( 'save_post', array( $this->post_meta, 'save_meta' ) );
|
add_action( 'save_post', array( $this->post_meta, 'save_meta' ) );
|
||||||
|
|
||||||
// Settings
|
// Settings
|
||||||
add_action( 'admin_menu', array( $this->settings, 'do_submenu_page' ) );
|
add_action( 'admin_menu', array( $this->settings, 'do_submenu_page' ) );
|
||||||
add_filter( 'displayfeaturedimagegenesis_get_setting', array( $this->settings, 'get_display_setting' ) );
|
add_filter( 'displayfeaturedimagegenesis_get_setting', array( $this->settings, 'get_display_setting' ) );
|
||||||
|
|
||||||
// Customizer
|
// Customizer
|
||||||
add_action( 'customize_register', array( $this->customizer, 'customizer' ) );
|
add_action( 'customize_register', array( $this->customizer, 'customizer' ) );
|
||||||
|
|
||||||
// Front End Output
|
// Front End Output
|
||||||
add_action( 'get_header', array( $this->output, 'manage_output' ) );
|
add_action( 'get_header', array( $this->output, 'manage_output' ) );
|
||||||
add_filter( 'genesis_get_image_default_args', array( $this->output, 'change_thumbnail_fallback' ) );
|
add_filter( 'genesis_get_image_default_args', array( $this->output, 'change_thumbnail_fallback' ) );
|
||||||
|
|
||||||
// RSS
|
// RSS
|
||||||
add_action( 'template_redirect', array( $this->rss, 'maybe_do_feed' ) );
|
add_action( 'template_redirect', array( $this->rss, 'maybe_do_feed' ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* deactivates the plugin if Genesis isn't running
|
* deactivates the plugin if Genesis isn't running
|
||||||
*
|
*
|
||||||
* @since 1.1.2
|
* @since 1.1.2
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function deactivate() {
|
public function deactivate() {
|
||||||
deactivate_plugins( DISPLAYFEATUREDIMAGEGENESIS_BASENAME );
|
deactivate_plugins( DISPLAYFEATUREDIMAGEGENESIS_BASENAME );
|
||||||
add_action( 'admin_notices', array( $this, 'error_message' ) );
|
add_action( 'admin_notices', array( $this, 'error_message' ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Error message if we're not using the Genesis Framework.
|
* Error message if we're not using the Genesis Framework.
|
||||||
*
|
*
|
||||||
* @since 1.1.0
|
* @since 1.1.0
|
||||||
*/
|
*/
|
||||||
public function error_message() {
|
public function error_message() {
|
||||||
|
|
||||||
$error = sprintf( __( 'Sorry, Display Featured Image for Genesis works only with the Genesis Framework. It has been deactivated.', 'display-featured-image-genesis' ) );
|
$error = sprintf( __( 'Sorry, Display Featured Image for Genesis works only with the Genesis Framework. It has been deactivated.', 'display-featured-image-genesis' ) );
|
||||||
|
|
||||||
if ( version_compare( PHP_VERSION, '5.6', '<' ) ) {
|
if ( version_compare( PHP_VERSION, '5.6', '<' ) ) {
|
||||||
$error = $error . sprintf(
|
$error = $error . sprintf(
|
||||||
/* translators: placeholder is the user's PHP version. */
|
/* translators: placeholder is the user's PHP version. */
|
||||||
__( ' But since we\'re talking anyway, did you know that your server is running PHP version %1$s, which is outdated? You should ask your host to update that for you.', 'display-featured-image-genesis' ),
|
__( ' But since we\'re talking anyway, did you know that your server is running PHP version %1$s, which is outdated? You should ask your host to update that for you.', 'display-featured-image-genesis' ),
|
||||||
PHP_VERSION
|
PHP_VERSION
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '<div class="error"><p>' . esc_attr( $error ) . '</p></div>';
|
echo '<div class="error"><p>' . esc_attr( $error ) . '</p></div>';
|
||||||
|
|
||||||
if ( isset( $_GET['activate'] ) ) {
|
if ( isset( $_GET['activate'] ) ) {
|
||||||
unset( $_GET['activate'] );
|
unset( $_GET['activate'] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register a custom image size for banners, and add excerpt support for pages if needed.
|
* Register a custom image size for banners, and add excerpt support for pages if needed.
|
||||||
* @since 1.3.0
|
* @since 1.3.0
|
||||||
*
|
*
|
||||||
* If the Core image size has not been registered (pre-5.3), register it. The plugin is
|
* If the Core image size has not been registered (pre-5.3), register it. The plugin is
|
||||||
* transitioning to using the new 2048x2048 image size.
|
* transitioning to using the new 2048x2048 image size.
|
||||||
* @since 3.2.0
|
* @since 3.2.0
|
||||||
*/
|
*/
|
||||||
public function add_plugin_supports() {
|
public function add_plugin_supports() {
|
||||||
|
|
||||||
if ( ! has_image_size( '2048x2048' ) ) {
|
if ( ! has_image_size( '2048x2048' ) ) {
|
||||||
$args = apply_filters(
|
$args = apply_filters(
|
||||||
'displayfeaturedimagegenesis_custom_image_size',
|
'displayfeaturedimagegenesis_custom_image_size',
|
||||||
array(
|
array(
|
||||||
'width' => 2048,
|
'width' => 2048,
|
||||||
'height' => 2048,
|
'height' => 2048,
|
||||||
'crop' => false,
|
'crop' => false,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
add_image_size( '2048x2048', (int) $args['width'], (int) $args['height'], (bool) $args['crop'] );
|
add_image_size( '2048x2048', (int) $args['width'], (int) $args['height'], (bool) $args['crop'] );
|
||||||
}
|
}
|
||||||
|
|
||||||
$move_excerpts = displayfeaturedimagegenesis_get_setting( 'move_excerpts' );
|
$move_excerpts = displayfeaturedimagegenesis_get_setting( 'move_excerpts' );
|
||||||
if ( $move_excerpts ) {
|
if ( $move_excerpts ) {
|
||||||
add_post_type_support( 'page', 'excerpt' );
|
add_post_type_support( 'page', 'excerpt' );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set up text domain for translations
|
* Set up text domain for translations
|
||||||
*
|
*
|
||||||
* @since 1.1.0
|
* @since 1.1.0
|
||||||
*/
|
*/
|
||||||
public function load_textdomain() {
|
public function load_textdomain() {
|
||||||
load_plugin_textdomain( 'display-featured-image-genesis' );
|
load_plugin_textdomain( 'display-featured-image-genesis' );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* enqueue admin scripts
|
* enqueue admin scripts
|
||||||
*
|
*
|
||||||
* @since 1.2.1
|
* @since 1.2.1
|
||||||
*/
|
*/
|
||||||
public function enqueue_scripts() {
|
public function enqueue_scripts() {
|
||||||
|
|
||||||
$version = displayfeaturedimagegenesis_get()->version;
|
$version = displayfeaturedimagegenesis_get()->version;
|
||||||
$minify = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
|
$minify = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
|
||||||
|
|
||||||
wp_register_script( 'displayfeaturedimage-upload', plugins_url( "/includes/js/settings-upload{$minify}.js", dirname( __FILE__ ) ), array( 'jquery', 'media-upload', 'thickbox' ), $version, true );
|
wp_register_script( 'displayfeaturedimage-upload', plugins_url( "/includes/js/settings-upload{$minify}.js", dirname( __FILE__ ) ), array( 'jquery', 'media-upload', 'thickbox' ), $version, true );
|
||||||
wp_register_script( 'widget_selector', plugins_url( "/includes/js/widget-selector{$minify}.js", dirname( __FILE__ ) ), array( 'jquery' ), $version, true );
|
wp_register_script( 'widget_selector', plugins_url( "/includes/js/widget-selector{$minify}.js", dirname( __FILE__ ) ), array( 'jquery' ), $version, true );
|
||||||
|
|
||||||
$screen = get_current_screen();
|
$screen = get_current_screen();
|
||||||
$screen_ids = array(
|
$screen_ids = array(
|
||||||
'appearance_page_displayfeaturedimagegenesis',
|
'appearance_page_displayfeaturedimagegenesis',
|
||||||
'profile',
|
'profile',
|
||||||
'user-edit',
|
'user-edit',
|
||||||
);
|
);
|
||||||
|
|
||||||
if ( in_array( $screen->id, $screen_ids, true ) || ! empty( $screen->taxonomy ) ) {
|
if ( in_array( $screen->id, $screen_ids, true ) || ! empty( $screen->taxonomy ) ) {
|
||||||
wp_enqueue_media();
|
wp_enqueue_media();
|
||||||
wp_enqueue_script( 'displayfeaturedimage-upload' );
|
wp_enqueue_script( 'displayfeaturedimage-upload' );
|
||||||
wp_localize_script(
|
wp_localize_script(
|
||||||
'displayfeaturedimage-upload',
|
'displayfeaturedimage-upload',
|
||||||
'DisplayFeaturedImageGenesis',
|
'DisplayFeaturedImageGenesis',
|
||||||
array(
|
array(
|
||||||
'text' => __( 'Select Image', 'display-featured-image-genesis' ),
|
'text' => __( 'Select Image', 'display-featured-image-genesis' ),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add link to plugin settings page in plugin table
|
* Add link to plugin settings page in plugin table
|
||||||
* @param $links array link to settings page
|
* @param $links array link to settings page
|
||||||
* @return array
|
* @return array
|
||||||
*
|
*
|
||||||
* @since 2.3.0
|
* @since 2.3.0
|
||||||
*/
|
*/
|
||||||
public function add_settings_link( $links ) {
|
public function add_settings_link( $links ) {
|
||||||
$links[] = sprintf( '<a href="%s">%s</a>', esc_url( admin_url( 'themes.php?page=displayfeaturedimagegenesis' ) ), esc_attr__( 'Settings', 'display-featured-image-genesis' ) );
|
$links[] = sprintf( '<a href="%s">%s</a>', esc_url( admin_url( 'themes.php?page=displayfeaturedimagegenesis' ) ), esc_attr__( 'Settings', 'display-featured-image-genesis' ) );
|
||||||
return $links;
|
return $links;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check the plugin setting and maybe update it to use the new image size,
|
* Check the plugin setting and maybe update it to use the new image size,
|
||||||
* which is registered in Core in WP5.3.
|
* which is registered in Core in WP5.3.
|
||||||
*
|
*
|
||||||
* @since 3.2.0
|
* @since 3.2.0
|
||||||
*/
|
*/
|
||||||
public function check_settings() {
|
public function check_settings() {
|
||||||
|
|
||||||
$setting = displayfeaturedimagegenesis_get_setting();
|
$setting = displayfeaturedimagegenesis_get_setting();
|
||||||
if ( empty( $setting ) ) {
|
if ( empty( $setting ) ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$new_setting = array();
|
$new_setting = array();
|
||||||
if ( 'displayfeaturedimage_backstretch' === $setting['image_size'] ) {
|
if ( 'displayfeaturedimage_backstretch' === $setting['image_size'] ) {
|
||||||
$new_setting['image_size'] = '2048x2048';
|
$new_setting['image_size'] = '2048x2048';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $new_setting ) {
|
if ( $new_setting ) {
|
||||||
$this->update_settings(
|
$this->update_settings(
|
||||||
$new_setting,
|
$new_setting,
|
||||||
$setting
|
$setting
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Takes an array of new settings, merges with the current setting, and updates the setting.
|
* Takes an array of new settings, merges with the current setting, and updates the setting.
|
||||||
*
|
*
|
||||||
* @param array $new
|
* @param array $new
|
||||||
* @param array $old_setting
|
* @param array $old_setting
|
||||||
* @return boolean
|
* @return boolean
|
||||||
* @since 3.2.0
|
* @since 3.2.0
|
||||||
*/
|
*/
|
||||||
private function update_settings( $new = array(), $old_setting ) {
|
private function update_settings( $new_setting = array(), $old_setting = array() ) {
|
||||||
return update_option( 'displayfeaturedimagegenesis', wp_parse_args( $new, $old_setting ) );
|
return update_option( 'displayfeaturedimagegenesis', wp_parse_args( $new_setting, $old_setting ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
div[class^="wp-block-displayfeaturedimagegenesis"]{overflow:auto}div[class^="wp-block-displayfeaturedimagegenesis"]:before{position:absolute;top:0;right:0;bottom:0;left:0;content:' ';background-color:rgba(255,255,255,0)}.displayfeaturedimagegenesis-placeholder{text-align:center;background:#eee;color:#111;padding:18px}
|
div[class^=wp-block-displayfeaturedimagegenesis]{overflow:auto}div[class^=wp-block-displayfeaturedimagegenesis]:before{position:absolute;top:0;right:0;bottom:0;left:0;content:" ";background-color:rgba(255,255,255,0)}.displayfeaturedimagegenesis-placeholder{text-align:center;background:#eee;color:#111;padding:18px}
|
||||||
@@ -1 +1 @@
|
|||||||
.has-leader .site-inner{margin-top:0}.big-leader{overflow:hidden;height:100vh;position:relative}.big-leader .wrap{position:absolute;right:0;bottom:0;left:0;width:100%;z-index:1}.big-leader__image{display:block;height:100vh;max-width:none;-o-object-fit:cover;object-fit:cover;width:100vw}.big-leader .featured-image-overlay{color:#fff;text-align:center}.big-leader .excerpt,.big-leader .archive-description{margin-bottom:24px;padding:24px;background:rgba(255,255,255,.85)}.big-leader p{margin-top:18px;margin-bottom:0}.home .big-leader p{margin-top:0}.home .big-leader p:last-child{margin-bottom:0}.big-leader .excerpt .entry-title,.big-leader .archive-description .archive-title{margin-bottom:0}@keyframes dfig-fadein{from{opacity:0}to{opacity:1}}.backstretch.no-js{max-height:600px}img.featured{max-width:100%}
|
.has-leader .site-inner{margin-top:0}.big-leader{overflow:hidden;max-height:100vh;position:relative}.big-leader .wrap{position:absolute;right:0;bottom:0;left:0;width:100%;z-index:1}.big-leader__image{display:block;height:100vh;max-width:none;object-fit:cover;width:100vw}.big-leader .featured-image-overlay{color:#fff;text-align:center}.big-leader .excerpt,.big-leader .archive-description{margin-bottom:24px;padding:24px;background:rgba(255,255,255,.85)}.big-leader p{margin-top:18px;margin-bottom:0}.home .big-leader p{margin-top:0}.home .big-leader p:last-child{margin-bottom:0}.big-leader .excerpt .entry-title,.big-leader .archive-description .archive-title{margin-bottom:0}@keyframes dfig-fadein{from{opacity:0}to{opacity:1}}.backstretch.no-js{max-height:600px}img.featured{max-width:100%}
|
||||||
@@ -1,380 +1,380 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Display_Featured_Image_Genesis_Helper
|
* Class Display_Featured_Image_Genesis_Helper
|
||||||
* @package DisplayFeaturedImageGenesis
|
* @package DisplayFeaturedImageGenesis
|
||||||
* @copyright 2017-2020 Robin Cornett
|
* @copyright 2017-2020 Robin Cornett
|
||||||
*/
|
*/
|
||||||
class Display_Featured_Image_Genesis_Helper extends DisplayFeaturedImageGenesisGetSetting {
|
class Display_Featured_Image_Genesis_Helper extends DisplayFeaturedImageGenesisGetSetting {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base id/slug for the settings page.
|
* Base id/slug for the settings page.
|
||||||
* @var string $page
|
* @var string $page
|
||||||
*/
|
*/
|
||||||
protected $page = 'displayfeaturedimagegenesis';
|
protected $page = 'displayfeaturedimagegenesis';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The image settings class.
|
* The image settings class.
|
||||||
* @var $images \DisplayFeaturedImageGenesisSettingsImages
|
* @var $images \DisplayFeaturedImageGenesisSettingsImages
|
||||||
*/
|
*/
|
||||||
private $images;
|
private $images;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generic function to add settings sections
|
* Generic function to add settings sections
|
||||||
*
|
*
|
||||||
* @since 2.4.0
|
* @since 2.4.0
|
||||||
*
|
*
|
||||||
* @param $sections
|
* @param $sections
|
||||||
*/
|
*/
|
||||||
protected function add_sections( $sections ) {
|
protected function add_sections( $sections ) {
|
||||||
|
|
||||||
foreach ( $sections as $section ) {
|
foreach ( $sections as $section ) {
|
||||||
add_settings_section(
|
add_settings_section(
|
||||||
$this->page . '_' . $section['id'],
|
$this->page . '_' . $section['id'],
|
||||||
$section['title'],
|
$section['title'],
|
||||||
array( $this, 'section_description' ),
|
array( $this, 'section_description' ),
|
||||||
$this->page . '_' . $section['tab']
|
$this->page . '_' . $section['tab']
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generic function to add settings fields
|
* Generic function to add settings fields
|
||||||
*
|
*
|
||||||
* @param $fields
|
* @param $fields
|
||||||
* @param array $sections registered sections
|
* @param array $sections registered sections
|
||||||
*
|
*
|
||||||
* @since 2.4.0
|
* @since 2.4.0
|
||||||
*/
|
*/
|
||||||
protected function add_fields( $fields, $sections ) {
|
protected function add_fields( $fields, $sections ) {
|
||||||
foreach ( $fields as $field ) {
|
foreach ( $fields as $field ) {
|
||||||
add_settings_field(
|
add_settings_field(
|
||||||
$field['id'],
|
$field['id'],
|
||||||
sprintf( '<label for="%s-%s">%s</label>', $this->page, $field['id'], $field['title'] ),
|
sprintf( '<label for="%s-%s">%s</label>', $this->page, $field['id'], $field['title'] ),
|
||||||
array( $this, 'do_field' ),
|
array( $this, 'do_field' ),
|
||||||
$this->page . '_' . $sections[ $field['section'] ]['tab'],
|
$this->page . '_' . $sections[ $field['section'] ]['tab'],
|
||||||
$this->page . '_' . $sections[ $field['section'] ]['id'],
|
$this->page . '_' . $sections[ $field['section'] ]['id'],
|
||||||
$field
|
$field
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generic field method.
|
* Generic field method.
|
||||||
*
|
*
|
||||||
* @param $field
|
* @param $field
|
||||||
*/
|
*/
|
||||||
public function do_field( $field ) {
|
public function do_field( $field ) {
|
||||||
$callback = $this->get_callback( $field );
|
$callback = $this->get_callback( $field );
|
||||||
if ( is_callable( $callback ) ) {
|
if ( is_callable( $callback ) ) {
|
||||||
call_user_func( $callback, $field );
|
call_user_func( $callback, $field );
|
||||||
}
|
}
|
||||||
if ( ! empty( $field['description'] ) ) {
|
if ( ! empty( $field['description'] ) ) {
|
||||||
$this->do_description( $field );
|
$this->do_description( $field );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the correct method to output the field.
|
* Get the correct method to output the field.
|
||||||
*
|
*
|
||||||
* @param $field
|
* @param $field
|
||||||
*
|
*
|
||||||
* @return array|bool
|
* @return array|bool
|
||||||
* @since 3.1.0
|
* @since 3.1.0
|
||||||
*/
|
*/
|
||||||
private function get_callback( $field ) {
|
private function get_callback( $field ) {
|
||||||
$callback = false;
|
$callback = false;
|
||||||
if ( ! empty( $field['type'] ) ) {
|
if ( ! empty( $field['type'] ) ) {
|
||||||
$callback = "do_{$field['type']}";
|
$callback = "do_{$field['type']}";
|
||||||
} elseif ( ! empty( $field['callback'] ) ) {
|
} elseif ( ! empty( $field['callback'] ) ) {
|
||||||
$callback = $field['callback'];
|
$callback = $field['callback'];
|
||||||
}
|
}
|
||||||
|
|
||||||
return $callback ? array( $this, $callback ) : false;
|
return $callback ? array( $this, $callback ) : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set which tab is considered active.
|
* Set which tab is considered active.
|
||||||
* @return string
|
* @return string
|
||||||
* @since 2.5.0
|
* @since 2.5.0
|
||||||
*/
|
*/
|
||||||
protected function get_active_tab() {
|
protected function get_active_tab() {
|
||||||
$tab = filter_input( INPUT_GET, 'tab', FILTER_SANITIZE_STRING );
|
$tab = filter_input( INPUT_GET, 'tab', FILTER_SANITIZE_SPECIAL_CHARS );
|
||||||
|
|
||||||
return $tab ? $tab : 'main';
|
return $tab ? $tab : 'main';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Echoes out the section description.
|
* Echoes out the section description.
|
||||||
*
|
*
|
||||||
* @since 2.3.0
|
* @since 2.3.0
|
||||||
*
|
*
|
||||||
* @param $section
|
* @param $section
|
||||||
*/
|
*/
|
||||||
public function section_description( $section ) {
|
public function section_description( $section ) {
|
||||||
$id = str_replace( "{$this->page}_", '', $section['id'] );
|
$id = str_replace( "{$this->page}_", '', $section['id'] );
|
||||||
$method = "{$id}_section_description";
|
$method = "{$id}_section_description";
|
||||||
if ( method_exists( $this, $method ) ) {
|
if ( method_exists( $this, $method ) ) {
|
||||||
echo wp_kses_post( wpautop( $this->$method() ) );
|
echo wp_kses_post( wpautop( $this->$method() ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generic callback to create a number field setting.
|
* Generic callback to create a number field setting.
|
||||||
*
|
*
|
||||||
* @since 2.3.0
|
* @since 2.3.0
|
||||||
*
|
*
|
||||||
* @param $args
|
* @param $args
|
||||||
*/
|
*/
|
||||||
public function do_number( $args ) {
|
public function do_number( $args ) {
|
||||||
printf(
|
printf(
|
||||||
'<input type="number" step="1" min="%1$s" max="%2$s" id="%3$s" name="%5$s" value="%4$s" class="small-text" />%6$s',
|
'<input type="number" step="1" min="%1$s" max="%2$s" id="%3$s" name="%5$s" value="%4$s" class="small-text" />%6$s',
|
||||||
(int) $args['min'],
|
(int) $args['min'],
|
||||||
(int) $args['max'],
|
(int) $args['max'],
|
||||||
esc_attr( $this->get_field_id( $args ) ),
|
esc_attr( $this->get_field_id( $args ) ),
|
||||||
esc_attr( $this->get_field_value( $args ) ),
|
esc_attr( $this->get_field_value( $args ) ),
|
||||||
esc_attr( $this->get_field_name( $args ) ),
|
esc_attr( $this->get_field_name( $args ) ),
|
||||||
esc_attr( $args['label'] )
|
esc_attr( $args['label'] )
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* generic checkbox function (for all checkbox settings)
|
* generic checkbox function (for all checkbox settings)
|
||||||
*
|
*
|
||||||
* @since 2.3.0
|
* @since 2.3.0
|
||||||
*
|
*
|
||||||
* @param $args
|
* @param $args
|
||||||
*/
|
*/
|
||||||
public function do_checkbox( $args ) {
|
public function do_checkbox( $args ) {
|
||||||
$name = $this->get_field_name( $args );
|
$name = $this->get_field_name( $args );
|
||||||
$value = $this->get_field_value( $args );
|
$value = $this->get_field_value( $args );
|
||||||
printf( '<input type="hidden" name="%s" value="0" />', esc_attr( $name ) );
|
printf( '<input type="hidden" name="%s" value="0" />', esc_attr( $name ) );
|
||||||
printf(
|
printf(
|
||||||
'<label for="%1$s"><input type="checkbox" name="%4$s" id="%1$s" value="1" %2$s class="code" />%3$s</label>',
|
'<label for="%1$s"><input type="checkbox" name="%4$s" id="%1$s" value="1" %2$s class="code" />%3$s</label>',
|
||||||
esc_attr( $this->get_field_id( $args ) ),
|
esc_attr( $this->get_field_id( $args ) ),
|
||||||
checked( 1, esc_attr( $value ), false ),
|
checked( 1, esc_attr( $value ), false ),
|
||||||
esc_attr( $args['label'] ),
|
esc_attr( $args['label'] ),
|
||||||
esc_attr( $name )
|
esc_attr( $name )
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build a checkbox array.
|
* Build a checkbox array.
|
||||||
*
|
*
|
||||||
* @param $args
|
* @param $args
|
||||||
*/
|
*/
|
||||||
public function do_checkbox_array( $args ) {
|
public function do_checkbox_array( $args ) {
|
||||||
echo '<fieldset>';
|
echo '<fieldset>';
|
||||||
$name = $this->get_field_name( $args );
|
$name = $this->get_field_name( $args );
|
||||||
$id = $this->get_field_id( $args );
|
$id = $this->get_field_id( $args );
|
||||||
$value = $this->get_field_value( $args );
|
$value = $this->get_field_value( $args );
|
||||||
foreach ( $args['options'] as $choice => $label ) {
|
foreach ( $args['options'] as $choice => $label ) {
|
||||||
$check = isset( $value[ $choice ] ) ? $value[ $choice ] : 0;
|
$check = isset( $value[ $choice ] ) ? $value[ $choice ] : 0;
|
||||||
printf(
|
printf(
|
||||||
'<input type="hidden" name="%s[%s]" value="0" />',
|
'<input type="hidden" name="%s[%s]" value="0" />',
|
||||||
esc_attr( $name ),
|
esc_attr( $name ),
|
||||||
esc_attr( $choice )
|
esc_attr( $choice )
|
||||||
);
|
);
|
||||||
printf(
|
printf(
|
||||||
'<label for="%5$s-%1$s" style="margin-right:12px !important;"><input type="checkbox" name="%4$s[%1$s]" id="%5$s-%1$s" value="1"%2$s class="code" aria-labelledby="%5$s" />%3$s</label>',
|
'<label for="%5$s-%1$s" style="margin-right:12px !important;"><input type="checkbox" name="%4$s[%1$s]" id="%5$s-%1$s" value="1"%2$s class="code" aria-labelledby="%5$s" />%3$s</label>',
|
||||||
esc_attr( $choice ),
|
esc_attr( $choice ),
|
||||||
checked( 1, $check, false ),
|
checked( 1, $check, false ),
|
||||||
esc_html( $label ),
|
esc_html( $label ),
|
||||||
esc_attr( $name ),
|
esc_attr( $name ),
|
||||||
esc_attr( $id )
|
esc_attr( $id )
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
echo '</fieldset>';
|
echo '</fieldset>';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* radio buttons
|
* radio buttons
|
||||||
* @since 2.6.0
|
* @since 2.6.0
|
||||||
*
|
*
|
||||||
* @param $args
|
* @param $args
|
||||||
*/
|
*/
|
||||||
public function do_radio( $args ) {
|
public function do_radio( $args ) {
|
||||||
echo '<fieldset>';
|
echo '<fieldset>';
|
||||||
$name = $this->get_field_name( $args );
|
$name = $this->get_field_name( $args );
|
||||||
$id = $this->get_field_id( $args );
|
$id = $this->get_field_id( $args );
|
||||||
$value = $this->get_field_value( $args );
|
$value = $this->get_field_value( $args );
|
||||||
printf( '<legend class="screen-reader-text">%s</legend>', esc_html( $args['legend'] ) );
|
printf( '<legend class="screen-reader-text">%s</legend>', esc_html( $args['legend'] ) );
|
||||||
foreach ( $args['choices'] as $choice => $label ) {
|
foreach ( $args['choices'] as $choice => $label ) {
|
||||||
printf(
|
printf(
|
||||||
'<label for="%1$s-%2$s" style="margin-right:12px !important;"><input type="radio" id="%1$s-%2$s" name="%5$s" value="%2$s"%3$s />%4$s</label> ',
|
'<label for="%1$s-%2$s" style="margin-right:12px !important;"><input type="radio" id="%1$s-%2$s" name="%5$s" value="%2$s"%3$s />%4$s</label> ',
|
||||||
esc_attr( $id ),
|
esc_attr( $id ),
|
||||||
esc_attr( $choice ),
|
esc_attr( $choice ),
|
||||||
checked( $choice, $value, false ),
|
checked( $choice, $value, false ),
|
||||||
esc_attr( $label ),
|
esc_attr( $label ),
|
||||||
esc_attr( $name )
|
esc_attr( $name )
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
echo '</fieldset>';
|
echo '</fieldset>';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Output a select field.
|
* Output a select field.
|
||||||
*
|
*
|
||||||
* @param $args
|
* @param $args
|
||||||
*/
|
*/
|
||||||
public function do_select( $args ) {
|
public function do_select( $args ) {
|
||||||
$value = $this->get_field_value( $args );
|
$value = $this->get_field_value( $args );
|
||||||
printf(
|
printf(
|
||||||
'<select id="%1$s" name="%2$s">',
|
'<select id="%1$s" name="%2$s">',
|
||||||
esc_attr( $this->get_field_id( $args ) ),
|
esc_attr( $this->get_field_id( $args ) ),
|
||||||
esc_attr( $this->get_field_name( $args ) )
|
esc_attr( $this->get_field_name( $args ) )
|
||||||
);
|
);
|
||||||
foreach ( (array) $args['choices'] as $option => $label ) {
|
foreach ( (array) $args['choices'] as $option => $label ) {
|
||||||
printf(
|
printf(
|
||||||
'<option value="%s" %s>%s</option>',
|
'<option value="%s" %s>%s</option>',
|
||||||
esc_attr( $option ),
|
esc_attr( $option ),
|
||||||
selected( $option, $value, false ),
|
selected( $option, $value, false ),
|
||||||
esc_attr( $label )
|
esc_attr( $label )
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
echo '</select>';
|
echo '</select>';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Maybe instantiate the image settings class and do the image field.
|
* Maybe instantiate the image settings class and do the image field.
|
||||||
*
|
*
|
||||||
* @param $args
|
* @param $args
|
||||||
*
|
*
|
||||||
* @since 3.1.0
|
* @since 3.1.0
|
||||||
*/
|
*/
|
||||||
protected function do_image( $args ) {
|
protected function do_image( $args ) {
|
||||||
$images = $this->get_images_class();
|
$images = $this->get_images_class();
|
||||||
$images->do_image( $args );
|
$images->do_image( $args );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generic callback to display a field description.
|
* Generic callback to display a field description.
|
||||||
*
|
*
|
||||||
* @param $args array
|
* @param $args array
|
||||||
*
|
*
|
||||||
* @since 2.3.0
|
* @since 2.3.0
|
||||||
*/
|
*/
|
||||||
protected function do_description( $args ) {
|
protected function do_description( $args ) {
|
||||||
$description = isset( $args['description'] ) ? $args['description'] : false;
|
$description = isset( $args['description'] ) ? $args['description'] : false;
|
||||||
$function = $args['id'] . '_description';
|
$function = $args['id'] . '_description';
|
||||||
if ( method_exists( $this, $function ) ) {
|
if ( method_exists( $this, $function ) ) {
|
||||||
$description = $this->$function();
|
$description = $this->$function();
|
||||||
}
|
}
|
||||||
if ( ! $description ) {
|
if ( ! $description ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
printf( '<p class="description">%s</p>', wp_kses_post( $description ) );
|
printf( '<p class="description">%s</p>', wp_kses_post( $description ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get all public content types, not including built in.
|
* Get all public content types, not including built in.
|
||||||
*
|
*
|
||||||
* @since 2.5.0
|
* @since 2.5.0
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
protected function get_content_types() {
|
protected function get_content_types() {
|
||||||
$args = array(
|
$args = array(
|
||||||
'public' => true,
|
'public' => true,
|
||||||
'_builtin' => false,
|
'_builtin' => false,
|
||||||
'has_archive' => true,
|
'has_archive' => true,
|
||||||
);
|
);
|
||||||
$output = 'names';
|
$output = 'names';
|
||||||
|
|
||||||
return get_post_types( $args, $output );
|
return get_post_types( $args, $output );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get all public content types, including built in.
|
* Get all public content types, including built in.
|
||||||
*
|
*
|
||||||
* @since 2.5.0
|
* @since 2.5.0
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
protected function get_content_types_built_in() {
|
protected function get_content_types_built_in() {
|
||||||
$built_in = array( 'post', 'page' );
|
$built_in = array( 'post', 'page' );
|
||||||
$post_types = $this->get_content_types();
|
$post_types = $this->get_content_types();
|
||||||
|
|
||||||
return array_merge( $built_in, $post_types );
|
return array_merge( $built_in, $post_types );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the current field name.
|
* Get the current field name.
|
||||||
*
|
*
|
||||||
* @param $args
|
* @param $args
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function get_field_name( $args ) {
|
public function get_field_name( $args ) {
|
||||||
return isset( $args['key'] ) && $args['key'] ? $this->page . '[' . $args['key'] . '][' . $args['setting'] . ']' : $this->page . '[' . $args['id'] . ']';
|
return isset( $args['key'] ) && $args['key'] ? $this->page . '[' . $args['key'] . '][' . $args['setting'] . ']' : $this->page . '[' . $args['id'] . ']';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the current field id.
|
* Get the current field id.
|
||||||
*
|
*
|
||||||
* @param $args
|
* @param $args
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function get_field_id( $args ) {
|
public function get_field_id( $args ) {
|
||||||
return isset( $args['key'] ) && $args['key'] ? $this->page . '-' . $args['key'] . '-' . $args['setting'] : $this->page . '-' . $args['id'];
|
return isset( $args['key'] ) && $args['key'] ? $this->page . '-' . $args['key'] . '-' . $args['setting'] : $this->page . '-' . $args['id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the current field value.
|
* Get the current field value.
|
||||||
*
|
*
|
||||||
* @param $args
|
* @param $args
|
||||||
*
|
*
|
||||||
* @return mixed
|
* @return mixed
|
||||||
* @internal param $setting
|
* @internal param $setting
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function get_field_value( $args ) {
|
public function get_field_value( $args ) {
|
||||||
if ( isset( $args['key'] ) && $args['key'] ) {
|
if ( isset( $args['key'] ) && $args['key'] ) {
|
||||||
$value = isset( $this->setting[ $args['key'] ][ $args['setting'] ] ) ? $this->setting[ $args['key'] ][ $args['setting'] ] : 0;
|
$value = isset( $this->setting[ $args['key'] ][ $args['setting'] ] ) ? $this->setting[ $args['key'] ][ $args['setting'] ] : 0;
|
||||||
} else {
|
} else {
|
||||||
$value = isset( $this->setting[ $args['id'] ] ) ? $this->setting[ $args['id'] ] : '';
|
$value = isset( $this->setting[ $args['id'] ] ) ? $this->setting[ $args['id'] ] : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the images settings class.
|
* Get the images settings class.
|
||||||
* @return \DisplayFeaturedImageGenesisSettingsImages
|
* @return \DisplayFeaturedImageGenesisSettingsImages
|
||||||
* @since 3.1.0
|
* @since 3.1.0
|
||||||
*/
|
*/
|
||||||
protected function get_images_class() {
|
protected function get_images_class() {
|
||||||
if ( isset( $this->images ) ) {
|
if ( isset( $this->images ) ) {
|
||||||
return $this->images;
|
return $this->images;
|
||||||
}
|
}
|
||||||
|
|
||||||
include_once 'class-displayfeaturedimagegenesis-settings-images.php';
|
include_once 'class-displayfeaturedimagegenesis-settings-images.php';
|
||||||
$this->images = new DisplayFeaturedImageGenesisSettingsImages( $this->setting );
|
$this->images = new DisplayFeaturedImageGenesisSettingsImages( $this->setting );
|
||||||
|
|
||||||
return $this->images;
|
return $this->images;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determines if the user has permission to save the information from the submenu
|
* Determines if the user has permission to save the information from the submenu
|
||||||
* page.
|
* page.
|
||||||
*
|
*
|
||||||
* @since 2.3.0
|
* @since 2.3.0
|
||||||
* @access protected
|
* @access protected
|
||||||
*
|
*
|
||||||
* @param string $action The name of the action specified on the submenu page
|
* @param string $action The name of the action specified on the submenu page
|
||||||
* @param string $nonce The nonce specified on the submenu page
|
* @param string $nonce The nonce specified on the submenu page
|
||||||
*
|
*
|
||||||
* @return bool True if the user has permission to save; false, otherwise.
|
* @return bool True if the user has permission to save; false, otherwise.
|
||||||
* @author Tom McFarlin (https://tommcfarlin.com/save-wordpress-submenu-page-options/)
|
* @author Tom McFarlin (https://tommcfarlin.com/save-wordpress-submenu-page-options/)
|
||||||
*/
|
*/
|
||||||
protected function user_can_save( $action, $nonce ) {
|
protected function user_can_save( $action, $nonce ) {
|
||||||
$is_nonce_set = isset( $_POST[ $nonce ] );
|
$is_nonce_set = isset( $_POST[ $nonce ] );
|
||||||
$is_valid_nonce = false;
|
$is_valid_nonce = false;
|
||||||
|
|
||||||
if ( $is_nonce_set ) {
|
if ( $is_nonce_set ) {
|
||||||
$is_valid_nonce = wp_verify_nonce( $_POST[ $nonce ], $action );
|
$is_valid_nonce = wp_verify_nonce( $_POST[ $nonce ], $action );
|
||||||
}
|
}
|
||||||
|
|
||||||
return ( $is_nonce_set && $is_valid_nonce );
|
return ( $is_nonce_set && $is_valid_nonce );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,192 +1,193 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class DisplayFeaturedImageGenesisWidgetsForm
|
* Class DisplayFeaturedImageGenesisWidgetsForm
|
||||||
*/
|
*/
|
||||||
class DisplayFeaturedImageGenesisWidgetsForm {
|
class DisplayFeaturedImageGenesisWidgetsForm {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var
|
* @var
|
||||||
*/
|
*/
|
||||||
protected $parent;
|
protected $parent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var
|
* @var
|
||||||
*/
|
*/
|
||||||
public $instance;
|
public $instance;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* DisplayFeaturedImageGenesisWidgets constructor.
|
* DisplayFeaturedImageGenesisWidgets constructor.
|
||||||
*
|
*
|
||||||
* @param $parent
|
* @param $parent
|
||||||
* @param $instance
|
* @param $instance
|
||||||
*/
|
*/
|
||||||
public function __construct( $parent, $instance ) {
|
public function __construct( $parent, $instance ) {
|
||||||
$this->parent = $parent;
|
$this->parent = $parent;
|
||||||
$this->instance = $instance;
|
$this->instance = $instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the public registered post types on the site.
|
* Get the public registered post types on the site.
|
||||||
*
|
*
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function get_post_types() {
|
public function get_post_types() {
|
||||||
$args = array(
|
$args = array(
|
||||||
'public' => true,
|
'public' => true,
|
||||||
'_builtin' => false,
|
'_builtin' => false,
|
||||||
'has_archive' => true,
|
'has_archive' => true,
|
||||||
);
|
);
|
||||||
$output = 'objects';
|
$output = 'objects';
|
||||||
$post_types = get_post_types( $args, $output );
|
$post_types = get_post_types( $args, $output );
|
||||||
|
|
||||||
$options = array(
|
$options = array(
|
||||||
'' => '--',
|
'' => '--',
|
||||||
'post' => __( 'Posts', 'display-featured-image-genesis' ),
|
'post' => __( 'Posts', 'display-featured-image-genesis' ),
|
||||||
);
|
);
|
||||||
foreach ( $post_types as $post_type ) {
|
foreach ( $post_types as $post_type ) {
|
||||||
$options[ $post_type->name ] = $post_type->label;
|
$options[ $post_type->name ] = $post_type->label;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $options;
|
return $options;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function get_image_size() {
|
public function get_image_size() {
|
||||||
$sizes = genesis_get_image_sizes();
|
$sizes = genesis_get_image_sizes();
|
||||||
$options = array();
|
$options = array();
|
||||||
foreach ( (array) $sizes as $name => $size ) {
|
foreach ( (array) $sizes as $name => $size ) {
|
||||||
$options[ $name ] = sprintf( '%s ( %s x %s )', esc_html( $name ), (int) $size['width'], (int) $size['height'] );
|
$options[ $name ] = sprintf( '%s ( %s x %s )', esc_html( $name ), (int) $size['width'], (int) $size['height'] );
|
||||||
}
|
}
|
||||||
|
|
||||||
return $options;
|
return $options;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function get_image_alignment() {
|
public function get_image_alignment() {
|
||||||
return array(
|
return array(
|
||||||
'alignnone' => __( 'None', 'display-featured-image-genesis' ),
|
'alignnone' => __( 'None', 'display-featured-image-genesis' ),
|
||||||
'alignleft' => __( 'Left', 'display-featured-image-genesis' ),
|
'alignleft' => __( 'Left', 'display-featured-image-genesis' ),
|
||||||
'alignright' => __( 'Right', 'display-featured-image-genesis' ),
|
'alignright' => __( 'Right', 'display-featured-image-genesis' ),
|
||||||
'aligncenter' => __( 'Center', 'display-featured-image-genesis' ),
|
'aligncenter' => __( 'Center', 'display-featured-image-genesis' ),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $instance
|
* @param $instance
|
||||||
* @param bool $ajax
|
* @param bool $ajax
|
||||||
*
|
*
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function get_term_lists( $instance, $ajax = false ) {
|
public function get_term_lists( $instance, $ajax = false ) {
|
||||||
$args = array(
|
$taxonomy = $ajax ? filter_input( INPUT_POST, 'taxonomy', FILTER_SANITIZE_SPECIAL_CHARS ) : $instance['taxonomy'];
|
||||||
'orderby' => 'name',
|
$args = array(
|
||||||
'order' => 'ASC',
|
'taxonomy' => $taxonomy,
|
||||||
'hide_empty' => false,
|
'orderby' => 'name',
|
||||||
);
|
'order' => 'ASC',
|
||||||
$taxonomy = $ajax ? filter_input( INPUT_POST, 'taxonomy', FILTER_SANITIZE_STRING ) : $instance['taxonomy'];
|
'hide_empty' => false,
|
||||||
$terms = get_terms( $taxonomy, $args );
|
);
|
||||||
$options[''] = '--';
|
$terms = get_terms( $args );
|
||||||
foreach ( $terms as $term ) {
|
$options[''] = '--';
|
||||||
if ( is_object( $term ) ) {
|
foreach ( $terms as $term ) {
|
||||||
$options[ $term->term_id ] = $term->name;
|
if ( is_object( $term ) ) {
|
||||||
}
|
$options[ $term->term_id ] = $term->name;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return $options;
|
|
||||||
}
|
return $options;
|
||||||
|
}
|
||||||
/**
|
|
||||||
* Handles the callback to populate the custom term dropdown. The
|
/**
|
||||||
* selected post type is provided in $_POST['taxonomy'], and the
|
* Handles the callback to populate the custom term dropdown. The
|
||||||
* calling script expects a JSON array of term objects.
|
* selected post type is provided in $_POST['taxonomy'], and the
|
||||||
*/
|
* calling script expects a JSON array of term objects.
|
||||||
public function term_action_callback() {
|
*/
|
||||||
|
public function term_action_callback() {
|
||||||
$list = $this->get_term_lists( array(), true );
|
|
||||||
|
$list = $this->get_term_lists( array(), true );
|
||||||
// And emit it
|
|
||||||
echo wp_json_encode( $list );
|
// And emit it
|
||||||
die();
|
echo wp_json_encode( $list );
|
||||||
}
|
die();
|
||||||
|
}
|
||||||
/**
|
|
||||||
* Build boxes with fields.
|
/**
|
||||||
*
|
* Build boxes with fields.
|
||||||
* @param $boxes
|
*
|
||||||
* @param string $class
|
* @param $boxes
|
||||||
*/
|
* @param string $class
|
||||||
public function do_boxes( $boxes, $class = '' ) {
|
*/
|
||||||
foreach ( $boxes as $box => $value ) {
|
public function do_boxes( $boxes, $class = '' ) {
|
||||||
if ( ! $value ) {
|
foreach ( $boxes as $box => $value ) {
|
||||||
continue;
|
if ( ! $value ) {
|
||||||
}
|
continue;
|
||||||
$box_class = ! $class ? 'genesis-widget-column-box' : 'genesis-widget-column-box ' . $class;
|
}
|
||||||
printf( '<div class="%s">', esc_attr( $box_class ) );
|
$box_class = ! $class ? 'genesis-widget-column-box' : 'genesis-widget-column-box ' . $class;
|
||||||
echo wp_kses_post( wpautop( $this->box_description( $box ) ) );
|
printf( '<div class="%s">', esc_attr( $box_class ) );
|
||||||
$this->do_fields( $this->instance, $value );
|
echo wp_kses_post( wpautop( $this->box_description( $box ) ) );
|
||||||
echo '</div>';
|
$this->do_fields( $this->instance, $value );
|
||||||
}
|
echo '</div>';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/**
|
|
||||||
* Add a description to a widget settings box.
|
/**
|
||||||
*
|
* Add a description to a widget settings box.
|
||||||
* @param $box
|
*
|
||||||
*
|
* @param $box
|
||||||
* @return string
|
*
|
||||||
*/
|
* @return string
|
||||||
public function box_description( $box ) {
|
*/
|
||||||
$method = "describe_{$box}";
|
public function box_description( $box ) {
|
||||||
|
$method = "describe_{$box}";
|
||||||
return method_exists( $this, $method ) ? $this->$method() : '';
|
|
||||||
}
|
return method_exists( $this, $method ) ? $this->$method() : '';
|
||||||
|
}
|
||||||
/**
|
|
||||||
* Cycle through the fields for a given box, pick the appropriate method, and go.
|
/**
|
||||||
*
|
* Cycle through the fields for a given box, pick the appropriate method, and go.
|
||||||
* @param $instance
|
*
|
||||||
* @param $fields
|
* @param $instance
|
||||||
*/
|
* @param $fields
|
||||||
public function do_fields( $instance, $fields ) {
|
*/
|
||||||
foreach ( $fields as $field ) {
|
public function do_fields( $instance, $fields ) {
|
||||||
$args = $field['args'];
|
foreach ( $fields as $field ) {
|
||||||
include $this->path( $field['method'] );
|
$args = $field['args'];
|
||||||
}
|
include $this->path( $field['method'] );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/**
|
|
||||||
* Generic function to build a text input for the widget form.
|
/**
|
||||||
*
|
* Generic function to build a text input for the widget form.
|
||||||
* @param $instance
|
*
|
||||||
* @param $args
|
* @param $instance
|
||||||
*/
|
* @param $args
|
||||||
public function do_text( $instance, $args ) {
|
*/
|
||||||
include $this->path( 'text' );
|
public function do_text( $instance, $args ) {
|
||||||
}
|
include $this->path( 'text' );
|
||||||
|
}
|
||||||
/**
|
|
||||||
* Generic function to build a select input for the widget form.
|
/**
|
||||||
*
|
* Generic function to build a select input for the widget form.
|
||||||
* @param $instance
|
*
|
||||||
* @param $args
|
* @param $instance
|
||||||
*/
|
* @param $args
|
||||||
public function do_select( $instance, $args ) {
|
*/
|
||||||
include $this->path( 'select' );
|
public function do_select( $instance, $args ) {
|
||||||
}
|
include $this->path( 'select' );
|
||||||
|
}
|
||||||
/**
|
|
||||||
* Get path for included files.
|
/**
|
||||||
*
|
* Get path for included files.
|
||||||
* @param string $file
|
*
|
||||||
*
|
* @param string $file
|
||||||
* @return string
|
*
|
||||||
*/
|
* @return string
|
||||||
public function path( $file ) {
|
*/
|
||||||
return trailingslashit( plugin_dir_path( __FILE__ ) . 'admin' ) . $file . '.php';
|
public function path( $file ) {
|
||||||
}
|
return trailingslashit( plugin_dir_path( __FILE__ ) . 'admin' ) . $file . '.php';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,12 +1,41 @@
|
|||||||
# Copyright (C) 2020 Display Featured Image for Genesis
|
# Copyright (C) 2023 Robin Cornett
|
||||||
# This file is distributed under the same license as the Display Featured Image for Genesis package.
|
# This file is distributed under the GPL-2.0+.
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Display Featured Image for Genesis\n"
|
"Project-Id-Version: Display Featured Image for Genesis 3.2.3\n"
|
||||||
|
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/display-featured-image-genesis\n"
|
||||||
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
"POT-Creation-Date: 2023-11-11T17:12:49+00:00\n"
|
||||||
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
|
"X-Generator: WP-CLI 2.8.1\n"
|
||||||
|
"X-Domain: display-featured-image-genesis\n"
|
||||||
|
|
||||||
|
#. Plugin Name of the plugin
|
||||||
|
#: includes/settings/class-displayfeaturedimagegenesis-customizer.php:61
|
||||||
|
#: includes/settings/class-displayfeaturedimagegenesis-settings.php:22
|
||||||
|
#: includes/settings/class-displayfeaturedimagegenesis-settings.php:23
|
||||||
|
msgid "Display Featured Image for Genesis"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Plugin URI of the plugin
|
||||||
|
msgid "https://github.com/robincornett/display-featured-image-genesis/"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Description of the plugin
|
||||||
|
msgid "This plugin works within the Genesis Framework, to display featured images in beautiful and dynamic ways."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Author of the plugin
|
||||||
|
msgid "Robin Cornett"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Author URI of the plugin
|
||||||
|
msgid "https://robincornett.com"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: includes/class-displayfeaturedimagegenesis-admin.php:97
|
#: includes/class-displayfeaturedimagegenesis-admin.php:97
|
||||||
msgid "Image"
|
msgid "Image"
|
||||||
@@ -21,7 +50,8 @@ msgstr ""
|
|||||||
msgid " But since we're talking anyway, did you know that your server is running PHP version %1$s, which is outdated? You should ask your host to update that for you."
|
msgid " But since we're talking anyway, did you know that your server is running PHP version %1$s, which is outdated? You should ask your host to update that for you."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/class-displayfeaturedimagegenesis.php:256, includes/settings/class-displayfeaturedimagegenesis-settings-images.php:164
|
#: includes/class-displayfeaturedimagegenesis.php:256
|
||||||
|
#: includes/settings/class-displayfeaturedimagegenesis-settings-images.php:164
|
||||||
msgid "Select Image"
|
msgid "Select Image"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -29,7 +59,12 @@ msgstr ""
|
|||||||
msgid "Settings"
|
msgid "Settings"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/meta/class-displayfeaturedimagegenesis-author.php:46, includes/meta/class-displayfeaturedimagegenesis-taxonomies.php:101, includes/meta/class-displayfeaturedimagegenesis-taxonomies.php:185, includes/widgets/fields/blocks.php:9, includes/widgets/fields/blocks.php:19, includes/widgets/fields/blocks.php:29
|
#: includes/meta/class-displayfeaturedimagegenesis-author.php:46
|
||||||
|
#: includes/meta/class-displayfeaturedimagegenesis-taxonomies.php:101
|
||||||
|
#: includes/meta/class-displayfeaturedimagegenesis-taxonomies.php:185
|
||||||
|
#: includes/widgets/fields/blocks.php:9
|
||||||
|
#: includes/widgets/fields/blocks.php:19
|
||||||
|
#: includes/widgets/fields/blocks.php:29
|
||||||
msgid "Featured Image"
|
msgid "Featured Image"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -37,7 +72,8 @@ msgstr ""
|
|||||||
msgid "Upload an image to use as your author page featured image."
|
msgid "Upload an image to use as your author page featured image."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/meta/class-displayfeaturedimagegenesis-author.php:74, includes/settings/class-displayfeaturedimagegenesis-settings.php:272
|
#: includes/meta/class-displayfeaturedimagegenesis-author.php:74
|
||||||
|
#: includes/settings/class-displayfeaturedimagegenesis-settings.php:272
|
||||||
msgid "Something unexpected happened. Please try again."
|
msgid "Something unexpected happened. Please try again."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -82,15 +118,12 @@ msgstr ""
|
|||||||
msgid "You may set a featured image for your terms. This image will be used on the term archive page, and as a fallback image on a single post page if it does not have a featured image of its own."
|
msgid "You may set a featured image for your terms. This image will be used on the term archive page, and as a fallback image on a single post page if it does not have a featured image of its own."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/settings/class-displayfeaturedimagegenesis-customizer.php:61, includes/settings/class-displayfeaturedimagegenesis-settings.php:22, includes/settings/class-displayfeaturedimagegenesis-settings.php:23
|
|
||||||
msgid "Display Featured Image for Genesis"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: includes/settings/class-displayfeaturedimagegenesis-customizer.php:62
|
#: includes/settings/class-displayfeaturedimagegenesis-customizer.php:62
|
||||||
msgid "Only general settings are available in the Customizer; more can be found on the Display Featured Image for Genesis settings page."
|
msgid "Only general settings are available in the Customizer; more can be found on the Display Featured Image for Genesis settings page."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/settings/class-displayfeaturedimagegenesis-customizer.php:69, includes/settings/tabs.php:6
|
#: includes/settings/class-displayfeaturedimagegenesis-customizer.php:69
|
||||||
|
#: includes/settings/tabs.php:6
|
||||||
msgid "Main"
|
msgid "Main"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -98,7 +131,8 @@ msgstr ""
|
|||||||
msgid "Backstretch Output"
|
msgid "Backstretch Output"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/settings/class-displayfeaturedimagegenesis-customizer.php:79, includes/settings/tabs.php:14
|
#: includes/settings/class-displayfeaturedimagegenesis-customizer.php:79
|
||||||
|
#: includes/settings/tabs.php:14
|
||||||
msgid "Content Types"
|
msgid "Content Types"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -106,7 +140,8 @@ msgstr ""
|
|||||||
msgid "Optional: set a custom image for search results and 404 (no results found) pages, as well as content types."
|
msgid "Optional: set a custom image for search results and 404 (no results found) pages, as well as content types."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/settings/class-displayfeaturedimagegenesis-customizer.php:85, includes/settings/tabs.php:18
|
#: includes/settings/class-displayfeaturedimagegenesis-customizer.php:85
|
||||||
|
#: includes/settings/tabs.php:18
|
||||||
msgid "Advanced"
|
msgid "Advanced"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -114,7 +149,8 @@ msgstr ""
|
|||||||
msgid "Default"
|
msgid "Default"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/settings/class-displayfeaturedimagegenesis-helptabs.php:47, includes/settings/fields-style.php:13
|
#: includes/settings/class-displayfeaturedimagegenesis-helptabs.php:47
|
||||||
|
#: includes/settings/fields-style.php:13
|
||||||
msgid "Height"
|
msgid "Height"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -122,7 +158,8 @@ msgstr ""
|
|||||||
msgid "Centering"
|
msgid "Centering"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/settings/class-displayfeaturedimagegenesis-helptabs.php:57, includes/settings/fields-style.php:49
|
#: includes/settings/class-displayfeaturedimagegenesis-helptabs.php:57
|
||||||
|
#: includes/settings/fields-style.php:49
|
||||||
msgid "Fade"
|
msgid "Fade"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -130,7 +167,8 @@ msgstr ""
|
|||||||
msgid "Special Pages"
|
msgid "Special Pages"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/settings/class-displayfeaturedimagegenesis-helptabs.php:72, includes/settings/fields-cpt.php:6
|
#: includes/settings/class-displayfeaturedimagegenesis-helptabs.php:72
|
||||||
|
#: includes/settings/fields-cpt.php:6
|
||||||
msgid "Skip Content Types"
|
msgid "Skip Content Types"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -142,15 +180,18 @@ msgstr ""
|
|||||||
msgid "Custom Content Types"
|
msgid "Custom Content Types"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/settings/class-displayfeaturedimagegenesis-helptabs.php:94, includes/settings/sections.php:6
|
#: includes/settings/class-displayfeaturedimagegenesis-helptabs.php:94
|
||||||
|
#: includes/settings/sections.php:6
|
||||||
msgid "Optional Sitewide Settings"
|
msgid "Optional Sitewide Settings"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/settings/class-displayfeaturedimagegenesis-helptabs.php:99, includes/settings/sections.php:11
|
#: includes/settings/class-displayfeaturedimagegenesis-helptabs.php:99
|
||||||
|
#: includes/settings/sections.php:11
|
||||||
msgid "Optional Archive Settings"
|
msgid "Optional Archive Settings"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/settings/class-displayfeaturedimagegenesis-helptabs.php:104, includes/settings/sections.php:16
|
#: includes/settings/class-displayfeaturedimagegenesis-helptabs.php:104
|
||||||
|
#: includes/settings/sections.php:16
|
||||||
msgid "Optional Default Image"
|
msgid "Optional Default Image"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -178,7 +219,8 @@ msgstr ""
|
|||||||
msgid "If you choose \"Always Use Default\", your default image will be used site wide, no matter what content types/posts/etc. have featured images set."
|
msgid "If you choose \"Always Use Default\", your default image will be used site wide, no matter what content types/posts/etc. have featured images set."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/settings/class-displayfeaturedimagegenesis-helptabs.php:150, includes/settings/fields-main.php:39
|
#: includes/settings/class-displayfeaturedimagegenesis-helptabs.php:150
|
||||||
|
#: includes/settings/fields-main.php:39
|
||||||
msgid "Skip Front Page"
|
msgid "Skip Front Page"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -186,7 +228,8 @@ msgstr ""
|
|||||||
msgid "If you set a Default Featured Image, it will show on every post/page of your site. This may not be desirable on child themes with a front page constructed with widgets, so you can select this option to prevent the Featured Image from showing on the front page. Checking this will prevent the Featured Image from showing on the Front Page, even if you have set an image for that page individually."
|
msgid "If you set a Default Featured Image, it will show on every post/page of your site. This may not be desirable on child themes with a front page constructed with widgets, so you can select this option to prevent the Featured Image from showing on the front page. Checking this will prevent the Featured Image from showing on the Front Page, even if you have set an image for that page individually."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/settings/class-displayfeaturedimagegenesis-helptabs.php:162, includes/settings/fields-main.php:46
|
#: includes/settings/class-displayfeaturedimagegenesis-helptabs.php:162
|
||||||
|
#: includes/settings/fields-main.php:46
|
||||||
msgid "Do Not Move Titles"
|
msgid "Do Not Move Titles"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -222,7 +265,8 @@ msgstr ""
|
|||||||
msgid "If your RSS feed is set to Full Text, the Featured Image will be added to the entry content. If it is set to Summary, the Featured Image will be added to the excerpt instead."
|
msgid "If your RSS feed is set to Full Text, the Featured Image will be added to the entry content. If it is set to Summary, the Featured Image will be added to the excerpt instead."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/settings/class-displayfeaturedimagegenesis-helptabs.php:211, includes/settings/fields-main.php:74
|
#: includes/settings/class-displayfeaturedimagegenesis-helptabs.php:211
|
||||||
|
#: includes/settings/fields-main.php:74
|
||||||
msgid "Archive Thumbnails"
|
msgid "Archive Thumbnails"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -274,7 +318,8 @@ msgstr ""
|
|||||||
msgid "By default, the banner image takes 750 milliseconds to fade in once the image has loaded into the browser. You can make the image fade in more quickly or slowly, as you prefer."
|
msgid "By default, the banner image takes 750 milliseconds to fade in once the image has loaded into the browser. You can make the image fade in more quickly or slowly, as you prefer."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/settings/class-displayfeaturedimagegenesis-helptabs.php:289, includes/settings/fields-main.php:26
|
#: includes/settings/class-displayfeaturedimagegenesis-helptabs.php:289
|
||||||
|
#: includes/settings/fields-main.php:26
|
||||||
msgid "Preferred Image Size"
|
msgid "Preferred Image Size"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -282,7 +327,8 @@ msgstr ""
|
|||||||
msgid "Set the default image size you would like to use sitewide. This can be overridden per content type, or on an individual post."
|
msgid "Set the default image size you would like to use sitewide. This can be overridden per content type, or on an individual post."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/settings/class-displayfeaturedimagegenesis-helptabs.php:301, includes/settings/fields-style.php:6
|
#: includes/settings/class-displayfeaturedimagegenesis-helptabs.php:301
|
||||||
|
#: includes/settings/fields-style.php:6
|
||||||
msgid "Disable JavaScript"
|
msgid "Disable JavaScript"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -348,7 +394,8 @@ msgstr ""
|
|||||||
|
|
||||||
#. translators: the placeholder is the name of the featured image; eg. default, search, or the name of a content type.
|
#. translators: the placeholder is the name of the featured image; eg. default, search, or the name of a content type.
|
||||||
#. translators: the user display name
|
#. translators: the user display name
|
||||||
#: includes/settings/class-displayfeaturedimagegenesis-settings-validate-image.php:72, includes/settings/class-displayfeaturedimagegenesis-settings-validate-image.php:89
|
#: includes/settings/class-displayfeaturedimagegenesis-settings-validate-image.php:72
|
||||||
|
#: includes/settings/class-displayfeaturedimagegenesis-settings-validate-image.php:89
|
||||||
msgid " The %s Featured Image has been reset to the last valid setting."
|
msgid " The %s Featured Image has been reset to the last valid setting."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -376,7 +423,8 @@ msgstr ""
|
|||||||
msgid "Optionally, change the hook location and priority of the featured image output. Use with caution. Note: this will change the hook/priority of the featured image sitewide. If you need to make changes based on content type, check the readme for code examples."
|
msgid "Optionally, change the hook location and priority of the featured image output. Use with caution. Note: this will change the hook/priority of the featured image sitewide. If you need to make changes based on content type, check the readme for code examples."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/settings/class-displayfeaturedimagegenesis-settings.php:210, includes/widgets/class-displayfeaturedimagegenesis-widgets-form.php:75
|
#: includes/settings/class-displayfeaturedimagegenesis-settings.php:210
|
||||||
|
#: includes/widgets/class-displayfeaturedimagegenesis-widgets-form.php:75
|
||||||
msgid "Center"
|
msgid "Center"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -384,11 +432,14 @@ msgstr ""
|
|||||||
msgid "Do Not Center"
|
msgid "Do Not Center"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/settings/class-displayfeaturedimagegenesis-settings.php:244, includes/settings/fields-advanced.php:11
|
#: includes/settings/class-displayfeaturedimagegenesis-settings.php:244
|
||||||
|
#: includes/settings/fields-advanced.php:11
|
||||||
msgid "(default)"
|
msgid "(default)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/settings/class-displayfeaturedimagegenesis-settings.php:249, includes/settings/class-displayfeaturedimagegenesis-settings.php:250, includes/settings/class-displayfeaturedimagegenesis-settings.php:251
|
#: includes/settings/class-displayfeaturedimagegenesis-settings.php:249
|
||||||
|
#: includes/settings/class-displayfeaturedimagegenesis-settings.php:250
|
||||||
|
#: includes/settings/class-displayfeaturedimagegenesis-settings.php:251
|
||||||
msgid "(HTML5 themes)"
|
msgid "(HTML5 themes)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -465,7 +516,8 @@ msgstr ""
|
|||||||
msgid "Banner (default)"
|
msgid "Banner (default)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/settings/fields-main.php:32, includes/widgets/fields/author-gravatar.php:13
|
#: includes/settings/fields-main.php:32
|
||||||
|
#: includes/widgets/fields/author-gravatar.php:13
|
||||||
msgid "Large"
|
msgid "Large"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -585,15 +637,21 @@ msgstr ""
|
|||||||
msgid "Posts"
|
msgid "Posts"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/widgets/class-displayfeaturedimagegenesis-widgets-form.php:72, includes/widgets/fields/author-archive.php:9, includes/widgets/fields/author-description.php:14, includes/widgets/fields/author-gravatar.php:49, includes/widgets/fields/text.php:25
|
#: includes/widgets/class-displayfeaturedimagegenesis-widgets-form.php:72
|
||||||
|
#: includes/widgets/fields/author-archive.php:9
|
||||||
|
#: includes/widgets/fields/author-description.php:14
|
||||||
|
#: includes/widgets/fields/author-gravatar.php:49
|
||||||
|
#: includes/widgets/fields/text.php:25
|
||||||
msgid "None"
|
msgid "None"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/widgets/class-displayfeaturedimagegenesis-widgets-form.php:73, includes/widgets/fields/author-gravatar.php:50
|
#: includes/widgets/class-displayfeaturedimagegenesis-widgets-form.php:73
|
||||||
|
#: includes/widgets/fields/author-gravatar.php:50
|
||||||
msgid "Left"
|
msgid "Left"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/widgets/class-displayfeaturedimagegenesis-widgets-form.php:74, includes/widgets/fields/author-gravatar.php:51
|
#: includes/widgets/class-displayfeaturedimagegenesis-widgets-form.php:74
|
||||||
|
#: includes/widgets/fields/author-gravatar.php:51
|
||||||
msgid "Right"
|
msgid "Right"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -625,11 +683,14 @@ msgstr ""
|
|||||||
msgid "Displays user profile block with Gravatar"
|
msgid "Displays user profile block with Gravatar"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/widgets/displayfeaturedimagegenesis-author-widget.php:31, includes/widgets/fields/blocks.php:15
|
#: includes/widgets/displayfeaturedimagegenesis-author-widget.php:31
|
||||||
|
#: includes/widgets/fields/blocks.php:15
|
||||||
msgid "Display Featured Author Profile"
|
msgid "Display Featured Author Profile"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/widgets/displayfeaturedimagegenesis-author-widget.php:121, includes/widgets/displayfeaturedimagegenesis-cpt-archive-widget.php:136, includes/widgets/displayfeaturedimagegenesis-taxonomy-widget.php:138
|
#: includes/widgets/displayfeaturedimagegenesis-author-widget.php:121
|
||||||
|
#: includes/widgets/displayfeaturedimagegenesis-cpt-archive-widget.php:136
|
||||||
|
#: includes/widgets/displayfeaturedimagegenesis-taxonomy-widget.php:138
|
||||||
msgid "Title:"
|
msgid "Title:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -637,7 +698,8 @@ msgstr ""
|
|||||||
msgid "Displays a post type archive with its featured image"
|
msgid "Displays a post type archive with its featured image"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/widgets/displayfeaturedimagegenesis-cpt-archive-widget.php:40, includes/widgets/fields/blocks.php:25
|
#: includes/widgets/displayfeaturedimagegenesis-cpt-archive-widget.php:40
|
||||||
|
#: includes/widgets/fields/blocks.php:25
|
||||||
msgid "Display Featured Post Type Archive Image"
|
msgid "Display Featured Post Type Archive Image"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -649,11 +711,13 @@ msgstr ""
|
|||||||
msgid "Displays a term with its featured image"
|
msgid "Displays a term with its featured image"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/widgets/displayfeaturedimagegenesis-taxonomy-widget.php:40, includes/widgets/fields/blocks.php:5
|
#: includes/widgets/displayfeaturedimagegenesis-taxonomy-widget.php:40
|
||||||
|
#: includes/widgets/fields/blocks.php:5
|
||||||
msgid "Display Featured Term Image"
|
msgid "Display Featured Term Image"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/widgets/displayfeaturedimagegenesis-taxonomy-widget.php:150, includes/widgets/fields/blocks.php:8
|
#: includes/widgets/displayfeaturedimagegenesis-taxonomy-widget.php:150
|
||||||
|
#: includes/widgets/fields/blocks.php:8
|
||||||
msgid "Term"
|
msgid "Term"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -697,7 +761,8 @@ msgstr ""
|
|||||||
msgid "Author Bio (from profile)"
|
msgid "Author Bio (from profile)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/widgets/fields/author-description.php:16, includes/widgets/fields/text.php:27
|
#: includes/widgets/fields/author-description.php:16
|
||||||
|
#: includes/widgets/fields/text.php:27
|
||||||
msgid "Custom Text (below)"
|
msgid "Custom Text (below)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -733,7 +798,8 @@ msgstr ""
|
|||||||
msgid "Show the user's featured image."
|
msgid "Show the user's featured image."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: includes/widgets/fields/author-image.php:18, includes/widgets/fields/image.php:18
|
#: includes/widgets/fields/author-image.php:18
|
||||||
|
#: includes/widgets/fields/image.php:18
|
||||||
msgid "Image Size:"
|
msgid "Image Size:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|||||||
Generated
+15452
File diff suppressed because it is too large
Load Diff
+12
-9
@@ -1,16 +1,16 @@
|
|||||||
{
|
{
|
||||||
"name": "display-featured-image-genesis",
|
"name": "display-featured-image-genesis",
|
||||||
"description": "Display Featured Image for Genesis",
|
"description": "Display Featured Image for Genesis",
|
||||||
"version": "3.2.2",
|
"version": "3.2.3",
|
||||||
"private": true,
|
"private": true,
|
||||||
"license": "GPL-2.0+",
|
"license": "GPL-2.0+",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"autoprefixer": "10.4.13",
|
"autoprefixer": "10.4.16",
|
||||||
"browser-sync": "2.27.11",
|
"browser-sync": "2.27.11",
|
||||||
"css-mqpacker": "7.0.0",
|
"css-mqpacker": "7.0.0",
|
||||||
"del": "7.0.0",
|
"del": "7.1.0",
|
||||||
"gulp": "^4.0.2",
|
"gulp": "^4.0.2",
|
||||||
"gulp-chmod": "3.0.0",
|
"gulp-chmod": "4.0.0",
|
||||||
"gulp-notify": "4.0.0",
|
"gulp-notify": "4.0.0",
|
||||||
"gulp-postcss": "9.0.1",
|
"gulp-postcss": "9.0.1",
|
||||||
"gulp-rename": "2.0.0",
|
"gulp-rename": "2.0.0",
|
||||||
@@ -20,22 +20,25 @@
|
|||||||
"gulp-wp-pot": "^2.3.2",
|
"gulp-wp-pot": "^2.3.2",
|
||||||
"gulp-zip": "5.1.0",
|
"gulp-zip": "5.1.0",
|
||||||
"perfectionist": "^2.4.0",
|
"perfectionist": "^2.4.0",
|
||||||
"postcss": "^8.4.4",
|
"postcss": "^8.4.31",
|
||||||
"postcss-import": "15.1.0",
|
"postcss-import": "15.1.0",
|
||||||
"sass": "^1.41.1"
|
"sass": "^1.69.5"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@wordpress/browserslist-config": "5.7.0",
|
"@wordpress/browserslist-config": "5.28.0",
|
||||||
"glob-parent": ">=5.1.2",
|
"glob-parent": ">=5.1.2",
|
||||||
"gulp-sass-unicode": "^1.0.5",
|
"gulp-sass-unicode": "^1.0.5",
|
||||||
"gulp-svg-sprites": "^4.1.2",
|
"gulp-svg-sprites": "^4.1.2",
|
||||||
"normalize.css": "8.0.1",
|
"normalize.css": "8.0.1",
|
||||||
"trim-newlines": ">=3.0.1",
|
"trim-newlines": ">=3.0.1",
|
||||||
"set-value": ">=4.0.1",
|
"set-value": ">=4.0.1",
|
||||||
"axios": ">=0.24.0",
|
"axios": "1.6.1",
|
||||||
"nth-check": ">=2.0.1"
|
"nth-check": ">=2.0.1"
|
||||||
},
|
},
|
||||||
"browserslist": [
|
"browserslist": [
|
||||||
"extends @wordpress/browserslist-config"
|
"extends @wordpress/browserslist-config"
|
||||||
]
|
],
|
||||||
|
"scripts": {
|
||||||
|
"translate": "wp i18n make-pot . languages/display-featured-image-genesis.pot --exclude=node_modules --domain=display-featured-image-genesis"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+8
-5
@@ -3,10 +3,10 @@
|
|||||||
Contributors: littler.chicken
|
Contributors: littler.chicken
|
||||||
Donate link: https://robincornett.com/donate/
|
Donate link: https://robincornett.com/donate/
|
||||||
Tags: banner, featured image, featured images, genesis, studiopress, post thumbnails, featured image rss, rss
|
Tags: banner, featured image, featured images, genesis, studiopress, post thumbnails, featured image rss, rss
|
||||||
Requires at least: 5.0
|
Requires at least: 5.2
|
||||||
Tested up to: 5.8
|
Tested up to: 6.4
|
||||||
Stable tag: 3.2.2
|
Stable tag: 3.2.3
|
||||||
Requires PHP: 5.6
|
Requires PHP: 7.4
|
||||||
License: GPL-2.0+
|
License: GPL-2.0+
|
||||||
License URI: http://www.gnu.org/licenses/gpl-2.0.txt
|
License URI: http://www.gnu.org/licenses/gpl-2.0.txt
|
||||||
|
|
||||||
@@ -218,10 +218,13 @@ Similar hooks:
|
|||||||
|
|
||||||
== Upgrade Notice ==
|
== Upgrade Notice ==
|
||||||
|
|
||||||
3.2.0: featured image widgets are now available as blocks; banner image size has been changed due to WordPress 5.3 changes
|
3.2.3: updated for PHP 8 compatibility
|
||||||
|
|
||||||
== Changelog ==
|
== Changelog ==
|
||||||
|
|
||||||
|
= 3.2.3 =
|
||||||
|
* updated: PHP 8 compatibility
|
||||||
|
|
||||||
= 3.2.2 =
|
= 3.2.2 =
|
||||||
* added: support for webp images
|
* added: support for webp images
|
||||||
* fixed: user's custom column filter
|
* fixed: user's custom column filter
|
||||||
|
|||||||
@@ -1,71 +1,71 @@
|
|||||||
.has-leader .site-inner {
|
.has-leader .site-inner {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.big-leader {
|
.big-leader {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
height: 100vh;
|
max-height: 100vh;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
.wrap {
|
.wrap {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__image {
|
&__image {
|
||||||
display: block;
|
display: block;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
max-width: none;
|
max-width: none;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
}
|
}
|
||||||
|
|
||||||
.featured-image-overlay {
|
.featured-image-overlay {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.excerpt,
|
.excerpt,
|
||||||
.archive-description {
|
.archive-description {
|
||||||
margin-bottom: 24px;
|
margin-bottom: 24px;
|
||||||
padding: 24px;
|
padding: 24px;
|
||||||
background: rgba(255,255,255,0.85);
|
background: rgba(255,255,255,0.85);
|
||||||
}
|
}
|
||||||
|
|
||||||
p {
|
p {
|
||||||
margin-top: 18px;
|
margin-top: 18px;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
|
|
||||||
.home & {
|
.home & {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
.home & {
|
.home & {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.excerpt .entry-title,
|
.excerpt .entry-title,
|
||||||
.archive-description .archive-title {
|
.archive-description .archive-title {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes dfig-fadein {
|
@keyframes dfig-fadein {
|
||||||
from { opacity: 0; }
|
from { opacity: 0; }
|
||||||
to { opacity: 1; }
|
to { opacity: 1; }
|
||||||
}
|
}
|
||||||
|
|
||||||
.backstretch.no-js {
|
.backstretch.no-js {
|
||||||
max-height: 600px;
|
max-height: 600px;
|
||||||
}
|
}
|
||||||
|
|
||||||
img.featured {
|
img.featured {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user