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
|
@ -14,14 +14,14 @@
|
|||
*
|
||||
* @since 1.5.0
|
||||
*/
|
||||
class MCI_Footnotes_Config {
|
||||
class Footnotes_Config {
|
||||
/**
|
||||
* Internal Plugin name.
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @var string
|
||||
*/
|
||||
const C_STR_PLUGIN_NAME = 'footnotes';
|
||||
const PLUGIN_NAME = 'footnotes';
|
||||
|
||||
/**
|
||||
* Public Plugin name.
|
||||
|
@ -31,7 +31,7 @@ class MCI_Footnotes_Config {
|
|||
*
|
||||
* edited classes for v2.0.4
|
||||
*/
|
||||
const C_STR_PLUGIN_PUBLIC_NAME = '<span class="footnotes_logo footnotes_logo_part1">foot</span><span class="footnotes_logo footnotes_logo_part2">notes</span>';
|
||||
const PLUGIN_PUBLIC_NAME = '<span class="footnotes_logo footnotes_logo_part1">foot</span><span class="footnotes_logo footnotes_logo_part2">notes</span>';
|
||||
|
||||
/**
|
||||
* Public Plugin name for dashboard heading
|
||||
|
@ -45,7 +45,7 @@ class MCI_Footnotes_Config {
|
|||
* @since 2.0.4
|
||||
* @var string
|
||||
*/
|
||||
const C_STR_PLUGIN_HEADING_NAME = '<span class="footnotes_logo_heading footnotes_logo_part1_heading">foot</span><span class="footnotes_logo_heading footnotes_logo_part2_heading">notes</span>';
|
||||
const PLUGIN_HEADING_NAME = '<span class="footnotes_logo_heading footnotes_logo_part1_heading">foot</span><span class="footnotes_logo_heading footnotes_logo_part2_heading">notes</span>';
|
||||
|
||||
/**
|
||||
* Html tag for the LOVE symbol.
|
||||
|
@ -53,7 +53,7 @@ class MCI_Footnotes_Config {
|
|||
* @since 1.5.0
|
||||
* @var string
|
||||
*/
|
||||
const C_STR_LOVE_SYMBOL = '<span style="color:#ff6d3b; font-weight:bold;">♥</span>';
|
||||
const LOVE_SYMBOL = '<span style="color:#ff6d3b; font-weight:bold;">♥</span>';
|
||||
|
||||
/**
|
||||
* HTML code for the 'love' symbol used in dashboard heading
|
||||
|
@ -61,7 +61,7 @@ class MCI_Footnotes_Config {
|
|||
* @since 2.0.4
|
||||
* @var string
|
||||
*/
|
||||
const C_STR_LOVE_SYMBOL_HEADING = '<span class="footnotes_heart_heading">♥</span>';
|
||||
const LOVE_SYMBOL_HEADING = '<span class="footnotes_heart_heading">♥</span>';
|
||||
|
||||
/**
|
||||
* Short code to DON'T display the 'LOVE ME' slug on certain pages.
|
||||
|
@ -69,5 +69,5 @@ class MCI_Footnotes_Config {
|
|||
* @since 1.5.0
|
||||
* @var string
|
||||
*/
|
||||
const C_STR_NO_LOVE_SLUG = '[[no footnotes: love]]';
|
||||
const NO_LOVE_SLUG = '[[no footnotes: love]]';
|
||||
}
|
||||
|
|
Reference in a new issue