refactor: upgrade to PHP 5.3
This commit is contained in:
parent
2165b60929
commit
a5dcebca44
9 changed files with 20 additions and 20 deletions
|
@ -90,14 +90,14 @@ class Admin {
|
||||||
/**
|
/**
|
||||||
* The class responsible for WYSIWYG editor integration.
|
* The class responsible for WYSIWYG editor integration.
|
||||||
*/
|
*/
|
||||||
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wysiwyg.php';
|
require_once plugin_dir_path( __DIR__ ) . 'admin/class-wysiwyg.php';
|
||||||
|
|
||||||
$this->wysiwyg = new WYSIWYG( $this->plugin_name );
|
$this->wysiwyg = new WYSIWYG( $this->plugin_name );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The class responsible for constructing the plugin dashboard page(s).
|
* The class responsible for constructing the plugin dashboard page(s).
|
||||||
*/
|
*/
|
||||||
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/layout/class-init.php';
|
require_once plugin_dir_path( __DIR__ ) . 'admin/layout/class-init.php';
|
||||||
|
|
||||||
new layout\Init( $this->plugin_name );
|
new layout\Init( $this->plugin_name );
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ namespace footnotes\admin\layout;
|
||||||
|
|
||||||
use footnotes\includes as Includes;
|
use footnotes\includes as Includes;
|
||||||
|
|
||||||
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'layout/class-init.php';
|
require_once plugin_dir_path( __DIR__ ) . 'layout/class-init.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class to be extended by page layout sub-classes.
|
* Class to be extended by page layout sub-classes.
|
||||||
|
|
|
@ -125,7 +125,7 @@ class Init {
|
||||||
/**
|
/**
|
||||||
* Represents the plugin settings dashboard page.
|
* Represents the plugin settings dashboard page.
|
||||||
*/
|
*/
|
||||||
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'layout/class-settings.php';
|
require_once plugin_dir_path( __DIR__ ) . 'layout/class-settings.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -23,7 +23,7 @@ use footnotes\general as General;
|
||||||
/**
|
/**
|
||||||
* Provides the abstract class to be extended for page layouts.
|
* Provides the abstract class to be extended for page layouts.
|
||||||
*/
|
*/
|
||||||
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'layout/class-engine.php';
|
require_once plugin_dir_path( __DIR__ ) . 'layout/class-engine.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class to initialise all defined page layouts.
|
* Class to initialise all defined page layouts.
|
||||||
|
|
|
@ -124,32 +124,32 @@ class Core {
|
||||||
* The class responsible for orchestrating the actions and filters of the
|
* The class responsible for orchestrating the actions and filters of the
|
||||||
* core plugin.
|
* core plugin.
|
||||||
*/
|
*/
|
||||||
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-loader.php';
|
require_once plugin_dir_path( __DIR__ ) . 'includes/class-loader.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The class responsible for defining internationalization functionality
|
* The class responsible for defining internationalization functionality
|
||||||
* of the plugin.
|
* of the plugin.
|
||||||
*/
|
*/
|
||||||
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-i18n.php';
|
require_once plugin_dir_path( __DIR__ ) . 'includes/class-i18n.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The various utility classes.
|
* The various utility classes.
|
||||||
*/
|
*/
|
||||||
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-config.php';
|
require_once plugin_dir_path( __DIR__ ) . 'includes/class-config.php';
|
||||||
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-convert.php';
|
require_once plugin_dir_path( __DIR__ ) . 'includes/class-convert.php';
|
||||||
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-settings.php';
|
require_once plugin_dir_path( __DIR__ ) . 'includes/class-settings.php';
|
||||||
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-template.php';
|
require_once plugin_dir_path( __DIR__ ) . 'includes/class-template.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The class responsible for defining all actions that occur in the admin area.
|
* The class responsible for defining all actions that occur in the admin area.
|
||||||
*/
|
*/
|
||||||
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-admin.php';
|
require_once plugin_dir_path( __DIR__ ) . 'admin/class-admin.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The class responsible for defining all actions that occur in the public-facing
|
* The class responsible for defining all actions that occur in the public-facing
|
||||||
* side of the site.
|
* side of the site.
|
||||||
*/
|
*/
|
||||||
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-general.php';
|
require_once plugin_dir_path( __DIR__ ) . 'public/class-general.php';
|
||||||
|
|
||||||
$this->loader = new Loader();
|
$this->loader = new Loader();
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace footnotes\includes;
|
namespace footnotes\includes;
|
||||||
|
|
||||||
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-config.php';
|
require_once plugin_dir_path( __DIR__ ) . 'includes/class-config.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class providing internationalization functionality.
|
* Class providing internationalization functionality.
|
||||||
|
|
|
@ -17,7 +17,7 @@ namespace footnotes\includes;
|
||||||
*
|
*
|
||||||
* @todo Move to {@see Loader}.
|
* @todo Move to {@see Loader}.
|
||||||
*/
|
*/
|
||||||
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-convert.php';
|
require_once plugin_dir_path( __DIR__ ) . 'includes/class-convert.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class defining configurable plugin settings.
|
* Class defining configurable plugin settings.
|
||||||
|
|
|
@ -91,7 +91,7 @@ class Template {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->plugin_directory = plugin_dir_path( dirname( __FILE__ ) );
|
$this->plugin_directory = plugin_dir_path( __DIR__ );
|
||||||
|
|
||||||
$template = $this->get_template( $p_str_file_type, $p_str_file_name, $p_str_extension );
|
$template = $this->get_template( $p_str_file_type, $p_str_file_name, $p_str_extension );
|
||||||
if ( $template ) {
|
if ( $template ) {
|
||||||
|
|
|
@ -268,10 +268,10 @@ class Parser {
|
||||||
*/
|
*/
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
// TODO: Reorg dependencies.
|
// TODO: Reorg dependencies.
|
||||||
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-config.php';
|
require_once plugin_dir_path( __DIR__ ) . 'includes/class-config.php';
|
||||||
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-convert.php';
|
require_once plugin_dir_path( __DIR__ ) . 'includes/class-convert.php';
|
||||||
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-settings.php';
|
require_once plugin_dir_path( __DIR__ ) . 'includes/class-settings.php';
|
||||||
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-template.php';
|
require_once plugin_dir_path( __DIR__ ) . 'includes/class-template.php';
|
||||||
|
|
||||||
// TODO: Move to `General`.
|
// TODO: Move to `General`.
|
||||||
$this->register_hooks();
|
$this->register_hooks();
|
||||||
|
|
Reference in a new issue