mirror of
https://github.com/10h30/display-featured-image-genesis.git
synced 2026-07-19 06:23:22 +09:00
Add general widgets class
This commit is contained in:
@@ -81,6 +81,13 @@ class Display_Featured_Image_Genesis {
|
||||
*/
|
||||
protected $taxonomies;
|
||||
|
||||
/**
|
||||
* Register widgets and related shortcodes.
|
||||
*
|
||||
* @var \DisplayFeaturedImageGenesisWidgets
|
||||
*/
|
||||
protected $widgets;
|
||||
|
||||
/**
|
||||
* Display_Featured_Image_Genesis constructor.
|
||||
*
|
||||
@@ -95,7 +102,7 @@ class Display_Featured_Image_Genesis {
|
||||
* @param $settings
|
||||
* @param $taxonomies
|
||||
*/
|
||||
function __construct( $admin, $author, $common, $customizer, $description, $helptabs, $output, $post_meta, $rss, $settings, $taxonomies ) {
|
||||
function __construct( $admin, $author, $common, $customizer, $description, $helptabs, $output, $post_meta, $rss, $settings, $taxonomies, $widgets ) {
|
||||
$this->admin = $admin;
|
||||
$this->author = $author;
|
||||
$this->common = $common;
|
||||
@@ -107,6 +114,7 @@ class Display_Featured_Image_Genesis {
|
||||
$this->rss = $rss;
|
||||
$this->settings = $settings;
|
||||
$this->taxonomies = $taxonomies;
|
||||
$this->widgets = $widgets;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -122,7 +130,6 @@ class Display_Featured_Image_Genesis {
|
||||
|
||||
// Plugin setup
|
||||
add_action( 'after_setup_theme', array( $this, 'add_plugin_supports' ) );
|
||||
add_action( 'widgets_init', array( $this, 'register_widgets' ) );
|
||||
add_action( 'plugins_loaded', array( $this, 'load_textdomain' ) );
|
||||
add_filter( 'plugin_action_links_' . DISPLAYFEATUREDIMAGEGENESIS_BASENAME, array( $this, 'add_settings_link' ) );
|
||||
|
||||
@@ -130,6 +137,11 @@ class Display_Featured_Image_Genesis {
|
||||
add_action( 'admin_init', array( $this->admin, 'set_up_columns' ) );
|
||||
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
|
||||
|
||||
// Widgets
|
||||
add_action( 'widgets_init', array( $this->widgets, 'register_widgets' ) );
|
||||
add_action( 'widgets_init', array( $this->widgets, 'register_shortcodes' ) );
|
||||
add_action( 'admin_enqueue_scripts', array( $this->widgets, 'enqueue_scripts' ) );
|
||||
|
||||
// Taxonomies, Author, Post Meta
|
||||
add_filter( 'displayfeaturedimagegenesis_get_taxonomies', array( $this->taxonomies, 'remove_post_status_terms' ) );
|
||||
add_action( 'admin_init', array( $this->taxonomies, 'set_taxonomy_meta' ) );
|
||||
@@ -151,7 +163,6 @@ class Display_Featured_Image_Genesis {
|
||||
|
||||
// RSS
|
||||
add_action( 'template_redirect', array( $this->rss, 'maybe_do_feed' ) );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user