chore: lint code
This commit is contained in:
parent
4415c98eaa
commit
d3283bdb02
8 changed files with 25 additions and 19 deletions
|
@ -79,14 +79,14 @@ class Footnotes_Admin {
|
|||
*/
|
||||
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-footnotes-wysiwyg.php';
|
||||
|
||||
$this->wysiwyg = new Footnotes_WYSIWYG($this->plugin_name);
|
||||
$this->wysiwyg = new Footnotes_WYSIWYG( $this->plugin_name );
|
||||
|
||||
/**
|
||||
* The class responsible for constructing the plugin dashboard page(s).
|
||||
*/
|
||||
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/layout/class-footnotes-layout-init.php';
|
||||
|
||||
new Footnotes_Layout_Init($this->plugin_name);
|
||||
new Footnotes_Layout_Init( $this->plugin_name );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -42,9 +42,11 @@ class Footnotes_WYSIWYG {
|
|||
* @since 1.5.0
|
||||
* @param array $p_arr_buttons pre defined Buttons from WordPress.
|
||||
* @return array
|
||||
*
|
||||
* @todo Does this need to be `static`?
|
||||
*/
|
||||
public static function new_visual_editor_button( $p_arr_buttons ) {
|
||||
array_push( $p_arr_buttons, $this->plugin_name );
|
||||
array_push( $p_arr_buttons, 'footnotes' );
|
||||
return $p_arr_buttons;
|
||||
}
|
||||
|
||||
|
@ -66,9 +68,11 @@ class Footnotes_WYSIWYG {
|
|||
* @since 1.5.0
|
||||
* @param array $p_arr_plugins Scripts to be included to the editor.
|
||||
* @return array
|
||||
*
|
||||
* @todo Does this need to be `static`?
|
||||
*/
|
||||
public static function include_scripts( $p_arr_plugins ) {
|
||||
$p_arr_plugins[ $this->plugin_name ] = plugins_url( '/../admin/js/wysiwyg-editor' . ( ( PRODUCTION_ENV ) ? '.min' : '' ) . '.js', __FILE__ );
|
||||
$p_arr_plugins['footnotes'] = plugins_url( '/../admin/js/wysiwyg-editor' . ( ( PRODUCTION_ENV ) ? '.min' : '' ) . '.js', __FILE__ );
|
||||
return $p_arr_plugins;
|
||||
}
|
||||
|
||||
|
|
|
@ -43,6 +43,8 @@ class Footnotes_Layout_Init {
|
|||
/**
|
||||
* Class Constructor. Initializes all WordPress hooks for the Plugin Settings.
|
||||
*
|
||||
* @param string $plugin_name The name of the plugin.
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @since 2.8.0 Added `$plugin_name` parameter.
|
||||
*/
|
||||
|
@ -51,7 +53,7 @@ class Footnotes_Layout_Init {
|
|||
|
||||
$this->load_dependencies();
|
||||
|
||||
$this->settings_page = new Footnotes_Layout_Settings($this->plugin_name);
|
||||
$this->settings_page = new Footnotes_Layout_Settings( $this->plugin_name );
|
||||
|
||||
// Register hooks/actions.
|
||||
add_action( 'admin_menu', array( $this, 'register_options_submenu' ) );
|
||||
|
|
|
@ -169,7 +169,7 @@ class Footnotes {
|
|||
$this->loader->add_filter( 'plugin_action_links_footnotes/footnotes.php', $plugin_admin, 'footnotes_action_links' );
|
||||
|
||||
$this->loader->add_filter( 'mce_buttons', $plugin_admin->wysiwyg, 'new_visual_editor_button' );
|
||||
$this->loader->add_action( 'admin_print_footer_scripts', $plugin_admin->wysiwyg, 'new_plain_text_editor_button' );
|
||||
$this->loader->add_action( 'admin_print_footer_scripts', $plugin_admin->wysiwyg, 'new_plain_text_editor_button' );
|
||||
|
||||
$this->loader->add_filter( 'mce_external_plugins', $plugin_admin->wysiwyg, 'include_scripts' );
|
||||
|
||||
|
|
|
@ -133,7 +133,7 @@ class Footnotes_Public {
|
|||
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-footnotes-parser.php';
|
||||
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/widget/class-footnotes-widget-reference-container.php';
|
||||
|
||||
$this->reference_container_widget = new Footnotes_Widget_Reference_Container($this->plugin_name);
|
||||
$this->reference_container_widget = new Footnotes_Widget_Reference_Container( $this->plugin_name );
|
||||
|
||||
$this->a_obj_task = new Footnotes_Parser();
|
||||
}
|
||||
|
|
Reference in a new issue