refactor: re-add Footnotes prefix to Hooks

This commit is contained in:
Ben Goldsworthy 2021-04-19 12:24:26 +01:00
parent 7adab1cd45
commit 2d4b778377
4 changed files with 9 additions and 9 deletions

View file

@ -1,6 +1,6 @@
<?php // phpcs:disable WordPress.Files.FileName.InvalidClassFileName, WordPress.Security.EscapeOutput.OutputNotEscaped
/**
* Hooks class
* Footnotes_Hooks class
*
* @package footnotes
* @subpackage WPDashboard
@ -8,11 +8,11 @@
*/
/**
* Registers all WordPress Hooks and executes them on demand.
* Registers all WordPress hooks and executes them on demand.
*
* @since 1.5.0
*/
class Hooks {
class Footnotes_Hooks {
/**
* Registers all WordPress hooks.
@ -20,9 +20,9 @@ class Hooks {
* @since 1.5.0
*/
public static function register_hooks() {
register_activation_hook( dirname( __FILE__ ) . '/../footnotes.php', array( 'Hooks', 'activate_plugin' ) );
register_deactivation_hook( dirname( __FILE__ ) . '/../footnotes.php', array( 'Hooks', 'deactivate_plugin' ) );
register_uninstall_hook( dirname( __FILE__ ) . '/../footnotes.php', array( 'Hooks', 'uninstall_plugin' ) );
register_activation_hook( dirname( __FILE__ ) . '/../footnotes.php', array( 'Footnotes_Hooks', 'activate_plugin' ) );
register_deactivation_hook( dirname( __FILE__ ) . '/../footnotes.php', array( 'Footnotes_Hooks', 'deactivate_plugin' ) );
register_uninstall_hook( dirname( __FILE__ ) . '/../footnotes.php', array( 'Footnotes_Hooks', 'uninstall_plugin' ) );
}
/**

View file

@ -109,7 +109,7 @@ class Footnotes {
// Register Button hooks.
Footnotes_WYSIWYG::register_hooks();
// Register general hooks.
Hooks::register_hooks();
Footnotes_Hooks::register_hooks();
// Initialize the Plugin Dashboard.
$this->initialize_dashboard();

View file

@ -398,7 +398,7 @@ class Footnotes_Task {
public static $a_bool_syntax_error_flag = true;
/**
* Register WordPress Hooks to replace Footnotes in the content of a public page.
* Register WordPress hooks to replace Footnotes in the content of a public page.
*
* @since 1.5.0
*

View file

@ -109,7 +109,7 @@ require_once dirname( __FILE__ ) . '/includes.php';
// Add Plugin Links to the "installed plugins" page.
$l_str_plugin_file = 'footnotes/footnotes.php';
add_filter( "plugin_action_links_{$l_str_plugin_file}", array( 'Hooks', 'get_plugin_links' ), 10, 2 );
add_filter( "plugin_action_links_{$l_str_plugin_file}", array( 'Footnotes_Hooks', 'get_plugin_links' ), 10, 2 );
// Initialize the Plugin.
$g_obj_mci_footnotes = new Footnotes();