moved all aptches from cipf plugin to fbpatch
This commit is contained in:
@@ -16,7 +16,6 @@ if (!defined('ABSPATH')) {
|
||||
*
|
||||
*/
|
||||
class Fbpatch {
|
||||
|
||||
const SLUG_TOOGLE_ADMIN_MENU = ['_name'=>'toogle_admin_menu_url_fbpatch', 'toggle'=>'toggle', 'show'=>'show', 'hide'=>'hide'];
|
||||
const OPTION_TOGGLE_MENU = ['_name'=>'toggle_admin_menu_option_fbpatch', 'show'=>'show', 'hide'=>'hide'];
|
||||
const NONCE = ['_name'=>'nonce_name', '_action'=>'action_name'];
|
||||
@@ -24,12 +23,22 @@ class Fbpatch {
|
||||
|
||||
private static $_patches = [
|
||||
'_name'=>'fbpatch_list_of_patches',
|
||||
'calculations'=>['checked'=>false, 'title'=>'calculations title', 'description'=>'calculation description'],
|
||||
'hide_show' =>['checked'=>false, 'title'=>'hide/show title', 'description'=>'hide/show description'],
|
||||
'calculations'=>['checked'=>true, 'title'=>'calculations title', 'description'=>'calculation description'],
|
||||
'hide_show' =>['checked'=>true, 'title'=>'hide/show title', 'description'=>'hide/show description'],
|
||||
'modals' =>['checked'=>false, 'title'=>'modals title', 'description'=>'modals description'],
|
||||
'urls' =>['checked'=>false, 'title'=>'urls title', 'description'=>'urls description'],
|
||||
];
|
||||
//private static $_patches = ['_name'=>'fbpatch_list_of_patches', 'hide_show'];
|
||||
//private static $_patches = ['_name'=>'fbpatch_list_of_patches'];
|
||||
|
||||
public static function root_path() {
|
||||
return plugin_dir_path(__DIR__);
|
||||
}
|
||||
public static function root_url() {
|
||||
return plugin_dir_url(__DIR__);
|
||||
}
|
||||
|
||||
|
||||
private static function set_option_patches() {
|
||||
/*
|
||||
* get the list of patches in option
|
||||
@@ -116,7 +125,7 @@ class Fbpatch {
|
||||
$patches = Fbpatch::get_patches();
|
||||
foreach($patches as $patch => $data) {
|
||||
if ($data['checked'] === true) {
|
||||
include_once(plugin_dir_path(__DIR__) . '/php/'.$patch.'.php');
|
||||
include_once(self::root_path() . '/php/patches/'.$patch.'.php');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user