refactor: remove Hungarian notation and MCI
prefixes
I had to use some RegEx-fu for this. Specifically: ```bash find ./{footnotes.php,includes.php,class/} -type f -name "*.php" -exec sed -i 's/\(p\|l\|a\)_\(str\|bool\|int\|obj\|flo\|arr\)_//g' {} \; find ./{footnotes.php,includes.php,class/} -type f -name "*.php" -exec sed -i 's/MCI_Footnotes/Footnotes/g' {} \; find ./{footnotes.php,includes.php,class/} -type f -name "*.php" -exec sed -i 's/C_\(INT\|STR\|FLO\)_//g' {} \; ``` This should have covered all the bases. In my testing I encountered one error caused by these changes. In the `add_select_box` function in `/class/dashboard/layout.php`, there was a function parameter called `$p_arr_options` and a variable called `$l_str_options`. Removing the Hungarian notation caused an error as these two variables were both now called `$options`. This has been fixed, and I like to think that that will have been the only naming conflict, but I think it is more likely that there maybe others. Further testing is required before I am happy calling this release-ready. Close #34, progress #36
This commit is contained in:
parent
df7160fad8
commit
1284544556
15 changed files with 1710 additions and 1710 deletions
|
@ -23,7 +23,7 @@
|
|||
* @since 2.5.3 (Hungarian)
|
||||
* @var str
|
||||
*/
|
||||
define( 'C_STR_FOOTNOTES_VERSION', '2.7.1' );
|
||||
define( 'FOOTNOTES_VERSION', '2.7.1' );
|
||||
|
||||
/**
|
||||
* Defines the current environment ('development' or 'production').
|
||||
|
@ -108,10 +108,10 @@ define( 'PRODUCTION_ENV', false );
|
|||
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 );
|
||||
$plugin_file = 'footnotes/footnotes.php';
|
||||
add_filter( "plugin_action_links_{$plugin_file}", array( 'Hooks', 'get_plugin_links' ), 10, 2 );
|
||||
|
||||
// Initialize the Plugin.
|
||||
$g_obj_mci_footnotes = new MCI_Footnotes();
|
||||
$g_obj_mci_footnotes = new Footnotes();
|
||||
// Run the Plugin.
|
||||
$g_obj_mci_footnotes->run();
|
||||
|
|
Reference in a new issue