';
- if ( $settings_updated ) {
+ if ( $l_bool_settings_updated ) {
echo sprintf( '
%s
', __( 'Settings saved', 'footnotes' ) );
}
@@ -272,11 +272,11 @@ abstract class Footnotes_Layout_Engine {
echo '';
@@ -287,7 +287,7 @@ abstract class Footnotes_Layout_Engine {
echo 'jQuery(document).ready(function ($) {';
echo 'jQuery(".footnotes-color-picker").wpColorPicker();';
echo "jQuery('.if-js-closed').removeClass('if-js-closed').addClass('closed');";
- echo "postboxes.add_postbox_toggles('" . $this->sub_page_hook . "');";
+ echo "postboxes.add_postbox_toggles('" . $this->a_str_sub_page_hook . "');";
echo '});';
echo '';
}
@@ -301,25 +301,25 @@ abstract class Footnotes_Layout_Engine {
* @return bool
*/
private function save_settings() {
- $new_settings = array();
+ $l_arr_new_settings = array();
// TODO: add nonce verification.
// Get current section.
- reset( $this->sections );
- $active_section_id = isset( $_GET['t'] ) ? wp_unslash( $_GET['t'] ) : key( $this->sections );
- $active_section = $this->sections[ $active_section_id ];
+ reset( $this->a_arr_sections );
+ $l_str_active_section_id = isset( $_GET['t'] ) ? wp_unslash( $_GET['t'] ) : key( $this->a_arr_sections );
+ $l_arr_active_section = $this->a_arr_sections[ $l_str_active_section_id ];
- foreach ( Footnotes_Settings::instance()->get_defaults( $active_section['container'] ) as $key => $l_mixed_value ) {
- if ( array_key_exists( $key, $_POST ) ) {
- $new_settings[ $key ] = wp_unslash( $_POST[ $key ] );
+ foreach ( MCI_Footnotes_Settings::instance()->get_defaults( $l_arr_active_section['container'] ) as $l_str_key => $l_mixed_value ) {
+ if ( array_key_exists( $l_str_key, $_POST ) ) {
+ $l_arr_new_settings[ $l_str_key ] = wp_unslash( $_POST[ $l_str_key ] );
} else {
// Setting is not defined in the POST array, define it to avoid the Default value.
- $new_settings[ $key ] = '';
+ $l_arr_new_settings[ $l_str_key ] = '';
}
}
// Update settings.
- return Footnotes_Settings::instance()->save_options( $active_section['container'], $new_settings );
+ return MCI_Footnotes_Settings::instance()->save_options( $l_arr_active_section['container'], $l_arr_new_settings );
}
// phpcs:enable WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing
@@ -336,7 +336,7 @@ abstract class Footnotes_Layout_Engine {
* Loads specific setting and returns an array with the keys [id, name, value].
*
* @since 1.5.0
- * @param string $setting_key_name Settings Array key name.
+ * @param string $p_str_setting_key_name Settings Array key name.
* @return array Contains Settings ID, Settings Name and Settings Value.
*
* @since 2.5.11 Remove escapement function.
@@ -354,14 +354,14 @@ abstract class Footnotes_Layout_Engine {
* This is the only instance of esc_|kses|sanitize in the pre-2.5.11 codebase.
* Removing this did not fix the quotation mark backslash escapement bug.
*/
- protected function load_setting( $setting_key_name ) {
+ protected function load_setting( $p_str_setting_key_name ) {
// Get current section.
- reset( $this->sections );
- $return = array();
- $return['id'] = sprintf( '%s', $setting_key_name );
- $return['name'] = sprintf( '%s', $setting_key_name );
- $return['value'] = esc_attr( Footnotes_Settings::instance()->get( $setting_key_name ) );
- return $return;
+ reset( $this->a_arr_sections );
+ $p_arr_return = array();
+ $p_arr_return['id'] = sprintf( '%s', $p_str_setting_key_name );
+ $p_arr_return['name'] = sprintf( '%s', $p_str_setting_key_name );
+ $p_arr_return['value'] = esc_attr( MCI_Footnotes_Settings::instance()->get( $p_str_setting_key_name ) );
+ return $p_arr_return;
}
/**
@@ -388,23 +388,23 @@ abstract class Footnotes_Layout_Engine {
* Returns a simple text inside html text.
*
* @since 1.5.0
- * @param string $text Message to be surrounded with simple html tag (span).
+ * @param string $p_str_text Message to be surrounded with simple html tag (span).
* @return string
*/
- protected function add_text( $text ) {
- return sprintf( '%s', $text );
+ protected function add_text( $p_str_text ) {
+ return sprintf( '%s', $p_str_text );
}
/**
* Returns the html tag for an input/select label.
*
* @since 1.5.0
- * @param string $setting_name Name of the Settings key to connect the Label with the input/select field.
- * @param string $caption Label caption.
+ * @param string $p_str_setting_name Name of the Settings key to connect the Label with the input/select field.
+ * @param string $p_str_caption Label caption.
* @return string
*/
- protected function add_label( $setting_name, $caption ) {
- if ( empty( $caption ) ) {
+ protected function add_label( $p_str_setting_name, $p_str_caption ) {
+ if ( empty( $p_str_caption ) ) {
return '';
}
@@ -418,34 +418,34 @@ abstract class Footnotes_Layout_Engine {
* label is widely preferred best practice, mandatory per
* [style guides](https://softwareengineering.stackexchange.com/questions/234546/colons-in-internationalized-ui).
*/
- return sprintf( '', $setting_name, $caption );
+ return sprintf( '', $p_str_setting_name, $p_str_caption );
}
/**
* Returns the html tag for an input [type = text].
*
* @since 1.5.0
- * @param string $setting_name Name of the Settings key to pre load the input field.
- * @param int $max_length Maximum length of the input, default 999 characters.
- * @param bool $readonly Set the input to be read only, default false.
- * @param bool $hidden Set the input to be hidden, default false.
+ * @param string $p_str_setting_name Name of the Settings key to pre load the input field.
+ * @param int $p_str_max_length Maximum length of the input, default 999 characters.
+ * @param bool $p_bool_readonly Set the input to be read only, default false.
+ * @param bool $p_bool_hidden Set the input to be hidden, default false.
* @return string
*/
- protected function add_text_box( $setting_name, $max_length = 999, $readonly = false, $hidden = false ) {
- $style = '';
+ protected function add_text_box( $p_str_setting_name, $p_str_max_length = 999, $p_bool_readonly = false, $p_bool_hidden = false ) {
+ $l_str_style = '';
// Collect data for given settings field.
- $data = $this->load_setting( $setting_name );
- if ( $hidden ) {
- $style .= 'display:none;';
+ $l_arr_data = $this->load_setting( $p_str_setting_name );
+ if ( $p_bool_hidden ) {
+ $l_str_style .= 'display:none;';
}
return sprintf(
'',
- $data['name'],
- $data['id'],
- $max_length,
- $style,
- $data['value'],
- $readonly ? 'readonly="readonly"' : ''
+ $l_arr_data['name'],
+ $l_arr_data['id'],
+ $p_str_max_length,
+ $l_str_style,
+ $l_arr_data['value'],
+ $p_bool_readonly ? 'readonly="readonly"' : ''
);
}
@@ -453,17 +453,17 @@ abstract class Footnotes_Layout_Engine {
* Returns the html tag for an input [type = checkbox].
*
* @since 1.5.0
- * @param string $setting_name Name of the Settings key to pre load the input field.
+ * @param string $p_str_setting_name Name of the Settings key to pre load the input field.
* @return string
*/
- protected function add_checkbox( $setting_name ) {
+ protected function add_checkbox( $p_str_setting_name ) {
// Collect data for given settings field.
- $data = $this->load_setting( $setting_name );
+ $l_arr_data = $this->load_setting( $p_str_setting_name );
return sprintf(
'',
- $data['name'],
- $data['id'],
- Footnotes_Convert::to_bool( $data['value'] ) ? 'checked="checked"' : ''
+ $l_arr_data['name'],
+ $l_arr_data['id'],
+ MCI_Footnotes_Convert::to_bool( $l_arr_data['value'] ) ? 'checked="checked"' : ''
);
}
@@ -477,33 +477,33 @@ abstract class Footnotes_Layout_Engine {
* @reporter @lolzim
*
* @since 2.5.13
- * @param string $setting_name Name of the Settings key to pre select the current value.
- * @param array $options Possible options to be selected.
+ * @param string $p_str_setting_name Name of the Settings key to pre select the current value.
+ * @param array $p_arr_options Possible options to be selected.
* @return string
*
* @since 2.5.15 Bugfix: Dashboard: General settings: Footnote start and end short codes: debug select box for shortcodes with pointy brackets.
* @since 2.6.1 Restore esc_attr() in load_setting(), remove htmlspecialchars() here.
*/
- protected function add_select_box( $setting_name, $options ) {
+ protected function add_select_box( $p_str_setting_name, $p_arr_options ) {
// Collect data for given settings field.
- $data = $this->load_setting( $setting_name );
- $select_options = '';
+ $l_arr_data = $this->load_setting( $p_str_setting_name );
+ $l_str_options = '';
// Loop through all array keys.
- foreach ( $options as $value => $caption ) {
- $select_options .= sprintf(
+ foreach ( $p_arr_options as $l_str_value => $l_str_caption ) {
+ $l_str_options .= sprintf(
'',
- $value,
+ $l_str_value,
// Only check for equality, not identity, WRT backlink symbol arrows.
- $value == $data['value'] ? 'selected' : '',
- $caption
+ $l_str_value == $l_arr_data['value'] ? 'selected' : '',
+ $l_str_caption
);
}
return sprintf(
'',
- $data['name'],
- $data['id'],
- $select_options
+ $l_arr_data['name'],
+ $l_arr_data['id'],
+ $l_str_options
);
}
@@ -511,17 +511,17 @@ abstract class Footnotes_Layout_Engine {
* Returns the html tag for a text area.
*
* @since 1.5.0
- * @param string $setting_name Name of the Settings key to pre fill the text area.
+ * @param string $p_str_setting_name Name of the Settings key to pre fill the text area.
* @return string
*/
- protected function add_textarea( $setting_name ) {
+ protected function add_textarea( $p_str_setting_name ) {
// Collect data for given settings field.
- $data = $this->load_setting( $setting_name );
+ $l_arr_data = $this->load_setting( $p_str_setting_name );
return sprintf(
'',
- $data['name'],
- $data['id'],
- $data['value']
+ $l_arr_data['name'],
+ $l_arr_data['id'],
+ $l_arr_data['value']
);
}
@@ -529,17 +529,17 @@ abstract class Footnotes_Layout_Engine {
* Returns the html tag for an input [type = text] with color selection class.
*
* @since 1.5.6
- * @param string $setting_name Name of the Settings key to pre load the input field.
+ * @param string $p_str_setting_name Name of the Settings key to pre load the input field.
* @return string
*/
- protected function add_color_selection( $setting_name ) {
+ protected function add_color_selection( $p_str_setting_name ) {
// Collect data for given settings field.
- $data = $this->load_setting( $setting_name );
+ $l_arr_data = $this->load_setting( $p_str_setting_name );
return sprintf(
'',
- $data['name'],
- $data['id'],
- $data['value']
+ $l_arr_data['name'],
+ $l_arr_data['id'],
+ $l_arr_data['value']
);
}
@@ -547,37 +547,37 @@ abstract class Footnotes_Layout_Engine {
* Returns the html tag for an input [type = num].
*
* @since 1.5.0
- * @param string $setting_name Name of the Settings key to pre load the input field.
+ * @param string $p_str_setting_name Name of the Settings key to pre load the input field.
* @param int $p_in_min Minimum value.
- * @param int $max Maximum value.
- * @param bool $deci true if 0.1 steps and floating to string, false if integer (default).
+ * @param int $p_int_max Maximum value.
+ * @param bool $p_bool_deci true if 0.1 steps and floating to string, false if integer (default).
* @return string
*
* Edited:
* @since 2.1.4 step argument and number_format() to allow decimals ..
*/
- protected function add_num_box( $setting_name, $p_in_min, $max, $deci = false ) {
+ protected function add_num_box( $p_str_setting_name, $p_in_min, $p_int_max, $p_bool_deci = false ) {
// Collect data for given settings field.
- $data = $this->load_setting( $setting_name );
+ $l_arr_data = $this->load_setting( $p_str_setting_name );
- if ( $deci ) {
- $value = number_format( floatval( $data['value'] ), 1 );
+ if ( $p_bool_deci ) {
+ $l_str_value = number_format( floatval( $l_arr_data['value'] ), 1 );
return sprintf(
'',
- $data['name'],
- $data['id'],
- $value,
+ $l_arr_data['name'],
+ $l_arr_data['id'],
+ $l_str_value,
$p_in_min,
- $max
+ $p_int_max
);
} else {
return sprintf(
'',
- $data['name'],
- $data['id'],
- $data['value'],
+ $l_arr_data['name'],
+ $l_arr_data['id'],
+ $l_arr_data['value'],
$p_in_min,
- $max
+ $p_int_max
);
}
}
diff --git a/class/dashboard/subpage-main.php b/class/dashboard/subpage-main.php
index 101054e..419e1c8 100644
--- a/class/dashboard/subpage-main.php
+++ b/class/dashboard/subpage-main.php
@@ -45,7 +45,7 @@
*
* @since 1.5.0
*/
-class Footnotes_Layout_Settings extends Footnotes_Layout_Engine {
+class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine {
/**
* Returns a Priority index. Lower numbers have a higher Priority.
@@ -64,7 +64,7 @@ class Footnotes_Layout_Settings extends Footnotes_Layout_Engine {
* @return string
*/
protected function get_sub_page_slug() {
- return '-' . Footnotes_Config::PLUGIN_NAME;
+ return '-' . MCI_Footnotes_Config::C_STR_PLUGIN_NAME;
}
/**
@@ -74,7 +74,7 @@ class Footnotes_Layout_Settings extends Footnotes_Layout_Engine {
* @return string
*/
protected function get_sub_page_title() {
- return Footnotes_Config::PLUGIN_PUBLIC_NAME;
+ return MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME;
}
/**
@@ -90,19 +90,19 @@ class Footnotes_Layout_Settings extends Footnotes_Layout_Engine {
* @since 2.1.6 removed if statement around expert tab
*/
protected function get_sections() {
- $tabs = array();
+ $l_arr_tabs = array();
// Sync tab name with mirror in task.php.
- $tabs[] = $this->add_section( 'settings', __( 'General settings', 'footnotes' ), 0, true );
+ $l_arr_tabs[] = $this->add_section( 'settings', __( 'General settings', 'footnotes' ), 0, true );
// Sync tab name with mirror in public function custom_css_migration().
- $tabs[] = $this->add_section( 'customize', __( 'Referrers and tooltips', 'footnotes' ), 1, true );
+ $l_arr_tabs[] = $this->add_section( 'customize', __( 'Referrers and tooltips', 'footnotes' ), 1, true );
- $tabs[] = $this->add_section( 'expert', __( 'Scope and priority', 'footnotes' ), 2, true );
- $tabs[] = $this->add_section( 'customcss', __( 'Custom CSS', 'footnotes' ), 3, true );
- $tabs[] = $this->add_section( 'how-to', __( 'Quick start guide', 'footnotes' ), null, false );
+ $l_arr_tabs[] = $this->add_section( 'expert', __( 'Scope and priority', 'footnotes' ), 2, true );
+ $l_arr_tabs[] = $this->add_section( 'customcss', __( 'Custom CSS', 'footnotes' ), 3, true );
+ $l_arr_tabs[] = $this->add_section( 'how-to', __( 'Quick start guide', 'footnotes' ), null, false );
- return $tabs;
+ return $l_arr_tabs;
}
/**
@@ -127,42 +127,42 @@ class Footnotes_Layout_Settings extends Footnotes_Layout_Engine {
* @since 2.1.6 / 2.2.0 tabs reordered and renamed
*/
protected function get_meta_boxes() {
- $meta_boxes = array();
+ $l_arr_meta_boxes = array();
- $meta_boxes[] = $this->add_meta_box( 'settings', 'amp-compat', __( 'AMP compatibility', 'footnotes' ), 'amp_compat' );
- $meta_boxes[] = $this->add_meta_box( 'settings', 'start-end', __( 'Footnote start and end short codes', 'footnotes' ), 'start_end' );
- $meta_boxes[] = $this->add_meta_box( 'settings', 'numbering', __( 'Footnotes numbering', 'footnotes' ), 'numbering' );
- $meta_boxes[] = $this->add_meta_box( 'settings', 'scrolling', __( 'Scrolling behavior', 'footnotes' ), 'scrolling' );
- $meta_boxes[] = $this->add_meta_box( 'settings', 'hard-links', __( 'URL fragment ID configuration', 'footnotes' ), 'hard_links' );
- $meta_boxes[] = $this->add_meta_box( 'settings', 'reference-container', __( 'Reference container', 'footnotes' ), 'reference_container' );
- $meta_boxes[] = $this->add_meta_box( 'settings', 'excerpts', __( 'Footnotes in excerpts', 'footnotes' ), 'excerpts' );
- $meta_boxes[] = $this->add_meta_box( 'settings', 'love', Footnotes_Config::PLUGIN_HEADING_NAME . ' ' . Footnotes_Config::LOVE_SYMBOL_HEADING, 'love' );
+ $l_arr_meta_boxes[] = $this->add_meta_box( 'settings', 'amp-compat', __( 'AMP compatibility', 'footnotes' ), 'amp_compat' );
+ $l_arr_meta_boxes[] = $this->add_meta_box( 'settings', 'start-end', __( 'Footnote start and end short codes', 'footnotes' ), 'start_end' );
+ $l_arr_meta_boxes[] = $this->add_meta_box( 'settings', 'numbering', __( 'Footnotes numbering', 'footnotes' ), 'numbering' );
+ $l_arr_meta_boxes[] = $this->add_meta_box( 'settings', 'scrolling', __( 'Scrolling behavior', 'footnotes' ), 'scrolling' );
+ $l_arr_meta_boxes[] = $this->add_meta_box( 'settings', 'hard-links', __( 'URL fragment ID configuration', 'footnotes' ), 'hard_links' );
+ $l_arr_meta_boxes[] = $this->add_meta_box( 'settings', 'reference-container', __( 'Reference container', 'footnotes' ), 'reference_container' );
+ $l_arr_meta_boxes[] = $this->add_meta_box( 'settings', 'excerpts', __( 'Footnotes in excerpts', 'footnotes' ), 'excerpts' );
+ $l_arr_meta_boxes[] = $this->add_meta_box( 'settings', 'love', MCI_Footnotes_Config::C_STR_PLUGIN_HEADING_NAME . ' ' . MCI_Footnotes_Config::C_STR_LOVE_SYMBOL_HEADING, 'love' );
- $meta_boxes[] = $this->add_meta_box( 'customize', 'hyperlink-arrow', __( 'Backlink symbol', 'footnotes' ), 'hyperlink_arrow' );
- $meta_boxes[] = $this->add_meta_box( 'customize', 'superscript', __( 'Referrers', 'footnotes' ), 'superscript' );
- $meta_boxes[] = $this->add_meta_box( 'customize', 'label-solution', __( 'Referrers in labels', 'footnotes' ), 'label_solution' );
- $meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box', __( 'Tooltips', 'footnotes' ), 'mouseover_box' );
- $meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box-position', __( 'Tooltip position', 'footnotes' ), 'mouseover_box_position' );
- $meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box-dimensions', __( 'Tooltip dimensions', 'footnotes' ), 'mouseover_box_dimensions' );
- $meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box-timing', __( 'Tooltip timing', 'footnotes' ), 'mouseover_box_timing' );
- $meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box-truncation', __( 'Tooltip truncation', 'footnotes' ), 'mouseover_box_truncation' );
- $meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box-text', __( 'Tooltip text', 'footnotes' ), 'mouseover_box_text' );
- $meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box-appearance', __( 'Tooltip appearance', 'footnotes' ), 'mouseover_box_appearance' );
- if ( Footnotes_Convert::to_bool( Footnotes_Settings::instance()->get( Footnotes_Settings::CUSTOM_CSS_LEGACY_ENABLE ) ) ) {
- $meta_boxes[] = $this->add_meta_box( 'customize', 'custom-css', __( 'Your existing Custom CSS code', 'footnotes' ), 'custom_css' );
+ $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'hyperlink-arrow', __( 'Backlink symbol', 'footnotes' ), 'hyperlink_arrow' );
+ $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'superscript', __( 'Referrers', 'footnotes' ), 'superscript' );
+ $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'label-solution', __( 'Referrers in labels', 'footnotes' ), 'label_solution' );
+ $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box', __( 'Tooltips', 'footnotes' ), 'mouseover_box' );
+ $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box-position', __( 'Tooltip position', 'footnotes' ), 'mouseover_box_position' );
+ $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box-dimensions', __( 'Tooltip dimensions', 'footnotes' ), 'mouseover_box_dimensions' );
+ $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box-timing', __( 'Tooltip timing', 'footnotes' ), 'mouseover_box_timing' );
+ $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box-truncation', __( 'Tooltip truncation', 'footnotes' ), 'mouseover_box_truncation' );
+ $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box-text', __( 'Tooltip text', 'footnotes' ), 'mouseover_box_text' );
+ $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box-appearance', __( 'Tooltip appearance', 'footnotes' ), 'mouseover_box_appearance' );
+ if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS_LEGACY_ENABLE ) ) ) {
+ $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'custom-css', __( 'Your existing Custom CSS code', 'footnotes' ), 'custom_css' );
}
- $meta_boxes[] = $this->add_meta_box( 'expert', 'lookup', __( 'WordPress hooks with priority level', 'footnotes' ), 'lookup_hooks' );
+ $l_arr_meta_boxes[] = $this->add_meta_box( 'expert', 'lookup', __( 'WordPress hooks with priority level', 'footnotes' ), 'lookup_hooks' );
- if ( Footnotes_Convert::to_bool( Footnotes_Settings::instance()->get( Footnotes_Settings::CUSTOM_CSS_LEGACY_ENABLE ) ) ) {
- $meta_boxes[] = $this->add_meta_box( 'customcss', 'custom-css-migration', __( 'Your existing Custom CSS code', 'footnotes' ), 'custom_css_migration' );
+ if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS_LEGACY_ENABLE ) ) ) {
+ $l_arr_meta_boxes[] = $this->add_meta_box( 'customcss', 'custom-css-migration', __( 'Your existing Custom CSS code', 'footnotes' ), 'custom_css_migration' );
}
- $meta_boxes[] = $this->add_meta_box( 'customcss', 'custom-css-new', __( 'Custom CSS', 'footnotes' ), 'custom_css_new' );
+ $l_arr_meta_boxes[] = $this->add_meta_box( 'customcss', 'custom-css-new', __( 'Custom CSS', 'footnotes' ), 'custom_css_new' );
- $meta_boxes[] = $this->add_meta_box( 'how-to', 'help', __( 'Brief introduction: How to use the plugin', 'footnotes' ), 'help' );
- $meta_boxes[] = $this->add_meta_box( 'how-to', 'donate', __( 'Help us to improve our Plugin', 'footnotes' ), 'donate' );
+ $l_arr_meta_boxes[] = $this->add_meta_box( 'how-to', 'help', __( 'Brief introduction: How to use the plugin', 'footnotes' ), 'help' );
+ $l_arr_meta_boxes[] = $this->add_meta_box( 'how-to', 'donate', __( 'Help us to improve our Plugin', 'footnotes' ), 'donate' );
- return $meta_boxes;
+ return $l_arr_meta_boxes;
}
/**
@@ -174,22 +174,22 @@ class Footnotes_Layout_Settings extends Footnotes_Layout_Engine {
public function amp_compat() {
// Load template file.
- $template = new Footnotes_Template( Footnotes_Template::DASHBOARD, 'settings-amp' );
+ $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'settings-amp' );
// Replace all placeholders.
- $template->replace(
+ $l_obj_template->replace(
array(
// Translators: '%s' is the link text 'AMP-WP' linked to the plugin's front page on WordPress.org.
'description-1-amp' => sprintf( __( 'The official %s plugin is required when this option is enabled.', 'footnotes' ), 'AMP-WP' ),
- 'label-amp' => $this->add_label( Footnotes_Settings::FOOTNOTES_AMP_COMPATIBILITY_ENABLE, __( 'Enable AMP compatibility mode:', 'footnotes' ) ),
- 'amp' => $this->add_checkbox( Footnotes_Settings::FOOTNOTES_AMP_COMPATIBILITY_ENABLE ),
+ 'label-amp' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_AMP_COMPATIBILITY_ENABLE, __( 'Enable AMP compatibility mode:', 'footnotes' ) ),
+ 'amp' => $this->add_checkbox( MCI_Footnotes_Settings::C_STR_FOOTNOTES_AMP_COMPATIBILITY_ENABLE ),
'notice-amp' => __( 'This option enables hard links with configurable scroll offset in % viewport height.', 'footnotes' ),
// Translators: '%s' is the logogram of the 'Footnotes' plugin.
- 'description-2-amp' => sprintf( __( '%s is becoming AMP compatible when this box is checked. Styled tooltips are displayed with fade-in/fade-out effect if enabled, and the reference container expands also on clicking a referrer if it\'s collapsed by default.', 'footnotes' ), '' . Footnotes_Config::PLUGIN_PUBLIC_NAME . '' ),
+ 'description-2-amp' => sprintf( __( '%s is becoming AMP compatible when this box is checked. Styled tooltips are displayed with fade-in/fade-out effect if enabled, and the reference container expands also on clicking a referrer if it\'s collapsed by default.', 'footnotes' ), '' . MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME . '' ),
)
);
// Display template with replaced placeholders.
// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
- echo $template->get_content();
+ echo $l_obj_template->get_content();
// phpcs:enable
}
@@ -206,7 +206,7 @@ class Footnotes_Layout_Settings extends Footnotes_Layout_Engine {
public function reference_container() {
// Options for the label element.
- $label_element = array(
+ $l_arr_label_element = array(
'p' => __( 'paragraph', 'footnotes' ),
'h2' => __( 'heading 2', 'footnotes' ),
'h3' => __( 'heading 3', 'footnotes' ),
@@ -215,20 +215,20 @@ class Footnotes_Layout_Settings extends Footnotes_Layout_Engine {
'h6' => __( 'heading 6', 'footnotes' ),
);
// Options for the positioning of the reference container.
- $positions = array(
+ $l_arr_positions = array(
'post_end' => __( 'at the end of the post', 'footnotes' ),
'widget' => __( 'in the widget area', 'footnotes' ),
'footer' => __( 'in the footer', 'footnotes' ),
);
// Basic responsive page layout options.
- $page_layout_options = array(
+ $l_arr_page_layout_options = array(
'none' => __( 'No', 'footnotes' ),
'reference-container' => __( 'to the reference container exclusively', 'footnotes' ),
'entry-content' => __( 'to the div element starting below the post title', 'footnotes' ),
'main-content' => __( 'to the main element including the post title', 'footnotes' ),
);
// Options for the separating punctuation between backlinks.
- $separators = array(
+ $l_arr_separators = array(
// Unicode character names are conventionally uppercase.
'comma' => __( 'COMMA', 'footnotes' ),
'semicolon' => __( 'SEMICOLON', 'footnotes' ),
@@ -238,14 +238,14 @@ class Footnotes_Layout_Settings extends Footnotes_Layout_Engine {
// The Unicode name of RIGHT PARENTHESIS was originally more accurate because.
// This character is bidi-mirrored. Let's use the Unicode 1.0 name.
// The wrong names were enforced in spite of Unicode, that subsequently scrambled to correct.
- $terminators = array(
+ $l_arr_terminators = array(
'period' => __( 'FULL STOP', 'footnotes' ),
// Unicode 1.0 name of RIGHT PARENTHESIS (represented as a left parenthesis in right-to-left scripts).
'parenthesis' => __( 'CLOSING PARENTHESIS', 'footnotes' ),
'colon' => __( 'COLON', 'footnotes' ),
);
// Options for the first column width (per cent is a ratio, not a unit).
- $width_units = array(
+ $l_arr_width_units = array(
'%' => __( 'per cent', 'footnotes' ),
'px' => __( 'pixels', 'footnotes' ),
'rem' => __( 'root em', 'footnotes' ),
@@ -253,120 +253,120 @@ class Footnotes_Layout_Settings extends Footnotes_Layout_Engine {
'vw' => __( 'viewport width', 'footnotes' ),
);
// Options for reference container script mode.
- $script_mode = array(
+ $l_arr_script_mode = array(
'jquery' => __( 'jQuery', 'footnotes' ),
'js' => __( 'plain JavaScript', 'footnotes' ),
);
// Options for Yes/No select box.
- $enabled = array(
+ $l_arr_enabled = array(
'yes' => __( 'Yes', 'footnotes' ),
'no' => __( 'No', 'footnotes' ),
);
// Load template file.
- $template = new Footnotes_Template( Footnotes_Template::DASHBOARD, 'settings-reference-container' );
+ $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'settings-reference-container' );
// Replace all placeholders.
- $template->replace(
+ $l_obj_template->replace(
array(
- 'label-name' => $this->add_label( Footnotes_Settings::REFERENCE_CONTAINER_NAME, __( 'Heading:', 'footnotes' ) ),
- 'name' => $this->add_text_box( Footnotes_Settings::REFERENCE_CONTAINER_NAME ),
+ 'label-name' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME, __( 'Heading:', 'footnotes' ) ),
+ 'name' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME ),
- 'label-element' => $this->add_label( Footnotes_Settings::REFERENCE_CONTAINER_LABEL_ELEMENT, __( 'Heading\'s HTML element:', 'footnotes' ) ),
- 'element' => $this->add_select_box( Footnotes_Settings::REFERENCE_CONTAINER_LABEL_ELEMENT, $label_element ),
+ 'label-element' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT, __( 'Heading\'s HTML element:', 'footnotes' ) ),
+ 'element' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT, $l_arr_label_element ),
- 'label-border' => $this->add_label( Footnotes_Settings::REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER, __( 'Border under the heading:', 'footnotes' ) ),
- 'border' => $this->add_select_box( Footnotes_Settings::REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER, $enabled ),
+ 'label-border' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER, __( 'Border under the heading:', 'footnotes' ) ),
+ 'border' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER, $l_arr_enabled ),
- 'label-collapse' => $this->add_label( Footnotes_Settings::REFERENCE_CONTAINER_COLLAPSE, __( 'Collapse by default:', 'footnotes' ) ),
- 'collapse' => $this->add_select_box( Footnotes_Settings::REFERENCE_CONTAINER_COLLAPSE, $enabled ),
+ 'label-collapse' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_COLLAPSE, __( 'Collapse by default:', 'footnotes' ) ),
+ 'collapse' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_COLLAPSE, $l_arr_enabled ),
- 'label-script' => $this->add_label( Footnotes_Settings::FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE, __( 'Script mode:', 'footnotes' ) ),
- 'script' => $this->add_select_box( Footnotes_Settings::FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE, $script_mode ),
+ 'label-script' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE, __( 'Script mode:', 'footnotes' ) ),
+ 'script' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE, $l_arr_script_mode ),
'notice-script' => __( 'The plain JavaScript mode will enable hard links with configurable scroll offset.', 'footnotes' ),
- 'label-position' => $this->add_label( Footnotes_Settings::REFERENCE_CONTAINER_POSITION, __( 'Default position:', 'footnotes' ) ),
- 'position' => $this->add_select_box( Footnotes_Settings::REFERENCE_CONTAINER_POSITION, $positions ),
+ 'label-position' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION, __( 'Default position:', 'footnotes' ) ),
+ 'position' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION, $l_arr_positions ),
// Translators: %s: at the end of the post.
'notice-position' => sprintf( __( 'To use the position or section shortcode, please set the position to: %s', 'footnotes' ), '' . __( 'at the end of the post', 'footnotes' ) . '' ),
- 'label-shortcode' => $this->add_label( Footnotes_Settings::REFERENCE_CONTAINER_POSITION_SHORTCODE, __( 'Position shortcode:', 'footnotes' ) ),
- 'shortcode' => $this->add_text_box( Footnotes_Settings::REFERENCE_CONTAINER_POSITION_SHORTCODE ),
+ 'label-shortcode' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE, __( 'Position shortcode:', 'footnotes' ) ),
+ 'shortcode' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE ),
'notice-shortcode' => __( 'If present in the content, any shortcode in this text box will be replaced with the reference container.', 'footnotes' ),
- 'label-section' => $this->add_label( Footnotes_Settings::FOOTNOTE_SECTION_SHORTCODE, __( 'Footnote section shortcode:', 'footnotes' ) ),
- 'section' => $this->add_text_box( Footnotes_Settings::FOOTNOTE_SECTION_SHORTCODE ),
+ 'label-section' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTE_SECTION_SHORTCODE, __( 'Footnote section shortcode:', 'footnotes' ) ),
+ 'section' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTE_SECTION_SHORTCODE ),
'notice-section' => __( 'If present in the content, any shortcode in this text box will delimit a section terminated by a reference container.', 'footnotes' ),
- 'label-startpage' => $this->add_label( Footnotes_Settings::REFERENCE_CONTAINER_START_PAGE_ENABLE, __( 'Display on start page too:', 'footnotes' ) ),
- 'startpage' => $this->add_select_box( Footnotes_Settings::REFERENCE_CONTAINER_START_PAGE_ENABLE, $enabled ),
+ 'label-startpage' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_START_PAGE_ENABLE, __( 'Display on start page too:', 'footnotes' ) ),
+ 'startpage' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_START_PAGE_ENABLE, $l_arr_enabled ),
- 'label-margin-top' => $this->add_label( Footnotes_Settings::REFERENCE_CONTAINER_TOP_MARGIN, __( 'Top margin:', 'footnotes' ) ),
- 'margin-top' => $this->add_num_box( Footnotes_Settings::REFERENCE_CONTAINER_TOP_MARGIN, -500, 500 ),
+ 'label-margin-top' => $this->add_label( MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_TOP_MARGIN, __( 'Top margin:', 'footnotes' ) ),
+ 'margin-top' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_TOP_MARGIN, -500, 500 ),
'notice-margin-top' => __( 'pixels; may be negative', 'footnotes' ),
- 'label-margin-bottom' => $this->add_label( Footnotes_Settings::REFERENCE_CONTAINER_BOTTOM_MARGIN, __( 'Bottom margin:', 'footnotes' ) ),
- 'margin-bottom' => $this->add_num_box( Footnotes_Settings::REFERENCE_CONTAINER_BOTTOM_MARGIN, -500, 500 ),
+ 'label-margin-bottom' => $this->add_label( MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN, __( 'Bottom margin:', 'footnotes' ) ),
+ 'margin-bottom' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN, -500, 500 ),
'notice-margin-bottom' => __( 'pixels; may be negative', 'footnotes' ),
- 'label-page-layout' => $this->add_label( Footnotes_Settings::FOOTNOTES_PAGE_LAYOUT_SUPPORT, __( 'Apply basic responsive page layout:', 'footnotes' ) ),
- 'page-layout' => $this->add_select_box( Footnotes_Settings::FOOTNOTES_PAGE_LAYOUT_SUPPORT, $page_layout_options ),
+ 'label-page-layout' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT, __( 'Apply basic responsive page layout:', 'footnotes' ) ),
+ 'page-layout' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT, $l_arr_page_layout_options ),
'notice-page-layout' => __( 'Most themes don\'t need this fix.', 'footnotes' ),
- 'label-url-wrap' => $this->add_label( Footnotes_Settings::FOOTNOTE_URL_WRAP_ENABLED, __( 'Allow URLs to line-wrap anywhere:', 'footnotes' ) ),
- 'url-wrap' => $this->add_select_box( Footnotes_Settings::FOOTNOTE_URL_WRAP_ENABLED, $enabled ),
+ 'label-url-wrap' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTE_URL_WRAP_ENABLED, __( 'Allow URLs to line-wrap anywhere:', 'footnotes' ) ),
+ 'url-wrap' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTE_URL_WRAP_ENABLED, $l_arr_enabled ),
'notice-url-wrap' => __( 'Unicode-conformant browsers don\'t need this fix.', 'footnotes' ),
- 'label-symbol' => $this->add_label( Footnotes_Settings::REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE, __( 'Display a backlink symbol:', 'footnotes' ) ),
- 'symbol-enable' => $this->add_select_box( Footnotes_Settings::REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE, $enabled ),
+ 'label-symbol' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE, __( 'Display a backlink symbol:', 'footnotes' ) ),
+ 'symbol-enable' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE, $l_arr_enabled ),
'notice-symbol' => __( 'Please choose or input the symbol at the top of the next dashboard tab.', 'footnotes' ),
- 'label-switch' => $this->add_label( Footnotes_Settings::REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH, __( 'Symbol appended, not prepended:', 'footnotes' ) ),
- 'switch' => $this->add_select_box( Footnotes_Settings::REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH, $enabled ),
+ 'label-switch' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH, __( 'Symbol appended, not prepended:', 'footnotes' ) ),
+ 'switch' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH, $l_arr_enabled ),
- 'label-3column' => $this->add_label( Footnotes_Settings::REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE, __( 'Backlink symbol in an extra column:', 'footnotes' ) ),
- '3column' => $this->add_select_box( Footnotes_Settings::REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE, $enabled ),
+ 'label-3column' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE, __( 'Backlink symbol in an extra column:', 'footnotes' ) ),
+ '3column' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE, $l_arr_enabled ),
'notice-3column' => __( 'This legacy layout is available if identical footnotes are not combined.', 'footnotes' ),
- 'label-row-borders' => $this->add_label( Footnotes_Settings::REFERENCE_CONTAINER_ROW_BORDERS_ENABLE, __( 'Borders around the table rows:', 'footnotes' ) ),
- 'row-borders' => $this->add_select_box( Footnotes_Settings::REFERENCE_CONTAINER_ROW_BORDERS_ENABLE, $enabled ),
+ 'label-row-borders' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE, __( 'Borders around the table rows:', 'footnotes' ) ),
+ 'row-borders' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE, $l_arr_enabled ),
- 'label-separator' => $this->add_label( Footnotes_Settings::BACKLINKS_SEPARATOR_ENABLED, __( 'Add a separator when enumerating backlinks:', 'footnotes' ) ),
- 'separator-enable' => $this->add_select_box( Footnotes_Settings::BACKLINKS_SEPARATOR_ENABLED, $enabled ),
- 'separator-options' => $this->add_select_box( Footnotes_Settings::BACKLINKS_SEPARATOR_OPTION, $separators ),
- 'separator-custom' => $this->add_text_box( Footnotes_Settings::BACKLINKS_SEPARATOR_CUSTOM ),
+ 'label-separator' => $this->add_label( MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_ENABLED, __( 'Add a separator when enumerating backlinks:', 'footnotes' ) ),
+ 'separator-enable' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_ENABLED, $l_arr_enabled ),
+ 'separator-options' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_OPTION, $l_arr_separators ),
+ 'separator-custom' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_CUSTOM ),
'notice-separator' => __( 'Your input overrides the selection.', 'footnotes' ),
- 'label-terminator' => $this->add_label( Footnotes_Settings::BACKLINKS_TERMINATOR_ENABLED, __( 'Add a terminal punctuation to backlinks:', 'footnotes' ) ),
- 'terminator-enable' => $this->add_select_box( Footnotes_Settings::BACKLINKS_TERMINATOR_ENABLED, $enabled ),
- 'terminator-options' => $this->add_select_box( Footnotes_Settings::BACKLINKS_TERMINATOR_OPTION, $terminators ),
- 'terminator-custom' => $this->add_text_box( Footnotes_Settings::BACKLINKS_TERMINATOR_CUSTOM ),
+ 'label-terminator' => $this->add_label( MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_ENABLED, __( 'Add a terminal punctuation to backlinks:', 'footnotes' ) ),
+ 'terminator-enable' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_ENABLED, $l_arr_enabled ),
+ 'terminator-options' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_OPTION, $l_arr_terminators ),
+ 'terminator-custom' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_CUSTOM ),
'notice-terminator' => __( 'Your input overrides the selection.', 'footnotes' ),
- 'label-width' => $this->add_label( Footnotes_Settings::BACKLINKS_COLUMN_WIDTH_ENABLED, __( 'Set backlinks column width:', 'footnotes' ) ),
- 'width-enable' => $this->add_select_box( Footnotes_Settings::BACKLINKS_COLUMN_WIDTH_ENABLED, $enabled ),
- 'width-scalar' => $this->add_num_box( Footnotes_Settings::BACKLINKS_COLUMN_WIDTH_SCALAR, 0, 500, true ),
- 'width-unit' => $this->add_select_box( Footnotes_Settings::BACKLINKS_COLUMN_WIDTH_UNIT, $width_units ),
+ 'label-width' => $this->add_label( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_WIDTH_ENABLED, __( 'Set backlinks column width:', 'footnotes' ) ),
+ 'width-enable' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_WIDTH_ENABLED, $l_arr_enabled ),
+ 'width-scalar' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR, 0, 500, true ),
+ 'width-unit' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_WIDTH_UNIT, $l_arr_width_units ),
'notice-width' => __( 'Absolute width in pixels doesn\'t need to be accurate to the tenth, but relative width in rem or em may.', 'footnotes' ),
- 'label-max-width' => $this->add_label( Footnotes_Settings::BACKLINKS_COLUMN_MAX_WIDTH_ENABLED, __( 'Set backlinks column maximum width:', 'footnotes' ) ),
- 'max-width-enable' => $this->add_select_box( Footnotes_Settings::BACKLINKS_COLUMN_MAX_WIDTH_ENABLED, $enabled ),
- 'max-width-scalar' => $this->add_num_box( Footnotes_Settings::BACKLINKS_COLUMN_MAX_WIDTH_SCALAR, 0, 500, true ),
- 'max-width-unit' => $this->add_select_box( Footnotes_Settings::BACKLINKS_COLUMN_MAX_WIDTH_UNIT, $width_units ),
+ 'label-max-width' => $this->add_label( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED, __( 'Set backlinks column maximum width:', 'footnotes' ) ),
+ 'max-width-enable' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED, $l_arr_enabled ),
+ 'max-width-scalar' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR, 0, 500, true ),
+ 'max-width-unit' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT, $l_arr_width_units ),
'notice-max-width' => __( 'Absolute width in pixels doesn\'t need to be accurate to the tenth, but relative width in rem or em may.', 'footnotes' ),
- 'label-line-break' => $this->add_label( Footnotes_Settings::BACKLINKS_LINE_BREAKS_ENABLED, __( 'Stack backlinks when enumerating:', 'footnotes' ) ),
- 'line-break' => $this->add_select_box( Footnotes_Settings::BACKLINKS_LINE_BREAKS_ENABLED, $enabled ),
+ 'label-line-break' => $this->add_label( MCI_Footnotes_Settings::C_STR_BACKLINKS_LINE_BREAKS_ENABLED, __( 'Stack backlinks when enumerating:', 'footnotes' ) ),
+ 'line-break' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_LINE_BREAKS_ENABLED, $l_arr_enabled ),
'notice-line-break' => __( 'This option adds a line break before each added backlink when identical footnotes are combined.', 'footnotes' ),
- 'label-link' => $this->add_label( Footnotes_Settings::LINK_ELEMENT_ENABLED, __( 'Use the link element for referrers and backlinks:', 'footnotes' ) ),
- 'link' => $this->add_select_box( Footnotes_Settings::LINK_ELEMENT_ENABLED, $enabled ),
+ 'label-link' => $this->add_label( MCI_Footnotes_Settings::C_STR_LINK_ELEMENT_ENABLED, __( 'Use the link element for referrers and backlinks:', 'footnotes' ) ),
+ 'link' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_LINK_ELEMENT_ENABLED, $l_arr_enabled ),
'notice-link' => __( 'The link element is needed to apply the theme\'s link color.', 'footnotes' ),
'description-link' => __( 'If the link element is not desired for styling, a simple span is used instead when the above is set to No.', 'footnotes' ),
)
);
// Display template with replaced placeholders.
// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
- echo $template->get_content();
+ echo $l_obj_template->get_content();
// phpcs:enable
}
@@ -388,7 +388,7 @@ class Footnotes_Layout_Settings extends Footnotes_Layout_Engine {
*/
public function start_end() {
// Footnotes start tag short code options.
- $shortcode_start = array(
+ $l_arr_shortcode_start = array(
'((' => '((',
'(((' => '(((',
'{{' => '{{',
@@ -402,7 +402,7 @@ class Footnotes_Layout_Settings extends Footnotes_Layout_Engine {
'userdefined' => __( 'custom short code', 'footnotes' ),
);
// Footnotes end tag short code options.
- $shortcode_end = array(
+ $l_arr_shortcode_end = array(
'))' => '))',
')))' => ')))',
'}}' => '}}',
@@ -416,37 +416,37 @@ class Footnotes_Layout_Settings extends Footnotes_Layout_Engine {
'userdefined' => __( 'custom short code', 'footnotes' ),
);
// Options for the syntax validation.
- $enable = array(
+ $l_arr_enable = array(
'yes' => __( 'Yes', 'footnotes' ),
'no' => __( 'No', 'footnotes' ),
);
// Load template file.
- $template = new Footnotes_Template( Footnotes_Template::DASHBOARD, 'settings-start-end' );
+ $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'settings-start-end' );
// Replace all placeholders.
- $template->replace(
+ $l_obj_template->replace(
array(
'description-escapement' => __( 'When delimiters with pointy brackets are used, the diverging escapement schemas will be unified before footnotes are processed.', 'footnotes' ),
- 'label-short-code-start' => $this->add_label( Footnotes_Settings::FOOTNOTES_SHORT_CODE_START, __( 'Footnote start tag short code:', 'footnotes' ) ),
- 'short-code-start' => $this->add_select_box( Footnotes_Settings::FOOTNOTES_SHORT_CODE_START, $shortcode_start ),
- 'short-code-start-user' => $this->add_text_box( Footnotes_Settings::FOOTNOTES_SHORT_CODE_START_USER_DEFINED ),
+ 'label-short-code-start' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, __( 'Footnote start tag short code:', 'footnotes' ) ),
+ 'short-code-start' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, $l_arr_shortcode_start ),
+ 'short-code-start-user' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED ),
- 'label-short-code-end' => $this->add_label( Footnotes_Settings::FOOTNOTES_SHORT_CODE_END, __( 'Footnote end tag short code:', 'footnotes' ) ),
- 'short-code-end' => $this->add_select_box( Footnotes_Settings::FOOTNOTES_SHORT_CODE_END, $shortcode_end ),
- 'short-code-end-user' => $this->add_text_box( Footnotes_Settings::FOOTNOTES_SHORT_CODE_END_USER_DEFINED ),
+ 'label-short-code-end' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, __( 'Footnote end tag short code:', 'footnotes' ) ),
+ 'short-code-end' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, $l_arr_shortcode_end ),
+ 'short-code-end-user' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED ),
// For script showing/hiding user defined text boxes.
- 'short-code-start-id' => Footnotes_Settings::FOOTNOTES_SHORT_CODE_START,
- 'short-code-end-id' => Footnotes_Settings::FOOTNOTES_SHORT_CODE_END,
- 'short-code-start-user-id' => Footnotes_Settings::FOOTNOTES_SHORT_CODE_START_USER_DEFINED,
- 'short-code-end-user-id' => Footnotes_Settings::FOOTNOTES_SHORT_CODE_END_USER_DEFINED,
+ 'short-code-start-id' => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START,
+ 'short-code-end-id' => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END,
+ 'short-code-start-user-id' => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED,
+ 'short-code-end-user-id' => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED,
'description-parentheses' => __( 'WARNING: Although widespread industry standard, the double parentheses are problematic because they may occur in scripts embedded in the content and be mistaken as a short code.', 'footnotes' ),
// Option to enable syntax validation, label mirrored in task.php.
- 'label-syntax' => $this->add_label( Footnotes_Settings::FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE, __( 'Check for balanced shortcodes:', 'footnotes' ) ),
- 'syntax' => $this->add_select_box( Footnotes_Settings::FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE, $enable ),
+ 'label-syntax' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE, __( 'Check for balanced shortcodes:', 'footnotes' ) ),
+ 'syntax' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE, $l_arr_enable ),
'notice-syntax' => __( 'In the presence of a lone start tag shortcode, a warning displays below the post title.', 'footnotes' ),
'description-syntax' => __( 'If the start tag short code is \'((\' or \'(((\', it will not be reported as unbalanced if the following string contains braces hinting that it is a script.', 'footnotes' ),
@@ -454,7 +454,7 @@ class Footnotes_Layout_Settings extends Footnotes_Layout_Engine {
);
// Display template with replaced placeholders.
// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
- echo $template->get_content();
+ echo $l_obj_template->get_content();
// phpcs:enable
}
@@ -465,33 +465,33 @@ class Footnotes_Layout_Settings extends Footnotes_Layout_Engine {
*/
public function numbering() {
// Define some space for the output.
- $space = ' ';
+ $l_str_space = ' ';
// Options for the combination of identical footnotes.
- $enable = array(
+ $l_arr_enable = array(
'yes' => __( 'Yes', 'footnotes' ),
'no' => __( 'No', 'footnotes' ),
);
// Options for the numbering style of the footnotes.
- $counter_style = array(
- 'arabic_plain' => __( 'plain Arabic numbers', 'footnotes' ) . $space . '1, 2, 3, 4, 5, …',
- 'arabic_leading' => __( 'zero-padded Arabic numbers', 'footnotes' ) . $space . '01, 02, 03, 04, 05, …',
- 'latin_low' => __( 'lowercase Latin letters', 'footnotes' ) . $space . 'a, b, c, d, e, …',
- 'latin_high' => __( 'uppercase Latin letters', 'footnotes' ) . $space . 'A, B, C, D, E, …',
- 'romanic' => __( 'uppercase Roman numerals', 'footnotes' ) . $space . 'I, II, III, IV, V, …',
- 'roman_low' => __( 'lowercase Roman numerals', 'footnotes' ) . $space . 'i, ii, iii, iv, v, …',
+ $l_arr_counter_style = array(
+ 'arabic_plain' => __( 'plain Arabic numbers', 'footnotes' ) . $l_str_space . '1, 2, 3, 4, 5, …',
+ 'arabic_leading' => __( 'zero-padded Arabic numbers', 'footnotes' ) . $l_str_space . '01, 02, 03, 04, 05, …',
+ 'latin_low' => __( 'lowercase Latin letters', 'footnotes' ) . $l_str_space . 'a, b, c, d, e, …',
+ 'latin_high' => __( 'uppercase Latin letters', 'footnotes' ) . $l_str_space . 'A, B, C, D, E, …',
+ 'romanic' => __( 'uppercase Roman numerals', 'footnotes' ) . $l_str_space . 'I, II, III, IV, V, …',
+ 'roman_low' => __( 'lowercase Roman numerals', 'footnotes' ) . $l_str_space . 'i, ii, iii, iv, v, …',
);
// Load template file.
- $template = new Footnotes_Template( Footnotes_Template::DASHBOARD, 'settings-numbering' );
+ $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'settings-numbering' );
// Replace all placeholders.
- $template->replace(
+ $l_obj_template->replace(
array(
- 'label-counter-style' => $this->add_label( Footnotes_Settings::FOOTNOTES_COUNTER_STYLE, __( 'Numbering style:', 'footnotes' ) ),
- 'counter-style' => $this->add_select_box( Footnotes_Settings::FOOTNOTES_COUNTER_STYLE, $counter_style ),
+ 'label-counter-style' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE, __( 'Numbering style:', 'footnotes' ) ),
+ 'counter-style' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE, $l_arr_counter_style ),
// Algorithmically combine identicals.
- 'label-identical' => $this->add_label( Footnotes_Settings::COMBINE_IDENTICAL_FOOTNOTES, __( 'Combine identical footnotes:', 'footnotes' ) ),
- 'identical' => $this->add_select_box( Footnotes_Settings::COMBINE_IDENTICAL_FOOTNOTES, $enable ),
+ 'label-identical' => $this->add_label( MCI_Footnotes_Settings::C_STR_COMBINE_IDENTICAL_FOOTNOTES, __( 'Combine identical footnotes:', 'footnotes' ) ),
+ 'identical' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_COMBINE_IDENTICAL_FOOTNOTES, $l_arr_enable ),
'notice-identical' => __( 'This option may require copy-pasting footnotes in multiple instances.', 'footnotes' ),
// Support for Ibid. notation added thanks to @meglio in .
'description-identical' => __( 'Even when footnotes are combined, footnote numbers keep incrementing. This avoids suboptimal referrer and backlink disambiguation using a secondary numbering system. The Ibid. notation and the op. cit. abbreviation followed by the current page number avoid repeating the footnote content. For changing sources, shortened citations may be used. Repeating full citations is also an opportunity to add details.', 'footnotes' ),
@@ -499,7 +499,7 @@ class Footnotes_Layout_Settings extends Footnotes_Layout_Engine {
);
// Display template with replaced placeholders.
// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
- echo $template->get_content();
+ echo $l_obj_template->get_content();
// phpcs:enable
}
@@ -511,51 +511,51 @@ class Footnotes_Layout_Settings extends Footnotes_Layout_Engine {
public function scrolling() {
// Options for enabling scroll duration asymmetricity.
- $enable = array(
+ $l_arr_enable = array(
'yes' => __( 'Yes', 'footnotes' ),
'no' => __( 'No', 'footnotes' ),
);
// Load template file.
- $template = new Footnotes_Template( Footnotes_Template::DASHBOARD, 'settings-scrolling' );
+ $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'settings-scrolling' );
// Replace all placeholders.
- $template->replace(
+ $l_obj_template->replace(
array(
- 'label-scroll-css' => $this->add_label( Footnotes_Settings::FOOTNOTES_CSS_SMOOTH_SCROLLING, __( 'CSS-based smooth scrolling:', 'footnotes' ) ),
- 'scroll-css' => $this->add_select_box( Footnotes_Settings::FOOTNOTES_CSS_SMOOTH_SCROLLING, $enable ),
+ 'label-scroll-css' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_CSS_SMOOTH_SCROLLING, __( 'CSS-based smooth scrolling:', 'footnotes' ) ),
+ 'scroll-css' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_CSS_SMOOTH_SCROLLING, $l_arr_enable ),
'notice-scroll-css' => __( 'May slightly disturb jQuery scrolling and is therefore disabled by default. Works in recent browsers.', 'footnotes' ),
- 'label-scroll-offset' => $this->add_label( Footnotes_Settings::FOOTNOTES_SCROLL_OFFSET, __( 'Scroll offset:', 'footnotes' ) ),
- 'scroll-offset' => $this->add_num_box( Footnotes_Settings::FOOTNOTES_SCROLL_OFFSET, 0, 100 ),
+ 'label-scroll-offset' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET, __( 'Scroll offset:', 'footnotes' ) ),
+ 'scroll-offset' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET, 0, 100 ),
'notice-scroll-offset' => __( 'per cent viewport height from the upper edge', 'footnotes' ),
- 'label-scroll-duration' => $this->add_label( Footnotes_Settings::FOOTNOTES_SCROLL_DURATION, __( 'Scroll duration:', 'footnotes' ) ),
- 'scroll-duration' => $this->add_num_box( Footnotes_Settings::FOOTNOTES_SCROLL_DURATION, 0, 20000 ),
+ 'label-scroll-duration' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION, __( 'Scroll duration:', 'footnotes' ) ),
+ 'scroll-duration' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION, 0, 20000 ),
'notice-scroll-duration' => __( 'milliseconds. If asymmetric scroll durations are enabled, this is the scroll-up duration.', 'footnotes' ),
// Enable scroll duration asymmetricity.
- 'label-scroll-asymmetricity' => $this->add_label( Footnotes_Settings::FOOTNOTES_SCROLL_DURATION_ASYMMETRICITY, __( 'Enable asymmetric scroll durations:', 'footnotes' ) ),
- 'scroll-asymmetricity' => $this->add_select_box( Footnotes_Settings::FOOTNOTES_SCROLL_DURATION_ASYMMETRICITY, $enable ),
+ 'label-scroll-asymmetricity' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SCROLL_DURATION_ASYMMETRICITY, __( 'Enable asymmetric scroll durations:', 'footnotes' ) ),
+ 'scroll-asymmetricity' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SCROLL_DURATION_ASYMMETRICITY, $l_arr_enable ),
'notice-scroll-asymmetricity' => __( 'With this option enabled, scrolling up may take longer than down, or conversely.', 'footnotes' ),
- 'label-scroll-down-duration' => $this->add_label( Footnotes_Settings::FOOTNOTES_SCROLL_DOWN_DURATION, __( 'Scroll-down duration:', 'footnotes' ) ),
- 'scroll-down-duration' => $this->add_num_box( Footnotes_Settings::FOOTNOTES_SCROLL_DOWN_DURATION, 0, 20000 ),
+ 'label-scroll-down-duration' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DOWN_DURATION, __( 'Scroll-down duration:', 'footnotes' ) ),
+ 'scroll-down-duration' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DOWN_DURATION, 0, 20000 ),
'notice-scroll-down-duration' => __( 'milliseconds', 'footnotes' ),
- 'label-scroll-down-delay' => $this->add_label( Footnotes_Settings::FOOTNOTES_SCROLL_DOWN_DELAY, __( 'Scroll-down delay:', 'footnotes' ) ),
- 'scroll-down-delay' => $this->add_num_box( Footnotes_Settings::FOOTNOTES_SCROLL_DOWN_DELAY, 0, 20000 ),
+ 'label-scroll-down-delay' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DOWN_DELAY, __( 'Scroll-down delay:', 'footnotes' ) ),
+ 'scroll-down-delay' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DOWN_DELAY, 0, 20000 ),
'notice-scroll-down-delay' => __( 'milliseconds. Useful to see the effect on input elements when referrers without hard links are clicked in form labels.', 'footnotes' ),
- 'label-scroll-up-delay' => $this->add_label( Footnotes_Settings::FOOTNOTES_SCROLL_UP_DELAY, __( 'Scroll-up delay:', 'footnotes' ) ),
- 'scroll-up-delay' => $this->add_num_box( Footnotes_Settings::FOOTNOTES_SCROLL_UP_DELAY, 0, 20000 ),
+ 'label-scroll-up-delay' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_UP_DELAY, __( 'Scroll-up delay:', 'footnotes' ) ),
+ 'scroll-up-delay' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_UP_DELAY, 0, 20000 ),
'notice-scroll-up-delay' => __( 'milliseconds. Less useful than the scroll-down delay.', 'footnotes' ),
)
);
// Display template with replaced placeholders.
// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
- echo $template->get_content();
+ echo $l_obj_template->get_content();
// phpcs:enable
}
@@ -568,47 +568,47 @@ class Footnotes_Layout_Settings extends Footnotes_Layout_Engine {
public function hard_links() {
// Options for enabling hard links for AMP compat.
- $enable = array(
+ $l_arr_enable = array(
'yes' => __( 'Yes', 'footnotes' ),
'no' => __( 'No', 'footnotes' ),
);
// Load template file.
- $template = new Footnotes_Template( Footnotes_Template::DASHBOARD, 'settings-hard-links' );
+ $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'settings-hard-links' );
// Replace all placeholders.
- $template->replace(
+ $l_obj_template->replace(
array(
- 'label-hard-links' => $this->add_label( Footnotes_Settings::FOOTNOTES_HARD_LINKS_ENABLE, __( 'Enable hard links:', 'footnotes' ) ),
- 'hard-links' => $this->add_select_box( Footnotes_Settings::FOOTNOTES_HARD_LINKS_ENABLE, $enable ),
+ 'label-hard-links' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_HARD_LINKS_ENABLE, __( 'Enable hard links:', 'footnotes' ) ),
+ 'hard-links' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_HARD_LINKS_ENABLE, $l_arr_enable ),
'notice-hard-links' => __( 'Hard links disable jQuery delays but have the same scroll offset, and allow to share footnotes (accessed if the list is not collapsed by default).', 'footnotes' ),
- 'label-footnote' => $this->add_label( Footnotes_Settings::FOOTNOTE_FRAGMENT_ID_SLUG, __( 'Fragment identifier slug for footnotes:', 'footnotes' ) ),
- 'footnote' => $this->add_text_box( Footnotes_Settings::FOOTNOTE_FRAGMENT_ID_SLUG ),
+ 'label-footnote' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG, __( 'Fragment identifier slug for footnotes:', 'footnotes' ) ),
+ 'footnote' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG ),
'notice-footnote' => __( 'This will show up in the address bar after clicking on a hard-linked footnote referrer.', 'footnotes' ),
- 'label-referrer' => $this->add_label( Footnotes_Settings::REFERRER_FRAGMENT_ID_SLUG, __( 'Fragment identifier slug for footnote referrers:', 'footnotes' ) ),
- 'referrer' => $this->add_text_box( Footnotes_Settings::REFERRER_FRAGMENT_ID_SLUG ),
+ 'label-referrer' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERRER_FRAGMENT_ID_SLUG, __( 'Fragment identifier slug for footnote referrers:', 'footnotes' ) ),
+ 'referrer' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_REFERRER_FRAGMENT_ID_SLUG ),
'notice-referrer' => __( 'This will show up in the address bar after clicking on a hard-linked backlink.', 'footnotes' ),
- 'label-separator' => $this->add_label( Footnotes_Settings::HARD_LINK_IDS_SEPARATOR, __( 'ID separator:', 'footnotes' ) ),
- 'separator' => $this->add_text_box( Footnotes_Settings::HARD_LINK_IDS_SEPARATOR ),
+ 'label-separator' => $this->add_label( MCI_Footnotes_Settings::C_STR_HARD_LINK_IDS_SEPARATOR, __( 'ID separator:', 'footnotes' ) ),
+ 'separator' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_HARD_LINK_IDS_SEPARATOR ),
'notice-separator' => __( 'May be empty or any string, for example _, - or +, to distinguish post number, container number and footnote number.', 'footnotes' ),
// Enable backlink tooltips.
- 'label-backlink-tooltips' => $this->add_label( Footnotes_Settings::FOOTNOTES_BACKLINK_TOOLTIP_ENABLE, __( 'Enable backlink tooltips:', 'footnotes' ) ),
- 'backlink-tooltips' => $this->add_select_box( Footnotes_Settings::FOOTNOTES_BACKLINK_TOOLTIP_ENABLE, $enable ),
+ 'label-backlink-tooltips' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE, __( 'Enable backlink tooltips:', 'footnotes' ) ),
+ 'backlink-tooltips' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE, $l_arr_enable ),
'notice-backlink-tooltips' => __( 'Hard backlinks get ordinary tooltips hinting to use the backbutton instead to keep it usable.', 'footnotes' ),
- 'label-backlink-tooltip-text' => $this->add_label( Footnotes_Settings::FOOTNOTES_BACKLINK_TOOLTIP_TEXT, __( 'Backlink tooltip text:', 'footnotes' ) ),
- 'backlink-tooltip-text' => $this->add_text_box( Footnotes_Settings::FOOTNOTES_BACKLINK_TOOLTIP_TEXT ),
+ 'label-backlink-tooltip-text' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT, __( 'Backlink tooltip text:', 'footnotes' ) ),
+ 'backlink-tooltip-text' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT ),
'notice-backlink-tooltip-text' => __( 'Default text is the keyboard shortcut; may be a localized descriptive hint.', 'footnotes' ),
)
);
// Display template with replaced placeholders.
// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
- echo $template->get_content();
+ echo $l_obj_template->get_content();
// phpcs:enable
}
@@ -623,42 +623,42 @@ class Footnotes_Layout_Settings extends Footnotes_Layout_Engine {
*/
public function love() {
// Options for the acknowledgment display in the footer.
- $love = array(
+ $l_arr_love = array(
// Logo only.
- 'text-3' => sprintf( '%s', Footnotes_Config::PLUGIN_PUBLIC_NAME ),
+ 'text-3' => sprintf( '%s', MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ),
// Logo followed by heart symbol.
- 'text-4' => sprintf( '%s %s', Footnotes_Config::PLUGIN_PUBLIC_NAME, Footnotes_Config::LOVE_SYMBOL ),
+ 'text-4' => sprintf( '%s %s', MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL ),
// Logo preceded by heart symbol.
- 'text-5' => sprintf( '%s %s', Footnotes_Config::LOVE_SYMBOL, Footnotes_Config::PLUGIN_PUBLIC_NAME ),
+ 'text-5' => sprintf( '%s %s', MCI_Footnotes_Config::C_STR_LOVE_SYMBOL, MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ),
// Translators: 2: heart symbol 1: footnotes logogram.
- 'text-1' => sprintf( __( 'I %2$s %1$s', 'footnotes' ), Footnotes_Config::PLUGIN_PUBLIC_NAME, Footnotes_Config::LOVE_SYMBOL ),
+ 'text-1' => sprintf( __( 'I %2$s %1$s', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL ),
// Translators: %s: Footnotes plugin logo.
- 'text-6' => sprintf( __( 'This website uses %s.', 'footnotes' ), Footnotes_Config::PLUGIN_PUBLIC_NAME ),
+ 'text-6' => sprintf( __( 'This website uses %s.', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ),
// Translators: %s: Footnotes plugin logo.
- 'text-7' => sprintf( __( 'This website uses the %s plugin.', 'footnotes' ), Footnotes_Config::PLUGIN_PUBLIC_NAME ),
+ 'text-7' => sprintf( __( 'This website uses the %s plugin.', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ),
// Translators: %s: Footnotes plugin logo.
- 'text-2' => sprintf( __( 'This website uses the awesome %s plugin.', 'footnotes' ), Footnotes_Config::PLUGIN_PUBLIC_NAME ),
+ 'text-2' => sprintf( __( 'This website uses the awesome %s plugin.', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ),
'random' => __( 'randomly determined display of either mention', 'footnotes' ),
// Translators: 1: Plugin logo.2: heart symbol.
- 'no' => sprintf( __( 'no display of any "%1$s %2$s" mention in the footer', 'footnotes' ), Footnotes_Config::PLUGIN_PUBLIC_NAME, Footnotes_Config::LOVE_SYMBOL ),
+ 'no' => sprintf( __( 'no display of any "%1$s %2$s" mention in the footer', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL ),
);
// Load template file.
- $template = new Footnotes_Template( Footnotes_Template::DASHBOARD, 'settings-love' );
+ $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'settings-love' );
// Replace all placeholders.
- $template->replace(
+ $l_obj_template->replace(
array(
// Translators: %s: Footnotes plugin logo.
- 'label-love' => $this->add_label( Footnotes_Settings::FOOTNOTES_LOVE, sprintf( __( 'Tell the world you\'re using %s:', 'footnotes' ), Footnotes_Config::PLUGIN_PUBLIC_NAME ) ),
- 'love' => $this->add_select_box( Footnotes_Settings::FOOTNOTES_LOVE, $love ),
+ 'label-love' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE, sprintf( __( 'Tell the world you\'re using %s:', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ) ),
+ 'love' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE, $l_arr_love ),
// Translators: %s: Footnotes plugin logo.
- 'label-no-love' => $this->add_text( sprintf( __( 'Shortcode to inhibit the display of the %s mention on specific pages:', 'footnotes' ), Footnotes_Config::PLUGIN_PUBLIC_NAME ) ),
- 'no-love' => $this->add_text( Footnotes_Config::NO_LOVE_SLUG ),
+ 'label-no-love' => $this->add_text( sprintf( __( 'Shortcode to inhibit the display of the %s mention on specific pages:', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ) ),
+ 'no-love' => $this->add_text( MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG ),
)
);
// Display template with replaced placeholders.
// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
- echo $template->get_content();
+ echo $l_obj_template->get_content();
// phpcs:enable
}
@@ -675,28 +675,28 @@ class Footnotes_Layout_Settings extends Footnotes_Layout_Engine {
*/
public function excerpts() {
// Options for options select box.
- $excerpt_mode = array(
+ $l_arr_excerpt_mode = array(
'yes' => __( 'Yes, generate excerpts from posts with effectively processed footnotes and other markup', 'footnotes' ),
'no' => __( 'No, generate excerpts from posts but remove all footnotes and output plain text', 'footnotes' ),
'manual' => __( 'Yes but run the process only to display tooltips in manual excerpts with footnote short codes', 'footnotes' ),
);
// Load template file.
- $template = new Footnotes_Template( Footnotes_Template::DASHBOARD, 'settings-excerpts' );
+ $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'settings-excerpts' );
// Replace all placeholders.
- $template->replace(
+ $l_obj_template->replace(
array(
- 'label-excerpts' => $this->add_label( Footnotes_Settings::FOOTNOTES_IN_EXCERPT, __( 'Process footnotes in excerpts:', 'footnotes' ) ),
- 'excerpts' => $this->add_select_box( Footnotes_Settings::FOOTNOTES_IN_EXCERPT, $excerpt_mode ),
+ 'label-excerpts' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_IN_EXCERPT, __( 'Process footnotes in excerpts:', 'footnotes' ) ),
+ 'excerpts' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_IN_EXCERPT, $l_arr_excerpt_mode ),
'notice-excerpts' => __( 'If the_excerpt is enabled.', 'footnotes' ),
// Translators: %s: link text 'Advanced Excerpt' linked to the plugin\'s WordPress.org front page.
// Translators: %s: Footnotes plugin logo.
- 'description-excerpts' => sprintf( __( 'To not display footnotes in excerpts, the %s plugin generates excerpts on the basis of the posts to be able to remove the footnotes. Else, footnotes may be processed in manual excerpts OR processed based on the posts. — For this setting to be effective, the hook the_excerpt must be enabled under Scope and priority.', 'footnotes' ), '' . Footnotes_Config::PLUGIN_PUBLIC_NAME . '' ),
+ 'description-excerpts' => sprintf( __( 'To not display footnotes in excerpts, the %s plugin generates excerpts on the basis of the posts to be able to remove the footnotes. Else, footnotes may be processed in manual excerpts OR processed based on the posts. — For this setting to be effective, the hook the_excerpt must be enabled under Scope and priority.', 'footnotes' ), '' . MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME . '' ),
)
);
// Display template with replaced placeholders.
// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
- echo $template->get_content();
+ echo $l_obj_template->get_content();
// phpcs:enable
}
@@ -711,41 +711,41 @@ class Footnotes_Layout_Settings extends Footnotes_Layout_Engine {
*/
public function superscript() {
// Options for Yes/No select box.
- $enabled = array(
+ $l_arr_enabled = array(
'yes' => __( 'Yes', 'footnotes' ),
'no' => __( 'No', 'footnotes' ),
);
// Options for superscript normalize scope.
- $normalize_superscript = array(
+ $l_arr_normalize_superscript = array(
'no' => __( 'No', 'footnotes' ),
'referrers' => __( 'Footnote referrers', 'footnotes' ),
'all' => __( 'All superscript elements', 'footnotes' ),
);
// Load template file.
- $template = new Footnotes_Template( Footnotes_Template::DASHBOARD, 'customize-superscript' );
+ $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'customize-superscript' );
// Replace all placeholders.
- $template->replace(
+ $l_obj_template->replace(
array(
- 'label-superscript' => $this->add_label( Footnotes_Settings::FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS, __( 'Display footnote referrers in superscript:', 'footnotes' ) ),
- 'superscript' => $this->add_select_box( Footnotes_Settings::FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS, $enabled ),
+ 'label-superscript' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS, __( 'Display footnote referrers in superscript:', 'footnotes' ) ),
+ 'superscript' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS, $l_arr_enabled ),
- 'label-normalize' => $this->add_label( Footnotes_Settings::FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT, __( 'Normalize vertical alignment and font size:', 'footnotes' ) ),
- 'normalize' => $this->add_select_box( Footnotes_Settings::FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT, $normalize_superscript ),
+ 'label-normalize' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT, __( 'Normalize vertical alignment and font size:', 'footnotes' ) ),
+ 'normalize' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT, $l_arr_normalize_superscript ),
'notice-normalize' => __( 'Most themes don\'t need this fix.', 'footnotes' ),
- 'label-before' => $this->add_label( Footnotes_Settings::FOOTNOTES_STYLING_BEFORE, __( 'At the start of the footnote referrers:', 'footnotes' ) ),
- 'before' => $this->add_text_box( Footnotes_Settings::FOOTNOTES_STYLING_BEFORE ),
+ 'label-before' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE, __( 'At the start of the footnote referrers:', 'footnotes' ) ),
+ 'before' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE ),
- 'label-after' => $this->add_label( Footnotes_Settings::FOOTNOTES_STYLING_AFTER, __( 'At the end of the footnote referrers:', 'footnotes' ) ),
- 'after' => $this->add_text_box( Footnotes_Settings::FOOTNOTES_STYLING_AFTER ),
+ 'label-after' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER, __( 'At the end of the footnote referrers:', 'footnotes' ) ),
+ 'after' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER ),
- 'label-link' => $this->add_label( Footnotes_Settings::LINK_ELEMENT_ENABLED, __( 'Use the link element for referrers and backlinks:', 'footnotes' ) ),
+ 'label-link' => $this->add_label( MCI_Footnotes_Settings::C_STR_LINK_ELEMENT_ENABLED, __( 'Use the link element for referrers and backlinks:', 'footnotes' ) ),
'notice-link' => __( 'Please find this setting at the end of the reference container settings. The link element is needed to apply the theme\'s link color.', 'footnotes' ),
)
);
// Display template with replaced placeholders.
// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
- echo $template->get_content();
+ echo $l_obj_template->get_content();
// phpcs:enable
}
@@ -756,25 +756,25 @@ class Footnotes_Layout_Settings extends Footnotes_Layout_Engine {
*/
public function label_solution() {
// Options for the input label issue solution.
- $issue_solutions = array(
+ $l_arr_issue_solutions = array(
'none' => __( '0. No problem or solved otherwise', 'footnotes' ),
'move' => __( 'A. Footnotes are moved out and appended after the label\'s end (recommended)', 'footnotes' ),
'disconnect' => __( 'B. Labels with footnotes are disconnected from input element (discouraged)', 'footnotes' ),
);
// Load template file.
- $template = new Footnotes_Template( Footnotes_Template::DASHBOARD, 'configure-label-solution' );
+ $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'configure-label-solution' );
// Replace all placeholders.
- $template->replace(
+ $l_obj_template->replace(
array(
'description-1-selection' => __( 'Clicking a footnote referrer in an input element label toggles the input except when hard links are enabled. In jQuery mode, the recommended solution is to move footnotes and append them after the label (option A).', 'footnotes' ),
- 'label-selection' => $this->add_label( Footnotes_Settings::FOOTNOTES_LABEL_ISSUE_SOLUTION, __( 'Solve input label issue:', 'footnotes' ) ),
- 'selection' => $this->add_select_box( Footnotes_Settings::FOOTNOTES_LABEL_ISSUE_SOLUTION, $issue_solutions ),
+ 'label-selection' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_LABEL_ISSUE_SOLUTION, __( 'Solve input label issue:', 'footnotes' ) ),
+ 'selection' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_LABEL_ISSUE_SOLUTION, $l_arr_issue_solutions ),
'description-2-selection' => __( 'Option B is discouraged because disconnecting a label from its input element may compromise accessibility. This option is a last resort in case footnotes must absolutely stay inside the label. (Using jQuery \'event.stopPropagation\' failed.)', 'footnotes' ),
)
);
// Display template with replaced placeholders.
// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
- echo $template->get_content();
+ echo $l_obj_template->get_content();
// phpcs:enable
}
@@ -789,32 +789,32 @@ class Footnotes_Layout_Settings extends Footnotes_Layout_Engine {
*/
public function mouseover_box() {
// Options for Yes/No select box.
- $enabled = array(
+ $l_arr_enabled = array(
'yes' => __( 'Yes', 'footnotes' ),
'no' => __( 'No', 'footnotes' ),
);
// Load template file.
- $template = new Footnotes_Template( Footnotes_Template::DASHBOARD, 'mouse-over-box-display' );
+ $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'mouse-over-box-display' );
// Replace all placeholders.
- $template->replace(
+ $l_obj_template->replace(
array(
- 'label-enable' => $this->add_label( Footnotes_Settings::FOOTNOTES_MOUSE_OVER_BOX_ENABLED, __( 'Display tooltips:', 'footnotes' ) ),
- 'enable' => $this->add_select_box( Footnotes_Settings::FOOTNOTES_MOUSE_OVER_BOX_ENABLED, $enabled ),
+ 'label-enable' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ENABLED, __( 'Display tooltips:', 'footnotes' ) ),
+ 'enable' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ENABLED, $l_arr_enabled ),
'notice-enable' => __( 'Formatted text boxes allowing hyperlinks, displayed on mouse-over or tap and hold.', 'footnotes' ),
- 'label-alternative' => $this->add_label( Footnotes_Settings::FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE, __( 'Display alternative tooltips:', 'footnotes' ) ),
- 'alternative' => $this->add_select_box( Footnotes_Settings::FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE, $enabled ),
+ 'label-alternative' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE, __( 'Display alternative tooltips:', 'footnotes' ) ),
+ 'alternative' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE, $l_arr_enabled ),
'notice-alternative' => __( 'Intended to work around a configuration-related tooltip outage.', 'footnotes' ),
// Translators: %s: Footnotes plugin logo.
- 'description-alternative' => sprintf( __( 'These alternative tooltips work around a website related jQuery UI outage. They are low-script but use the AMP incompatible onmouseover and onmouseout arguments, along with CSS transitions for fade-in/out. The very small script is inserted after Footnotes\' internal stylesheet. When this option is enabled, %s does not load jQuery UI nor jQuery Tools.', 'footnotes' ), '' . Footnotes_Config::PLUGIN_PUBLIC_NAME . '' ),
+ 'description-alternative' => sprintf( __( 'These alternative tooltips work around a website related jQuery UI outage. They are low-script but use the AMP incompatible onmouseover and onmouseout arguments, along with CSS transitions for fade-in/out. The very small script is inserted after Footnotes\' internal stylesheet. When this option is enabled, %s does not load jQuery UI nor jQuery Tools.', 'footnotes' ), '' . MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME . '' ),
)
);
// Display template with replaced placeholders.
// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
- echo $template->get_content();
+ echo $l_obj_template->get_content();
// phpcs:enable
}
@@ -826,7 +826,7 @@ class Footnotes_Layout_Settings extends Footnotes_Layout_Engine {
public function mouseover_box_position() {
// Options for the Mouse-over box position.
- $position = array(
+ $l_arr_position = array(
'top left' => __( 'top left', 'footnotes' ),
'top center' => __( 'top center', 'footnotes' ),
'top right' => __( 'top right', 'footnotes' ),
@@ -837,7 +837,7 @@ class Footnotes_Layout_Settings extends Footnotes_Layout_Engine {
'center left' => __( 'center left', 'footnotes' ),
);
// Options for the alternative Mouse-over box position.
- $alternative_position = array(
+ $l_arr_alternative_position = array(
'top left' => __( 'top left', 'footnotes' ),
'top right' => __( 'top right', 'footnotes' ),
'bottom right' => __( 'bottom right', 'footnotes' ),
@@ -845,31 +845,31 @@ class Footnotes_Layout_Settings extends Footnotes_Layout_Engine {
);
// Load template file.
- $template = new Footnotes_Template( Footnotes_Template::DASHBOARD, 'mouse-over-box-position' );
+ $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'mouse-over-box-position' );
// Replace all placeholders.
- $template->replace(
+ $l_obj_template->replace(
array(
- 'label-position' => $this->add_label( Footnotes_Settings::FOOTNOTES_MOUSE_OVER_BOX_POSITION, __( 'Position:', 'footnotes' ) ),
- 'position' => $this->add_select_box( Footnotes_Settings::FOOTNOTES_MOUSE_OVER_BOX_POSITION, $position ),
- 'position-alternative' => $this->add_select_box( Footnotes_Settings::FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION, $alternative_position ),
+ 'label-position' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION, __( 'Position:', 'footnotes' ) ),
+ 'position' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION, $l_arr_position ),
+ 'position-alternative' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION, $l_arr_alternative_position ),
'notice-position' => __( 'The second column of settings boxes is for the alternative tooltips.', 'footnotes' ),
- 'label-offset-x' => $this->add_label( Footnotes_Settings::FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X, __( 'Horizontal offset:', 'footnotes' ) ),
- 'offset-x' => $this->add_num_box( Footnotes_Settings::FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X, -500, 500 ),
- 'offset-x-alternative' => $this->add_num_box( Footnotes_Settings::FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X, -500, 500 ),
+ 'label-offset-x' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X, __( 'Horizontal offset:', 'footnotes' ) ),
+ 'offset-x' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X, -500, 500 ),
+ 'offset-x-alternative' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X, -500, 500 ),
'notice-offset-x' => __( 'pixels; negative value for a leftwards offset; alternative tooltips: direction depends on position', 'footnotes' ),
- 'label-offset-y' => $this->add_label( Footnotes_Settings::FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y, __( 'Vertical offset:', 'footnotes' ) ),
- 'offset-y' => $this->add_num_box( Footnotes_Settings::FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y, -500, 500 ),
- 'offset-y-alternative' => $this->add_num_box( Footnotes_Settings::FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y, -500, 500 ),
+ 'label-offset-y' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y, __( 'Vertical offset:', 'footnotes' ) ),
+ 'offset-y' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y, -500, 500 ),
+ 'offset-y-alternative' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y, -500, 500 ),
'notice-offset-y' => __( 'pixels; negative value for an upwards offset; alternative tooltips: direction depends on position', 'footnotes' ),
)
);
// Display template with replaced placeholders.
// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
- echo $template->get_content();
+ echo $l_obj_template->get_content();
// phpcs:enable
}
@@ -881,21 +881,21 @@ class Footnotes_Layout_Settings extends Footnotes_Layout_Engine {
public function mouseover_box_dimensions() {
// Load template file.
- $template = new Footnotes_Template( Footnotes_Template::DASHBOARD, 'mouse-over-box-dimensions' );
+ $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'mouse-over-box-dimensions' );
// Replace all placeholders.
- $template->replace(
+ $l_obj_template->replace(
array(
- 'label-max-width' => $this->add_label( Footnotes_Settings::FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH, __( 'Maximum width:', 'footnotes' ) ),
- 'max-width' => $this->add_num_box( Footnotes_Settings::FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH, 0, 1280 ),
- 'width' => $this->add_num_box( Footnotes_Settings::FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH, 0, 1280 ),
+ 'label-max-width' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH, __( 'Maximum width:', 'footnotes' ) ),
+ 'max-width' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH, 0, 1280 ),
+ 'width' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH, 0, 1280 ),
'notice-max-width' => __( 'pixels; set to 0 for jQuery tooltips without max width; alternative tooltips are given the value in the second box as fixed width.', 'footnotes' ),
)
);
// Display template with replaced placeholders.
// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
- echo $template->get_content();
+ echo $l_obj_template->get_content();
// phpcs:enable
}
@@ -907,32 +907,32 @@ class Footnotes_Layout_Settings extends Footnotes_Layout_Engine {
public function mouseover_box_timing() {
// Load template file.
- $template = new Footnotes_Template( Footnotes_Template::DASHBOARD, 'mouse-over-box-timing' );
+ $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'mouse-over-box-timing' );
// Replace all placeholders.
- $template->replace(
+ $l_obj_template->replace(
array(
- 'label-fade-in-delay' => $this->add_label( Footnotes_Settings::MOUSE_OVER_BOX_FADE_IN_DELAY, __( 'Fade-in delay:', 'footnotes' ) ),
- 'fade-in-delay' => $this->add_num_box( Footnotes_Settings::MOUSE_OVER_BOX_FADE_IN_DELAY, 0, 20000 ),
+ 'label-fade-in-delay' => $this->add_label( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY, __( 'Fade-in delay:', 'footnotes' ) ),
+ 'fade-in-delay' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY, 0, 20000 ),
'notice-fade-in-delay' => __( 'milliseconds', 'footnotes' ),
- 'label-fade-in-duration' => $this->add_label( Footnotes_Settings::MOUSE_OVER_BOX_FADE_IN_DURATION, __( 'Fade-in duration:', 'footnotes' ) ),
- 'fade-in-duration' => $this->add_num_box( Footnotes_Settings::MOUSE_OVER_BOX_FADE_IN_DURATION, 0, 20000 ),
+ 'label-fade-in-duration' => $this->add_label( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION, __( 'Fade-in duration:', 'footnotes' ) ),
+ 'fade-in-duration' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION, 0, 20000 ),
'notice-fade-in-duration' => __( 'milliseconds', 'footnotes' ),
- 'label-fade-out-delay' => $this->add_label( Footnotes_Settings::MOUSE_OVER_BOX_FADE_OUT_DELAY, __( 'Fade-out delay:', 'footnotes' ) ),
- 'fade-out-delay' => $this->add_num_box( Footnotes_Settings::MOUSE_OVER_BOX_FADE_OUT_DELAY, 0, 20000 ),
+ 'label-fade-out-delay' => $this->add_label( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY, __( 'Fade-out delay:', 'footnotes' ) ),
+ 'fade-out-delay' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY, 0, 20000 ),
'notice-fade-out-delay' => __( 'milliseconds', 'footnotes' ),
- 'label-fade-out-duration' => $this->add_label( Footnotes_Settings::MOUSE_OVER_BOX_FADE_OUT_DURATION, __( 'Fade-out duration:', 'footnotes' ) ),
- 'fade-out-duration' => $this->add_num_box( Footnotes_Settings::MOUSE_OVER_BOX_FADE_OUT_DURATION, 0, 20000 ),
+ 'label-fade-out-duration' => $this->add_label( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION, __( 'Fade-out duration:', 'footnotes' ) ),
+ 'fade-out-duration' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION, 0, 20000 ),
'notice-fade-out-duration' => __( 'milliseconds', 'footnotes' ),
)
);
// Display template with replaced placeholders.
// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
- echo $template->get_content();
+ echo $l_obj_template->get_content();
// phpcs:enable
}
@@ -943,33 +943,33 @@ class Footnotes_Layout_Settings extends Footnotes_Layout_Engine {
*/
public function mouseover_box_truncation() {
// Options for Yes/No select box.
- $enabled = array(
+ $l_arr_enabled = array(
'yes' => __( 'Yes', 'footnotes' ),
'no' => __( 'No', 'footnotes' ),
);
// Load template file.
- $template = new Footnotes_Template( Footnotes_Template::DASHBOARD, 'mouse-over-box-truncation' );
+ $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'mouse-over-box-truncation' );
// Replace all placeholders.
- $template->replace(
+ $l_obj_template->replace(
array(
- 'label-truncation' => $this->add_label( Footnotes_Settings::FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED, __( 'Truncate the note in the tooltip:', 'footnotes' ) ),
- 'truncation' => $this->add_select_box( Footnotes_Settings::FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED, $enabled ),
+ 'label-truncation' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED, __( 'Truncate the note in the tooltip:', 'footnotes' ) ),
+ 'truncation' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED, $l_arr_enabled ),
- 'label-max-length' => $this->add_label( Footnotes_Settings::FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH, __( 'Maximum number of characters in the tooltip:', 'footnotes' ) ),
- 'max-length' => $this->add_num_box( Footnotes_Settings::FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH, 3, 10000 ),
+ 'label-max-length' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH, __( 'Maximum number of characters in the tooltip:', 'footnotes' ) ),
+ 'max-length' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH, 3, 10000 ),
// The feature trims back until the last full word.
'notice-max-length' => __( 'No weird cuts.', 'footnotes' ),
- 'label-readon' => $this->add_label( Footnotes_Settings::FOOTNOTES_TOOLTIP_READON_LABEL, __( '\'Read on\' button label:', 'footnotes' ) ),
- 'readon' => $this->add_text_box( Footnotes_Settings::FOOTNOTES_TOOLTIP_READON_LABEL ),
+ 'label-readon' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL, __( '\'Read on\' button label:', 'footnotes' ) ),
+ 'readon' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL ),
)
);
// Display template with replaced placeholders.
// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
- echo $template->get_content();
+ echo $l_obj_template->get_content();
// phpcs:enable
}
@@ -980,29 +980,29 @@ class Footnotes_Layout_Settings extends Footnotes_Layout_Engine {
*/
public function mouseover_box_text() {
// Options for Yes/No select box.
- $enabled = array(
+ $l_arr_enabled = array(
'yes' => __( 'Yes', 'footnotes' ),
'no' => __( 'No', 'footnotes' ),
);
// Load template file.
- $template = new Footnotes_Template( Footnotes_Template::DASHBOARD, 'mouse-over-box-text' );
+ $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'mouse-over-box-text' );
// Replace all placeholders.
- $template->replace(
+ $l_obj_template->replace(
array(
'description-delimiter' => __( 'Tooltips can display another content than the footnote entry in the reference container. The trigger is a shortcode in the footnote text separating the tooltip text from the note. That is consistent with what WordPress does for excerpts.', 'footnotes' ),
- 'label-delimiter' => $this->add_label( Footnotes_Settings::FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER, __( 'Delimiter for dedicated tooltip text:', 'footnotes' ) ),
- 'delimiter' => $this->add_text_box( Footnotes_Settings::FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER ),
+ 'label-delimiter' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER, __( 'Delimiter for dedicated tooltip text:', 'footnotes' ) ),
+ 'delimiter' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER ),
'notice-delimiter' => __( 'If the delimiter shortcode is present, the tooltip text will be the part before it.', 'footnotes' ),
- 'label-mirror' => $this->add_label( Footnotes_Settings::FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE, __( 'Mirror the tooltip in the reference container:', 'footnotes' ) ),
- 'mirror' => $this->add_select_box( Footnotes_Settings::FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE, $enabled ),
+ 'label-mirror' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE, __( 'Mirror the tooltip in the reference container:', 'footnotes' ) ),
+ 'mirror' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE, $l_arr_enabled ),
'notice-mirror' => __( 'Tooltips may be harder to use on mobiles. This option allows to read it in the reference container.', 'footnotes' ),
- 'label-separator' => $this->add_label( Footnotes_Settings::FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR, __( 'Separator between tooltip text and footnote text:', 'footnotes' ) ),
- 'separator' => $this->add_text_box( Footnotes_Settings::FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR ),
+ 'label-separator' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR, __( 'Separator between tooltip text and footnote text:', 'footnotes' ) ),
+ 'separator' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR ),
'notice-separator' => __( 'May be a simple space, or a line break <br />, or any string in your language.', 'footnotes' ),
'description-mirror' => __( 'Tooltips, even jQuery-driven, may be hard to consult on mobiles. This option allows to read the tooltip content in the reference container too.', 'footnotes' ),
@@ -1011,7 +1011,7 @@ class Footnotes_Layout_Settings extends Footnotes_Layout_Engine {
);
// Display template with replaced placeholders.
// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
- echo $template->get_content();
+ echo $l_obj_template->get_content();
// phpcs:enable
}
@@ -1022,12 +1022,12 @@ class Footnotes_Layout_Settings extends Footnotes_Layout_Engine {
*/
public function mouseover_box_appearance() {
// Options for Yes/No select box.
- $enabled = array(
+ $l_arr_enabled = array(
'yes' => __( 'Yes', 'footnotes' ),
'no' => __( 'No', 'footnotes' ),
);
// Options for the font size unit.
- $font_size_units = array(
+ $l_arr_font_size_units = array(
'em' => __( 'em', 'footnotes' ),
'rem' => __( 'rem', 'footnotes' ),
'px' => __( 'pixels', 'footnotes' ),
@@ -1038,42 +1038,42 @@ class Footnotes_Layout_Settings extends Footnotes_Layout_Engine {
);
// Load template file.
- $template = new Footnotes_Template( Footnotes_Template::DASHBOARD, 'mouse-over-box-appearance' );
+ $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'mouse-over-box-appearance' );
// Replace all placeholders.
- $template->replace(
+ $l_obj_template->replace(
array(
- 'label-font-size' => $this->add_label( Footnotes_Settings::MOUSE_OVER_BOX_FONT_SIZE_ENABLED, __( 'Set font size:', 'footnotes' ) ),
- 'font-size-enable' => $this->add_select_box( Footnotes_Settings::MOUSE_OVER_BOX_FONT_SIZE_ENABLED, $enabled ),
- 'font-size-scalar' => $this->add_num_box( Footnotes_Settings::MOUSE_OVER_BOX_FONT_SIZE_SCALAR, 0, 50, true ),
- 'font-size-unit' => $this->add_select_box( Footnotes_Settings::MOUSE_OVER_BOX_FONT_SIZE_UNIT, $font_size_units ),
+ 'label-font-size' => $this->add_label( MCI_Footnotes_Settings::C_STR_MOUSE_OVER_BOX_FONT_SIZE_ENABLED, __( 'Set font size:', 'footnotes' ) ),
+ 'font-size-enable' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_MOUSE_OVER_BOX_FONT_SIZE_ENABLED, $l_arr_enabled ),
+ 'font-size-scalar' => $this->add_num_box( MCI_Footnotes_Settings::C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR, 0, 50, true ),
+ 'font-size-unit' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT, $l_arr_font_size_units ),
'notice-font-size' => __( 'By default, the font size is set to equal the surrounding text.', 'footnotes' ),
- 'label-color' => $this->add_label( Footnotes_Settings::FOOTNOTES_MOUSE_OVER_BOX_COLOR, __( 'Text color:', 'footnotes' ) ),
- 'color' => $this->add_color_selection( Footnotes_Settings::FOOTNOTES_MOUSE_OVER_BOX_COLOR ),
+ 'label-color' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR, __( 'Text color:', 'footnotes' ) ),
+ 'color' => $this->add_color_selection( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR ),
// Translators: %s: Clear or leave empty.
'notice-color' => sprintf( __( 'To use the current theme\'s default text color: %s', 'footnotes' ), __( 'Clear or leave empty.', 'footnotes' ) ),
- 'label-background' => $this->add_label( Footnotes_Settings::FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND, __( 'Background color:', 'footnotes' ) ),
- 'background' => $this->add_color_selection( Footnotes_Settings::FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND ),
+ 'label-background' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND, __( 'Background color:', 'footnotes' ) ),
+ 'background' => $this->add_color_selection( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND ),
// Translators: %s: Clear or leave empty.
'notice-background' => sprintf( __( 'To use the current theme\'s default background color: %s', 'footnotes' ), __( 'Clear or leave empty.', 'footnotes' ) ),
- 'label-border-width' => $this->add_label( Footnotes_Settings::FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH, __( 'Border width:', 'footnotes' ) ),
- 'border-width' => $this->add_num_box( Footnotes_Settings::FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH, 0, 4, true ),
+ 'label-border-width' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH, __( 'Border width:', 'footnotes' ) ),
+ 'border-width' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH, 0, 4, true ),
'notice-border-width' => __( 'pixels; 0 for borderless', 'footnotes' ),
- 'label-border-color' => $this->add_label( Footnotes_Settings::FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR, __( 'Border color:', 'footnotes' ) ),
- 'border-color' => $this->add_color_selection( Footnotes_Settings::FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR ),
+ 'label-border-color' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR, __( 'Border color:', 'footnotes' ) ),
+ 'border-color' => $this->add_color_selection( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR ),
// Translators: %s: Clear or leave empty.
'notice-border-color' => sprintf( __( 'To use the current theme\'s default border color: %s', 'footnotes' ), __( 'Clear or leave empty.', 'footnotes' ) ),
- 'label-border-radius' => $this->add_label( Footnotes_Settings::FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS, __( 'Rounded corner radius:', 'footnotes' ) ),
- 'border-radius' => $this->add_num_box( Footnotes_Settings::FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS, 0, 500 ),
+ 'label-border-radius' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS, __( 'Rounded corner radius:', 'footnotes' ) ),
+ 'border-radius' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS, 0, 500 ),
'notice-border-radius' => __( 'pixels; 0 for sharp corners', 'footnotes' ),
- 'label-box-shadow-color' => $this->add_label( Footnotes_Settings::FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR, __( 'Box shadow color:', 'footnotes' ) ),
- 'box-shadow-color' => $this->add_color_selection( Footnotes_Settings::FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR ),
+ 'label-box-shadow-color' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR, __( 'Box shadow color:', 'footnotes' ) ),
+ 'box-shadow-color' => $this->add_color_selection( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR ),
// Translators: %s: Clear or leave empty.
'notice-box-shadow-color' => sprintf( __( 'To use the current theme\'s default box shadow color: %s', 'footnotes' ), __( 'Clear or leave empty.', 'footnotes' ) ),
@@ -1081,7 +1081,7 @@ class Footnotes_Layout_Settings extends Footnotes_Layout_Engine {
);
// Display template with replaced placeholders.
// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
- echo $template->get_content();
+ echo $l_obj_template->get_content();
// phpcs:enable
}
@@ -1111,20 +1111,20 @@ class Footnotes_Layout_Settings extends Footnotes_Layout_Engine {
*/
public function hyperlink_arrow() {
// Load template file.
- $template = new Footnotes_Template( Footnotes_Template::DASHBOARD, 'customize-hyperlink-arrow' );
+ $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'customize-hyperlink-arrow' );
// Replace all placeholders.
- $template->replace(
+ $l_obj_template->replace(
array(
- 'label-symbol' => $this->add_label( Footnotes_Settings::HYPERLINK_ARROW, __( 'Select or input the backlink symbol:', 'footnotes' ) ),
- 'symbol-options' => $this->add_select_box( Footnotes_Settings::HYPERLINK_ARROW, Footnotes_Convert::get_arrow() ),
- 'symbol-custom' => $this->add_text_box( Footnotes_Settings::HYPERLINK_ARROW_USER_DEFINED ),
+ 'label-symbol' => $this->add_label( MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW, __( 'Select or input the backlink symbol:', 'footnotes' ) ),
+ 'symbol-options' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW, MCI_Footnotes_Convert::get_arrow() ),
+ 'symbol-custom' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW_USER_DEFINED ),
'notice-symbol' => __( 'Your input overrides the selection.', 'footnotes' ),
'description-symbol' => __( 'This symbol is used in the reference container. But this setting pre-existed under this tab and cannot be moved to another one.', 'footnotes' ),
)
);
// Display template with replaced placeholders.
// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
- echo $template->get_content();
+ echo $l_obj_template->get_content();
// phpcs:enable
}
@@ -1144,12 +1144,12 @@ class Footnotes_Layout_Settings extends Footnotes_Layout_Engine {
*/
public function custom_css() {
// Load template file.
- $template = new Footnotes_Template( Footnotes_Template::DASHBOARD, 'customize-css' );
+ $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'customize-css' );
// Replace all placeholders.
- $template->replace(
+ $l_obj_template->replace(
array(
- 'label-css' => $this->add_label( Footnotes_Settings::CUSTOM_CSS, __( 'Your existing Custom CSS code:', 'footnotes' ) ),
- 'css' => $this->add_textarea( Footnotes_Settings::CUSTOM_CSS ),
+ 'label-css' => $this->add_label( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS, __( 'Your existing Custom CSS code:', 'footnotes' ) ),
+ 'css' => $this->add_textarea( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS ),
'description-css' => __( 'Custom CSS migrates to a dedicated tab. This text area is intended to keep your data safe, and the code remains valid while visible. Please copy-paste the content into the new text area under the new tab.', 'footnotes' ),
// phpcs:disable Squiz.PHP.CommentedOutCode.Found
@@ -1157,22 +1157,22 @@ class Footnotes_Layout_Settings extends Footnotes_Layout_Engine {
// Localized notices are dropped to ease translators' task.
// "label-class-1" => ".footnote_plugin_tooltip_text",.
- // "class-1" => $this->add_text(__("superscript, Footnotes index", Footnotes_Config::PLUGIN_NAME)),.
+ // "class-1" => $this->add_text(__("superscript, Footnotes index", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),.
// "label-class-2" => ".footnote_tooltip",.
- // "class-2" => $this->add_text(__("mouse-over box, tooltip for each superscript", Footnotes_Config::PLUGIN_NAME)),.
+ // "class-2" => $this->add_text(__("mouse-over box, tooltip for each superscript", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),.
// "label-class-3" => ".footnote_plugin_index",.
- // "class-3" => $this->add_text(__("1st column of the Reference Container, Footnotes index", Footnotes_Config::PLUGIN_NAME)),.
+ // "class-3" => $this->add_text(__("1st column of the Reference Container, Footnotes index", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),.
// "label-class-4" => ".footnote_plugin_text",.
- // "class-4" => $this->add_text(__("2nd column of the Reference Container, Footnote text", Footnotes_Config::PLUGIN_NAME)).
+ // "class-4" => $this->add_text(__("2nd column of the Reference Container, Footnote text", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)).
// phpcs:enable
)
);
// Display template with replaced placeholders.
// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
- echo $template->get_content();
+ echo $l_obj_template->get_content();
// phpcs:enable
}
@@ -1184,22 +1184,22 @@ class Footnotes_Layout_Settings extends Footnotes_Layout_Engine {
public function custom_css_migration() {
// Options for Yes/No select box.
- $enabled = array(
+ $l_arr_enabled = array(
'yes' => __( 'Yes', 'footnotes' ),
'no' => __( 'No', 'footnotes' ),
);
// Load template file.
- $template = new Footnotes_Template( Footnotes_Template::DASHBOARD, 'customize-css-migration' );
+ $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'customize-css-migration' );
// Replace all placeholders.
- $template->replace(
+ $l_obj_template->replace(
array(
- 'label-css' => $this->add_label( Footnotes_Settings::CUSTOM_CSS, __( 'Your existing Custom CSS code:', 'footnotes' ) ),
- 'css' => $this->add_textarea( Footnotes_Settings::CUSTOM_CSS ),
+ 'label-css' => $this->add_label( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS, __( 'Your existing Custom CSS code:', 'footnotes' ) ),
+ 'css' => $this->add_textarea( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS ),
'description-css' => __( 'Custom CSS migrates to a dedicated tab. This text area is intended to keep your data safe, and the code remains valid while visible. Please copy-paste the content into the new text area below. Set Show legacy to No. Save twice.', 'footnotes' ),
- 'label-show-legacy' => $this->add_label( Footnotes_Settings::CUSTOM_CSS_LEGACY_ENABLE, 'Show legacy Custom CSS settings containers:' ),
- 'show-legacy' => $this->add_select_box( Footnotes_Settings::CUSTOM_CSS_LEGACY_ENABLE, $enabled ),
+ 'label-show-legacy' => $this->add_label( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS_LEGACY_ENABLE, 'Show legacy Custom CSS settings containers:' ),
+ 'show-legacy' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS_LEGACY_ENABLE, $l_arr_enabled ),
'notice-show-legacy' => __( 'Please set to No when you are done migrating, for the legacy Custom CSS containers to disappear.', 'footnotes' ),
// Translators: %s: Referres and tooltips.
'description-show-legacy' => sprintf( __( 'The legacy Custom CSS under the %s tab and its mirror here are emptied, and the select box saved as No, when the settings tab is saved while the settings container is not displayed.', 'footnotes' ), __( 'Referrers and tooltips', 'footnotes' ) ),
@@ -1208,7 +1208,7 @@ class Footnotes_Layout_Settings extends Footnotes_Layout_Engine {
);
// Display template with replaced placeholders.
// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
- echo $template->get_content();
+ echo $l_obj_template->get_content();
// phpcs:enable
}
@@ -1219,11 +1219,11 @@ class Footnotes_Layout_Settings extends Footnotes_Layout_Engine {
*/
public function custom_css_new() {
// Load template file.
- $template = new Footnotes_Template( Footnotes_Template::DASHBOARD, 'customize-css-new' );
+ $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'customize-css-new' );
// Replace all placeholders.
- $template->replace(
+ $l_obj_template->replace(
array(
- 'css' => $this->add_textarea( Footnotes_Settings::CUSTOM_CSS_NEW ),
+ 'css' => $this->add_textarea( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS_NEW ),
'headline' => $this->add_text( __( 'Recommended CSS classes:', 'footnotes' ) ),
@@ -1231,7 +1231,7 @@ class Footnotes_Layout_Settings extends Footnotes_Layout_Engine {
);
// Display template with replaced placeholders.
// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
- echo $template->get_content();
+ echo $l_obj_template->get_content();
// phpcs:enable
}
@@ -1255,10 +1255,10 @@ class Footnotes_Layout_Settings extends Footnotes_Layout_Engine {
*/
public function lookup_hooks() {
// Load template file.
- $template = new Footnotes_Template( Footnotes_Template::DASHBOARD, 'expert-lookup' );
+ $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'expert-lookup' );
// Replace all placeholders.
- $template->replace(
+ $l_obj_template->replace(
array(
'description-1' => __( 'The priority level determines whether Footnotes is executed timely before other plugins, and how the reference container is positioned relative to other features.', 'footnotes' ),
// Translators: 1: 99; 2: 1200.
@@ -1272,35 +1272,35 @@ class Footnotes_Layout_Settings extends Footnotes_Layout_Engine {
'head-numbox' => __( 'Priority level', 'footnotes' ),
'head-url' => __( 'WordPress documentation', 'footnotes' ),
- 'label-the-title' => $this->add_label( Footnotes_Settings::EXPERT_LOOKUP_THE_TITLE, 'the_title' ),
- 'the-title' => $this->add_checkbox( Footnotes_Settings::EXPERT_LOOKUP_THE_TITLE ),
- 'priority-the-title' => $this->add_num_box( Footnotes_Settings::EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL, -1, PHP_INT_MAX ),
+ 'label-the-title' => $this->add_label( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_TITLE, 'the_title' ),
+ 'the-title' => $this->add_checkbox( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_TITLE ),
+ 'priority-the-title' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL, -1, PHP_INT_MAX ),
'url-the-title' => 'https://developer.wordpress.org/reference/hooks/the_title/',
- 'label-the-content' => $this->add_label( Footnotes_Settings::EXPERT_LOOKUP_THE_CONTENT, 'the_content' ),
- 'the-content' => $this->add_checkbox( Footnotes_Settings::EXPERT_LOOKUP_THE_CONTENT ),
- 'priority-the-content' => $this->add_num_box( Footnotes_Settings::EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL, -1, PHP_INT_MAX ),
+ 'label-the-content' => $this->add_label( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_CONTENT, 'the_content' ),
+ 'the-content' => $this->add_checkbox( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_CONTENT ),
+ 'priority-the-content' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL, -1, PHP_INT_MAX ),
'url-the-content' => 'https://developer.wordpress.org/reference/hooks/the_content/',
- 'label-the-excerpt' => $this->add_label( Footnotes_Settings::EXPERT_LOOKUP_THE_EXCERPT, 'the_excerpt' ),
- 'the-excerpt' => $this->add_checkbox( Footnotes_Settings::EXPERT_LOOKUP_THE_EXCERPT ),
- 'priority-the-excerpt' => $this->add_num_box( Footnotes_Settings::EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL, -1, PHP_INT_MAX ),
+ 'label-the-excerpt' => $this->add_label( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_EXCERPT, 'the_excerpt' ),
+ 'the-excerpt' => $this->add_checkbox( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_EXCERPT ),
+ 'priority-the-excerpt' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL, -1, PHP_INT_MAX ),
'url-the-excerpt' => 'https://developer.wordpress.org/reference/functions/the_excerpt/',
- 'label-widget-title' => $this->add_label( Footnotes_Settings::EXPERT_LOOKUP_WIDGET_TITLE, 'widget_title' ),
- 'widget-title' => $this->add_checkbox( Footnotes_Settings::EXPERT_LOOKUP_WIDGET_TITLE ),
- 'priority-widget-title' => $this->add_num_box( Footnotes_Settings::EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL, -1, PHP_INT_MAX ),
+ 'label-widget-title' => $this->add_label( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_WIDGET_TITLE, 'widget_title' ),
+ 'widget-title' => $this->add_checkbox( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_WIDGET_TITLE ),
+ 'priority-widget-title' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL, -1, PHP_INT_MAX ),
'url-widget-title' => 'https://codex.wordpress.org/Plugin_API/Filter_Reference/widget_title',
- 'label-widget-text' => $this->add_label( Footnotes_Settings::EXPERT_LOOKUP_WIDGET_TEXT, 'widget_text' ),
- 'widget-text' => $this->add_checkbox( Footnotes_Settings::EXPERT_LOOKUP_WIDGET_TEXT ),
- 'priority-widget-text' => $this->add_num_box( Footnotes_Settings::EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL, -1, PHP_INT_MAX ),
+ 'label-widget-text' => $this->add_label( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_WIDGET_TEXT, 'widget_text' ),
+ 'widget-text' => $this->add_checkbox( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_WIDGET_TEXT ),
+ 'priority-widget-text' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL, -1, PHP_INT_MAX ),
'url-widget-text' => 'https://codex.wordpress.org/Plugin_API/Filter_Reference/widget_text',
)
);
// Display template with replaced placeholders.
// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
- echo $template->get_content();
+ echo $l_obj_template->get_content();
// phpcs:enable
}
@@ -1315,15 +1315,15 @@ class Footnotes_Layout_Settings extends Footnotes_Layout_Engine {
public function Help() {
global $g_obj_mci_footnotes;
// Load footnotes starting and end tag.
- $footnote_starting_tag = $this->load_setting( Footnotes_Settings::FOOTNOTES_SHORT_CODE_START );
- $footnote_ending_tag = $this->load_setting( Footnotes_Settings::FOOTNOTES_SHORT_CODE_END );
+ $l_arr_footnote_starting_tag = $this->load_setting( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START );
+ $l_arr_footnote_ending_tag = $this->load_setting( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END );
- if ( 'userdefined' === $footnote_starting_tag['value'] || 'userdefined' === $footnote_ending_tag['value'] ) {
+ if ( 'userdefined' === $l_arr_footnote_starting_tag['value'] || 'userdefined' === $l_arr_footnote_ending_tag['value'] ) {
// Load user defined starting and end tag.
- $footnote_starting_tag = $this->load_setting( Footnotes_Settings::FOOTNOTES_SHORT_CODE_START_USER_DEFINED );
- $footnote_ending_tag = $this->load_setting( Footnotes_Settings::FOOTNOTES_SHORT_CODE_END_USER_DEFINED );
+ $l_arr_footnote_starting_tag = $this->load_setting( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED );
+ $l_arr_footnote_ending_tag = $this->load_setting( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED );
}
- $example = 'Hello' . $footnote_starting_tag['value'] .
+ $l_str_example = 'Hello' . $l_arr_footnote_starting_tag['value'] .
'Sed ut perspiciatis, unde omnis iste natus error ' .
'sit voluptatem accusantium doloremque laudantium, ' .
'totam rem aperiam eaque ipsa, quae ab illo ' .
@@ -1336,20 +1336,20 @@ class Footnotes_Layout_Settings extends Footnotes_Layout_Engine {
'dolor sit amet, consectetur, adipisci velit, sed ' .
'quia non numquam eius modi tempora incidunt, ut ' .
'labore et dolore magnam aliquam quaerat voluptatem.' .
- $footnote_ending_tag['value'] . ' World!';
+ $l_arr_footnote_ending_tag['value'] . ' World!';
// Load template file.
- $template = new Footnotes_Template( Footnotes_Template::DASHBOARD, 'how-to-help' );
+ $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'how-to-help' );
// Replace all placeholders.
- $template->replace(
+ $l_obj_template->replace(
array(
'label-start' => __( 'Start your footnote with the following short code:', 'footnotes' ),
- 'start' => $footnote_starting_tag['value'],
+ 'start' => $l_arr_footnote_starting_tag['value'],
'label-end' => __( '…and end your footnote with this short code:', 'footnotes' ),
- 'end' => $footnote_ending_tag['value'],
- 'example-code' => $example,
+ 'end' => $l_arr_footnote_ending_tag['value'],
+ 'example-code' => $l_str_example,
'example-string' => ' ' . __( 'will be displayed as:', 'footnotes' ),
- 'example' => $g_obj_mci_footnotes->task->exec( $example, true ),
+ 'example' => $g_obj_mci_footnotes->a_obj_task->exec( $l_str_example, true ),
// Translators: %1$s, %2$s: anchor element with hyperlink to the Support Forum.
'information' => sprintf( __( 'For further information please check out our %1$sSupport Forum%2$s on WordPress.org.', 'footnotes' ), '', '' ),
)
@@ -1369,11 +1369,11 @@ class Footnotes_Layout_Settings extends Footnotes_Layout_Engine {
* When this callback function was renamed, this call went unnoticed.
* @see class/task.php
*/
- $g_obj_mci_footnotes->task->footnotes_output_head();
+ $g_obj_mci_footnotes->a_obj_task->footnotes_output_head();
// Display template with replaced placeholders.
// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
- echo $template->get_content();
+ echo $l_obj_template->get_content();
// phpcs:enable
}
@@ -1384,16 +1384,16 @@ class Footnotes_Layout_Settings extends Footnotes_Layout_Engine {
*/
public function donate() {
// Load template file.
- $template = new Footnotes_Template( Footnotes_Template::DASHBOARD, 'how-to-donate' );
+ $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'how-to-donate' );
// Replace all placeholders.
- $template->replace(
+ $l_obj_template->replace(
array(
'caption' => __( 'Donate now', 'footnotes' ),
)
);
// Display template with replaced placeholders.
// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
- echo $template->get_content();
+ echo $l_obj_template->get_content();
// phpcs:enable
}
}
diff --git a/class/init.php b/class/init.php
index ce236c3..896dbc6 100644
--- a/class/init.php
+++ b/class/init.php
@@ -13,7 +13,7 @@
*
* @since 1.5.0
*/
-class Footnotes {
+class MCI_Footnotes {
/**
* The Plugin task.
@@ -21,7 +21,7 @@ class Footnotes {
* @since 1.5.0
* @var Task $task The Plugin task.
*/
- public $task = null;
+ public $a_obj_task = null;
/**
* Flag for using tooltips.
@@ -30,7 +30,7 @@ class Footnotes {
*
* @var bool $tooltips_enabled Whether tooltips are enabled or not.
*/
- public static $tooltips_enabled = false;
+ public static $a_bool_tooltips_enabled = false;
/**
* Allows to determine whether alternative tooltips are enabled.
@@ -46,7 +46,7 @@ class Footnotes {
* @contributor Patrizia Lutz @misfist
* @var bool
*/
- public static $alternative_tooltips_enabled = false;
+ public static $a_bool_alternative_tooltips_enabled = false;
/**
* Allows to determine whether AMP compatibility mode is enabled.
@@ -68,7 +68,7 @@ class Footnotes {
*
* @var bool
*/
- public static $amp_enabled = false;
+ public static $a_bool_amp_enabled = false;
/**
* Allows to determine the script mode among jQuery or plain JS.
@@ -86,7 +86,7 @@ class Footnotes {
* @var str 'js' Plain JavaScript.
* 'jquery' Use jQuery libraries.
*/
- public static $script_mode = 'js';
+ public static $a_str_script_mode = 'js';
/**
* Executes the Plugin.
@@ -105,9 +105,9 @@ class Footnotes {
*/
public function run() {
// Register language.
- Footnotes_Language::register_hooks();
+ MCI_Footnotes_Language::register_hooks();
// Register Button hooks.
- Footnotes_WYSIWYG::register_hooks();
+ MCI_Footnotes_WYSIWYG::register_hooks();
// Register general hooks.
Hooks::register_hooks();
@@ -153,7 +153,7 @@ class Footnotes {
* Also, the visibility of initialize_widgets() is not private any longer.
*/
public function initialize_widgets() {
- register_widget( 'Footnotes_Widget_Reference_container' );
+ register_widget( 'MCI_Footnotes_Widget_Reference_container' );
}
/**
@@ -162,7 +162,7 @@ class Footnotes {
* @since 1.5.0
*/
private function initialize_dashboard() {
- new Footnotes_Layout_Init();
+ new MCI_Footnotes_Layout_Init();
}
/**
@@ -171,8 +171,8 @@ class Footnotes {
* @since 1.5.0
*/
private function initialize_task() {
- $this->task = new Footnotes_Task();
- $this->task->register_hooks();
+ $this->a_obj_task = new MCI_Footnotes_Task();
+ $this->a_obj_task->register_hooks();
}
/**
@@ -200,10 +200,10 @@ class Footnotes {
* The condition about tooltips was missing, only the not-alternative-tooltips part was present.
*/
// Set conditions re-used for stylesheet enqueuing and in class/task.php.
- self::$amp_enabled = Footnotes_Convert::to_bool( Footnotes_Settings::instance()->get( Footnotes_Settings::FOOTNOTES_AMP_COMPATIBILITY_ENABLE ) );
- self::$tooltips_enabled = Footnotes_Convert::to_bool( Footnotes_Settings::instance()->get( Footnotes_Settings::FOOTNOTES_MOUSE_OVER_BOX_ENABLED ) );
- self::$alternative_tooltips_enabled = Footnotes_Convert::to_bool( Footnotes_Settings::instance()->get( Footnotes_Settings::FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE ) );
- self::$script_mode = Footnotes_Settings::instance()->get( Footnotes_Settings::FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE );
+ self::$a_bool_amp_enabled = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_AMP_COMPATIBILITY_ENABLE ) );
+ self::$a_bool_tooltips_enabled = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ENABLED ) );
+ self::$a_bool_alternative_tooltips_enabled = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE ) );
+ self::$a_str_script_mode = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE );
/**
* Enqueues the jQuery library registered by WordPress.
@@ -220,15 +220,15 @@ class Footnotes {
* After adding the alternative reference container, jQuery has become optional,
* but still enabled by default.
*/
- if ( ! self::$amp_enabled ) {
+ if ( ! self::$a_bool_amp_enabled ) {
- if ( 'jquery' === self::$script_mode || ( self::$tooltips_enabled && ! self::$alternative_tooltips_enabled ) ) {
+ if ( 'jquery' === self::$a_str_script_mode || ( self::$a_bool_tooltips_enabled && ! self::$a_bool_alternative_tooltips_enabled ) ) {
wp_enqueue_script( 'jquery' );
}
- if ( self::$tooltips_enabled && ! self::$alternative_tooltips_enabled ) {
+ if ( self::$a_bool_tooltips_enabled && ! self::$a_bool_alternative_tooltips_enabled ) {
/**
* Enqueues the jQuery Tools library shipped with the plugin.
@@ -329,58 +329,58 @@ class Footnotes {
* Plugin version number is needed for busting browser caches after each plugin update.
*
* @since 2.1.4 automate passing version number for cache busting.
- * The constant FOOTNOTES_VERSION is defined at start of footnotes.php.
+ * The constant C_STR_FOOTNOTES_VERSION is defined at start of footnotes.php.
*
* The media scope argument 'all' is the default.
* No need to use '-css' in the handle, as this is appended automatically.
*/
// Set tooltip mode for use in stylesheet name.
- if ( self::$tooltips_enabled ) {
+ if ( self::$a_bool_tooltips_enabled ) {
- if ( self::$amp_enabled ) {
- $tooltip_mode_short = 'ampt';
- $tooltip_mode_long = 'amp-tooltips';
+ if ( self::$a_bool_amp_enabled ) {
+ $l_str_tooltip_mode_short = 'ampt';
+ $l_str_tooltip_mode_long = 'amp-tooltips';
- } elseif ( self::$alternative_tooltips_enabled ) {
- $tooltip_mode_short = 'altt';
- $tooltip_mode_long = 'alternative-tooltips';
+ } elseif ( self::$a_bool_alternative_tooltips_enabled ) {
+ $l_str_tooltip_mode_short = 'altt';
+ $l_str_tooltip_mode_long = 'alternative-tooltips';
} else {
- $tooltip_mode_short = 'jqtt';
- $tooltip_mode_long = 'jquery-tooltips';
+ $l_str_tooltip_mode_short = 'jqtt';
+ $l_str_tooltip_mode_long = 'jquery-tooltips';
}
} else {
- $tooltip_mode_short = 'nott';
- $tooltip_mode_long = 'no-tooltips';
+ $l_str_tooltip_mode_short = 'nott';
+ $l_str_tooltip_mode_long = 'no-tooltips';
}
// Set basic responsive page layout mode for use in stylesheet name.
- $page_layout_option = Footnotes_Settings::instance()->get( Footnotes_Settings::FOOTNOTES_PAGE_LAYOUT_SUPPORT );
- switch ( $page_layout_option ) {
+ $l_str_page_layout_option = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT );
+ switch ( $l_str_page_layout_option ) {
case 'reference-container':
- $layout_mode = '1';
+ $l_str_layout_mode = '1';
break;
case 'entry-content':
- $layout_mode = '2';
+ $l_str_layout_mode = '2';
break;
case 'main-content':
- $layout_mode = '3';
+ $l_str_layout_mode = '3';
break;
case 'none':
default:
- $layout_mode = '0';
+ $l_str_layout_mode = '0';
break;
}
// Enqueue the tailored united minified stylesheet.
wp_enqueue_style(
- 'mci-footnotes-' . $tooltip_mode_long . '-pagelayout-' . $page_layout_option,
+ 'mci-footnotes-' . $l_str_tooltip_mode_long . '-pagelayout-' . $l_str_page_layout_option,
plugins_url(
- Footnotes_Config::PLUGIN_NAME . '/css/footnotes-' . $tooltip_mode_short . 'brpl' . $layout_mode . '.min.css'
+ MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/footnotes-' . $l_str_tooltip_mode_short . 'brpl' . $l_str_layout_mode . '.min.css'
),
array(),
- FOOTNOTES_VERSION,
+ C_STR_FOOTNOTES_VERSION,
'all'
);
@@ -395,7 +395,7 @@ class Footnotes {
*/
wp_enqueue_style(
'mci-footnotes-common',
- plugins_url( Footnotes_Config::PLUGIN_NAME . '/css/dev-common.css' ),
+ plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-common.css' ),
array(),
filemtime(
plugin_dir_path(
@@ -405,7 +405,7 @@ class Footnotes {
);
wp_enqueue_style(
'mci-footnotes-tooltips',
- plugins_url( Footnotes_Config::PLUGIN_NAME . '/css/dev-tooltips.css' ),
+ plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-tooltips.css' ),
array(),
filemtime(
plugin_dir_path(
@@ -414,10 +414,10 @@ class Footnotes {
)
);
- if ( self::$amp_enabled ) {
+ if ( self::$a_bool_amp_enabled ) {
wp_enqueue_style(
'mci-footnotes-amp',
- plugins_url( Footnotes_Config::PLUGIN_NAME . '/css/dev-amp-tooltips.css' ),
+ plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-amp-tooltips.css' ),
array(),
filemtime(
plugin_dir_path(
@@ -427,10 +427,10 @@ class Footnotes {
);
}
- if ( self::$alternative_tooltips_enabled ) {
+ if ( self::$a_bool_alternative_tooltips_enabled ) {
wp_enqueue_style(
'mci-footnotes-alternative',
- plugins_url( Footnotes_Config::PLUGIN_NAME . '/css/dev-tooltips-alternative.css' ),
+ plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-tooltips-alternative.css' ),
array(),
filemtime(
plugin_dir_path(
@@ -440,18 +440,18 @@ class Footnotes {
);
}
- $page_layout_option = Footnotes_Settings::instance()->get( Footnotes_Settings::FOOTNOTES_PAGE_LAYOUT_SUPPORT );
- if ( 'none' !== $page_layout_option ) {
+ $l_str_page_layout_option = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT );
+ if ( 'none' !== $l_str_page_layout_option ) {
wp_enqueue_style(
- 'mci-footnotes-layout-' . $page_layout_option,
+ 'mci-footnotes-layout-' . $l_str_page_layout_option,
plugins_url(
- Footnotes_Config::PLUGIN_NAME . '/css/dev-layout-' . $page_layout_option . '.css'
+ MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-layout-' . $l_str_page_layout_option . '.css'
),
array(),
filemtime(
plugin_dir_path(
dirname( __FILE__, 1 )
- ) . 'css/dev-layout-' . $page_layout_option . '.css'
+ ) . 'css/dev-layout-' . $l_str_page_layout_option . '.css'
),
'all'
);
diff --git a/class/language.php b/class/language.php
index 8b52ad0..d7064da 100644
--- a/class/language.php
+++ b/class/language.php
@@ -15,7 +15,7 @@
*
* @since 1.5.0
*/
-class Footnotes_Language {
+class MCI_Footnotes_Language {
/**
* Register WordPress Hook.
@@ -23,7 +23,7 @@ class Footnotes_Language {
* @since 1.5.0
*/
public static function register_hooks() {
- add_action( 'plugins_loaded', array( 'Footnotes_Language', 'load_text_domain' ) );
+ add_action( 'plugins_loaded', array( 'MCI_Footnotes_Language', 'load_text_domain' ) );
}
/**
@@ -72,7 +72,7 @@ class Footnotes_Language {
* Loads a specific text domain.
*
* @since 1.5.1
- * @param string $language_code Language Code to load a specific text domain.
+ * @param string $p_str_language_code Language Code to load a specific text domain.
* @return bool
*
*
@@ -87,11 +87,11 @@ class Footnotes_Language {
* “The .mo file should be named based on the text domain with a dash, and then the locale exactly.”
* @see wp-includes/l10n.php:857
*/
- private static function load( $language_code ) {
+ private static function load( $p_str_language_code ) {
return load_plugin_textdomain(
- Footnotes_Config::PLUGIN_NAME,
+ MCI_Footnotes_Config::C_STR_PLUGIN_NAME,
false,
- Footnotes_Config::PLUGIN_NAME . '/languages'
+ MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/languages'
);
}
}
diff --git a/class/settings.php b/class/settings.php
index 2c8da3e..a54ff03 100644
--- a/class/settings.php
+++ b/class/settings.php
@@ -18,7 +18,7 @@
*
* @since 1.5.0
*/
-class Footnotes_Settings {
+class MCI_Footnotes_Settings {
/**
* Settings container key for the label of the reference container.
@@ -26,7 +26,7 @@ class Footnotes_Settings {
* @since 1.5.0
* @var str
*/
- const REFERENCE_CONTAINER_NAME = 'footnote_inputfield_references_label';
+ const C_STR_REFERENCE_CONTAINER_NAME = 'footnote_inputfield_references_label';
/**
* Settings container key to collapse the reference container by default.
@@ -34,9 +34,9 @@ class Footnotes_Settings {
* @since 1.5.0
* @var str
* The string is converted to Boolean false if 'no', true if 'yes'.
- * @see Footnotes_Convert::to_bool()
+ * @see MCI_Footnotes_Convert::to_bool()
*/
- const REFERENCE_CONTAINER_COLLAPSE = 'footnote_inputfield_collapse_references';
+ const C_STR_REFERENCE_CONTAINER_COLLAPSE = 'footnote_inputfield_collapse_references';
/**
* Settings container key for the position of the reference container.
@@ -44,7 +44,7 @@ class Footnotes_Settings {
* @since 1.5.0
* @var str
*/
- const REFERENCE_CONTAINER_POSITION = 'footnote_inputfield_reference_container_place';
+ const C_STR_REFERENCE_CONTAINER_POSITION = 'footnote_inputfield_reference_container_place';
/**
* Settings container key for combining identical footnotes.
@@ -52,7 +52,7 @@ class Footnotes_Settings {
* @since 1.5.0
* @var str
*/
- const COMBINE_IDENTICAL_FOOTNOTES = 'footnote_inputfield_combine_identical';
+ const C_STR_COMBINE_IDENTICAL_FOOTNOTES = 'footnote_inputfield_combine_identical';
/**
* Settings container key for the short code of the footnote’s start.
@@ -60,7 +60,7 @@ class Footnotes_Settings {
* @since 1.5.0
* @var str
*/
- const FOOTNOTES_SHORT_CODE_START = 'footnote_inputfield_placeholder_start';
+ const C_STR_FOOTNOTES_SHORT_CODE_START = 'footnote_inputfield_placeholder_start';
/**
* Settings container key for the short code of the footnote’s end.
@@ -68,7 +68,7 @@ class Footnotes_Settings {
* @since 1.5.0
* @var str
*/
- const FOOTNOTES_SHORT_CODE_END = 'footnote_inputfield_placeholder_end';
+ const C_STR_FOOTNOTES_SHORT_CODE_END = 'footnote_inputfield_placeholder_end';
/**
* Settings container key for the user-defined short code of the footnotes start.
@@ -76,7 +76,7 @@ class Footnotes_Settings {
* @since 1.5.0
* @var str
*/
- const FOOTNOTES_SHORT_CODE_START_USER_DEFINED = 'footnote_inputfield_placeholder_start_user_defined';
+ const C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED = 'footnote_inputfield_placeholder_start_user_defined';
/**
* Settings container key for the user-defined short code of the footnotes end.
@@ -84,7 +84,7 @@ class Footnotes_Settings {
* @since 1.5.0
* @var str
*/
- const FOOTNOTES_SHORT_CODE_END_USER_DEFINED = 'footnote_inputfield_placeholder_end_user_defined';
+ const C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED = 'footnote_inputfield_placeholder_end_user_defined';
/**
* Settings container key for the counter style of the footnotes.
@@ -92,7 +92,7 @@ class Footnotes_Settings {
* @since 1.5.0
* @var str
*/
- const FOOTNOTES_COUNTER_STYLE = 'footnote_inputfield_counter_style';
+ const C_STR_FOOTNOTES_COUNTER_STYLE = 'footnote_inputfield_counter_style';
/**
* Settings container key for the backlink symbol selection.
@@ -107,7 +107,7 @@ class Footnotes_Settings {
* @since 2.0.4
* @var str
*/
- const HYPERLINK_ARROW = 'footnote_inputfield_custom_hyperlink_symbol';
+ const C_STR_HYPERLINK_ARROW = 'footnote_inputfield_custom_hyperlink_symbol';
/**
* Settings container key for the user-defined backlink symbol.
@@ -115,7 +115,7 @@ class Footnotes_Settings {
* @since 1.5.0
* @var str
*/
- const HYPERLINK_ARROW_USER_DEFINED = 'footnote_inputfield_custom_hyperlink_symbol_user';
+ const C_STR_HYPERLINK_ARROW_USER_DEFINED = 'footnote_inputfield_custom_hyperlink_symbol_user';
/**
* Settings container key to look for footnotes in post excerpts.
@@ -130,10 +130,10 @@ class Footnotes_Settings {
* @link https://github.com/markcheret/footnotes/issues/65
*
* @since 2.7.0
- * @see EXPERT_LOOKUP_THE_EXCERPT
+ * @see C_STR_EXPERT_LOOKUP_THE_EXCERPT
* @var str Default 'manual'.
*/
- const FOOTNOTES_IN_EXCERPT = 'footnote_inputfield_search_in_excerpt';
+ const C_STR_FOOTNOTES_IN_EXCERPT = 'footnote_inputfield_search_in_excerpt';
/**
* Settings container key for the string before the footnote referrer.
@@ -148,7 +148,7 @@ class Footnotes_Settings {
* - for better UX thanks to a more button-like appearance;
* - for stylistic consistency with the expand-collapse button.
*/
- const FOOTNOTES_STYLING_BEFORE = 'footnote_inputfield_custom_styling_before';
+ const C_STR_FOOTNOTES_STYLING_BEFORE = 'footnote_inputfield_custom_styling_before';
/**
* Settings container key for the string after the footnote referrer.
@@ -156,7 +156,7 @@ class Footnotes_Settings {
* @since 1.5.0
* @var str
*/
- const FOOTNOTES_STYLING_AFTER = 'footnote_inputfield_custom_styling_after';
+ const C_STR_FOOTNOTES_STYLING_AFTER = 'footnote_inputfield_custom_styling_after';
/**
* Settings container key for the Custom CSS.
@@ -166,7 +166,7 @@ class Footnotes_Settings {
*
* @since 1.3.0 Adding: new settings tab for custom CSS settings.
*/
- const CUSTOM_CSS = 'footnote_inputfield_custom_css';
+ const C_STR_CUSTOM_CSS = 'footnote_inputfield_custom_css';
/**
* Settings container key for the 'I love footnotes' text.
@@ -174,7 +174,7 @@ class Footnotes_Settings {
* @since 1.5.0
* @var str
*/
- const FOOTNOTES_LOVE = 'footnote_inputfield_love';
+ const C_STR_FOOTNOTES_LOVE = 'footnote_inputfield_love';
/**
* Settings container key to enable the mouse-over box.
@@ -182,7 +182,7 @@ class Footnotes_Settings {
* @since 1.5.2
* @var str
*/
- const FOOTNOTES_MOUSE_OVER_BOX_ENABLED = 'footnote_inputfield_custom_mouse_over_box_enabled';
+ const C_STR_FOOTNOTES_MOUSE_OVER_BOX_ENABLED = 'footnote_inputfield_custom_mouse_over_box_enabled';
/**
* Settings container key to enable tooltip truncation.
@@ -194,7 +194,7 @@ class Footnotes_Settings {
* to raise awareness of the functionality and to prevent the screen
* from being filled at mouse-over, and to allow the Continue reading.
*/
- const FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED = 'footnote_inputfield_custom_mouse_over_box_excerpt_enabled';
+ const C_STR_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED = 'footnote_inputfield_custom_mouse_over_box_excerpt_enabled';
/**
* Settings container key for the mouse-over box to define the max. length of the enabled excerpt.
@@ -204,7 +204,7 @@ class Footnotes_Settings {
*
* @since 2.0.7 Increase default truncation length from 150 to 200 chars.
*/
- const FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH = 'footnote_inputfield_custom_mouse_over_box_excerpt_length';
+ const C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH = 'footnote_inputfield_custom_mouse_over_box_excerpt_length';
/**
* Settings container key to enable the 'the_title' hook.
@@ -223,7 +223,7 @@ class Footnotes_Settings {
* uses the title string in menus and in the title element, but
* Footnotes doesn’t delete footnotes therein.
*/
- const EXPERT_LOOKUP_THE_TITLE = 'footnote_inputfield_expert_lookup_the_title';
+ const C_STR_EXPERT_LOOKUP_THE_TITLE = 'footnote_inputfield_expert_lookup_the_title';
/**
* Settings container key to enable the 'the_content' hook.
@@ -231,7 +231,7 @@ class Footnotes_Settings {
* @since 1.5.5
* @var str
*/
- const EXPERT_LOOKUP_THE_CONTENT = 'footnote_inputfield_expert_lookup_the_content';
+ const C_STR_EXPERT_LOOKUP_THE_CONTENT = 'footnote_inputfield_expert_lookup_the_content';
/**
* Settings container key to enable the 'the_excerpt' hook.
@@ -255,10 +255,10 @@ class Footnotes_Settings {
* @link https://wordpress.org/support/topic/update-crashed-my-website-3/#post-14260969
*
* @since 2.6.5
- * @see FOOTNOTES_IN_EXCERPT
+ * @see C_STR_FOOTNOTES_IN_EXCERPT
* @var str
*/
- const EXPERT_LOOKUP_THE_EXCERPT = 'footnote_inputfield_expert_lookup_the_excerpt';
+ const C_STR_EXPERT_LOOKUP_THE_EXCERPT = 'footnote_inputfield_expert_lookup_the_excerpt';
/**
* Settings container key to enable the 'widget_title' hook.
@@ -266,7 +266,7 @@ class Footnotes_Settings {
* @since 1.5.5
* @var str
*/
- const EXPERT_LOOKUP_WIDGET_TITLE = 'footnote_inputfield_expert_lookup_widget_title';
+ const C_STR_EXPERT_LOOKUP_WIDGET_TITLE = 'footnote_inputfield_expert_lookup_widget_title';
/**
* Settings container key to enable the 'widget_text' hook.
@@ -279,7 +279,7 @@ class Footnotes_Settings {
* it must be enabled if multiple reference containers are desired, as
* in Elementor toggles.
*/
- const EXPERT_LOOKUP_WIDGET_TEXT = 'footnote_inputfield_expert_lookup_widget_text';
+ const C_STR_EXPERT_LOOKUP_WIDGET_TEXT = 'footnote_inputfield_expert_lookup_widget_text';
/**
* Settings container key for the Expert mode.
@@ -292,7 +292,7 @@ class Footnotes_Settings {
* Since the removal of the the_post hook, the tab is no danger zone any longer.
* All users, not experts only, need to be able to control relative positioning.
*/
- const FOOTNOTES_EXPERT_MODE = 'footnote_inputfield_enable_expert_mode';
+ const C_STR_FOOTNOTES_EXPERT_MODE = 'footnote_inputfield_enable_expert_mode';
/**
* Settings container key for the mouse-over box to define the color.
@@ -305,10 +305,10 @@ class Footnotes_Settings {
* @link https://wordpress.org/support/topic/tooltip-not-showing-on-dark-theme-with-white-text/
*
* @since 2.6.1
- * @see FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND
+ * @see C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND
* @var str
*/
- const FOOTNOTES_MOUSE_OVER_BOX_COLOR = 'footnote_inputfield_custom_mouse_over_box_color';
+ const C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR = 'footnote_inputfield_custom_mouse_over_box_color';
/**
* Settings container key for the mouse-over box to define the background color.
@@ -330,10 +330,10 @@ class Footnotes_Settings {
* But theme default background color doesn’t seem to exist.
* @link https://wordpress.org/support/topic/problem-with-footnotes-in-excerpts-of-the-blog-page/#post-14241849
* @since 2.6.1 default #ffffff again along with #000000 as font color.
- * @see FOOTNOTES_MOUSE_OVER_BOX_COLOR
+ * @see C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR
* @var str
*/
- const FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND = 'footnote_inputfield_custom_mouse_over_box_background';
+ const C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND = 'footnote_inputfield_custom_mouse_over_box_background';
/**
* Settings container key for the mouse-over box to define the border width.
@@ -341,7 +341,7 @@ class Footnotes_Settings {
* @since 1.5.6
* @var int
*/
- const FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH = 'footnote_inputfield_custom_mouse_over_box_border_width';
+ const C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH = 'footnote_inputfield_custom_mouse_over_box_border_width';
/**
* Settings container key for the mouse-over box to define the border color.
@@ -349,7 +349,7 @@ class Footnotes_Settings {
* @since 1.5.6
* @var str
*/
- const FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR = 'footnote_inputfield_custom_mouse_over_box_border_color';
+ const C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR = 'footnote_inputfield_custom_mouse_over_box_border_color';
/**
* Settings container key for the mouse-over box to define the border radius.
@@ -359,7 +359,7 @@ class Footnotes_Settings {
*
* @since 2.0.7 The mouse over box corners mustn’t be rounded as that is outdated.
*/
- const FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS = 'footnote_inputfield_custom_mouse_over_box_border_radius';
+ const C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS = 'footnote_inputfield_custom_mouse_over_box_border_radius';
/**
* Settings container key for the mouse-over box to define the max. width.
@@ -370,7 +370,7 @@ class Footnotes_Settings {
* @since 2.0.7 Set default width 450.
* The width should be limited to start with, for the box to have shape.
*/
- const FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH = 'footnote_inputfield_custom_mouse_over_box_max_width';
+ const C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH = 'footnote_inputfield_custom_mouse_over_box_max_width';
/**
* Settings container key for the mouse-over box to define the position.
@@ -382,7 +382,7 @@ class Footnotes_Settings {
* the box gets squeezed between note anchor at line end and window edge,
* and top because reading at the bottom of the window is more likely.
*/
- const FOOTNOTES_MOUSE_OVER_BOX_POSITION = 'footnote_inputfield_custom_mouse_over_box_position';
+ const C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION = 'footnote_inputfield_custom_mouse_over_box_position';
/**
* Settings container key for the mouse-over box to define the offset (x).
@@ -390,7 +390,7 @@ class Footnotes_Settings {
* @since 1.5.7
* @var int
*/
- const FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X = 'footnote_inputfield_custom_mouse_over_box_offset_x';
+ const C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X = 'footnote_inputfield_custom_mouse_over_box_offset_x';
/**
* Settings container key for the mouse-over box to define the offset (y).
@@ -401,7 +401,7 @@ class Footnotes_Settings {
* The vertical offset must be negative for the box not to cover
* The current line of text (web coordinates origin is top left).
*/
- const FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y = 'footnote_inputfield_custom_mouse_over_box_offset_y';
+ const C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y = 'footnote_inputfield_custom_mouse_over_box_offset_y';
/**
* Settings container key for the mouse-over box to define the box-shadow color.
@@ -409,7 +409,7 @@ class Footnotes_Settings {
* @since 1.5.8
* @var str
*/
- const FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR = 'footnote_inputfield_custom_mouse_over_box_shadow_color';
+ const C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR = 'footnote_inputfield_custom_mouse_over_box_shadow_color';
/**
* Settings container key for the label of the Read-on button in truncated tooltips.
@@ -422,7 +422,7 @@ class Footnotes_Settings {
* @since 2.1.0
* @var str
*/
- const FOOTNOTES_TOOLTIP_READON_LABEL = 'footnote_inputfield_readon_label';
+ const C_STR_FOOTNOTES_TOOLTIP_READON_LABEL = 'footnote_inputfield_readon_label';
/**
* Settings container key to enable the alternative tooltips.
@@ -440,7 +440,7 @@ class Footnotes_Settings {
* and onmouseout arguments, along with CSS transitions for fade-in/out.
* The very small script is inserted after Footnotes’ internal stylesheet.
*/
- const FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE = 'footnote_inputfield_custom_mouse_over_box_alternative';
+ const C_STR_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE = 'footnote_inputfield_custom_mouse_over_box_alternative';
/**
* Settings container key for the referrer element.
@@ -453,7 +453,7 @@ class Footnotes_Settings {
* @since 2.1.1
* @var str
*/
- const FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS = 'footnotes_inputfield_referrer_superscript_tags';
+ const C_STR_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS = 'footnotes_inputfield_referrer_superscript_tags';
/**
* Settings container key to enable the display of a backlink symbol.
@@ -466,7 +466,7 @@ class Footnotes_Settings {
* @since 2.1.1
* @var str
*/
- const REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE = 'footnotes_inputfield_reference_container_backlink_symbol_enable';
+ const C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE = 'footnotes_inputfield_reference_container_backlink_symbol_enable';
/**
* Settings container key to not display the reference container on the homepage.
@@ -479,7 +479,7 @@ class Footnotes_Settings {
* @since 2.1.1
* @var str
*/
- const REFERENCE_CONTAINER_START_PAGE_ENABLE = 'footnotes_inputfield_reference_container_start_page_enable';
+ const C_STR_REFERENCE_CONTAINER_START_PAGE_ENABLE = 'footnotes_inputfield_reference_container_start_page_enable';
/**
* Settings container key to enable the legacy layout of the reference container.
@@ -489,7 +489,7 @@ class Footnotes_Settings {
* @since 2.1.1
* @var str
*/
- const REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE = 'footnotes_inputfield_reference_container_3column_layout_enable';
+ const C_STR_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE = 'footnotes_inputfield_reference_container_3column_layout_enable';
/**
* Settings container key to get the backlink symbol switch side.
@@ -502,7 +502,7 @@ class Footnotes_Settings {
* @since 2.1.1
* @var str
*/
- const REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH = 'footnotes_inputfield_reference_container_backlink_symbol_switch';
+ const C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH = 'footnotes_inputfield_reference_container_backlink_symbol_switch';
/**
* Settings container key for 'the_content' hook priority level.
@@ -545,14 +545,14 @@ class Footnotes_Settings {
* features added by other plugins, e.g. related post lists and social buttons.
*
* For YARPP to display related posts below the Footnotes reference container,
- * priority needs to be at least 1200 (i.e. 0 =< $the_content_priority =< 1200).
+ * priority needs to be at least 1200 (i.e. 0 =< $l_int_the_content_priority =< 1200).
*
* PHP_INT_MAX cannot be reset by leaving the number box empty. because browsers
* (WebKit) don’t allow it, so we must resort to -1.
* @link https://github.com/Modernizr/Modernizr/issues/171
* @var int
*/
- const EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL = 'footnote_inputfield_expert_lookup_the_content_priority_level';
+ const C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL = 'footnote_inputfield_expert_lookup_the_content_priority_level';
/**
* Settings container key for 'the_title' hook priority level.
@@ -565,7 +565,7 @@ class Footnotes_Settings {
* @since 2.1.2
* @var int
*/
- const EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL = 'footnote_inputfield_expert_lookup_the_title_priority_level';
+ const C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL = 'footnote_inputfield_expert_lookup_the_title_priority_level';
/**
* Settings container key for 'widget_title' hook priority level.
@@ -573,7 +573,7 @@ class Footnotes_Settings {
* @since 2.1.2
* @var int
*/
- const EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL = 'footnote_inputfield_expert_lookup_widget_title_priority_level';
+ const C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL = 'footnote_inputfield_expert_lookup_widget_title_priority_level';
/**
* Settings container key for 'widget_text' hook priority level.
@@ -581,7 +581,7 @@ class Footnotes_Settings {
* @since 2.1.2
* @var int
*/
- const EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL = 'footnote_inputfield_expert_lookup_widget_text_priority_level';
+ const C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL = 'footnote_inputfield_expert_lookup_widget_text_priority_level';
/**
* Settings container key for 'the_excerpt' hook priority level.
@@ -589,7 +589,7 @@ class Footnotes_Settings {
* @since 2.1.2
* @var int
*/
- const EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL = 'footnote_inputfield_expert_lookup_the_excerpt_priority_level';
+ const C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL = 'footnote_inputfield_expert_lookup_the_excerpt_priority_level';
/**
* Settings container key for the link element option.
@@ -602,7 +602,7 @@ class Footnotes_Settings {
* @since 2.1.4
* @var str
*/
- const LINK_ELEMENT_ENABLED = 'footnote_inputfield_link_element_enabled';
+ const C_STR_LINK_ELEMENT_ENABLED = 'footnote_inputfield_link_element_enabled';
/**
* Settings container key to enable the presence of a backlink separator.
@@ -618,7 +618,7 @@ class Footnotes_Settings {
* Backlink separators and terminators are often not preferred.
* But a choice must be provided along with the ability to customize.
*/
- const BACKLINKS_SEPARATOR_ENABLED = 'footnotes_inputfield_backlinks_separator_enabled';
+ const C_STR_BACKLINKS_SEPARATOR_ENABLED = 'footnotes_inputfield_backlinks_separator_enabled';
/**
* Settings container key for the backlink separator options.
@@ -626,7 +626,7 @@ class Footnotes_Settings {
* @since 2.1.4
* @var str
*/
- const BACKLINKS_SEPARATOR_OPTION = 'footnotes_inputfield_backlinks_separator_option';
+ const C_STR_BACKLINKS_SEPARATOR_OPTION = 'footnotes_inputfield_backlinks_separator_option';
/**
* Settings container key for a custom backlink separator.
@@ -634,7 +634,7 @@ class Footnotes_Settings {
* @since 2.1.4
* @var str
*/
- const BACKLINKS_SEPARATOR_CUSTOM = 'footnotes_inputfield_backlinks_separator_custom';
+ const C_STR_BACKLINKS_SEPARATOR_CUSTOM = 'footnotes_inputfield_backlinks_separator_custom';
/**
* Settings container key to enable the presence of a backlink terminator.
@@ -642,7 +642,7 @@ class Footnotes_Settings {
* @since 2.1.4
* @var str
*/
- const BACKLINKS_TERMINATOR_ENABLED = 'footnotes_inputfield_backlinks_terminator_enabled';
+ const C_STR_BACKLINKS_TERMINATOR_ENABLED = 'footnotes_inputfield_backlinks_terminator_enabled';
/**
* Settings container key for the backlink terminator options.
@@ -650,7 +650,7 @@ class Footnotes_Settings {
* @since 2.1.4
* @var str
*/
- const BACKLINKS_TERMINATOR_OPTION = 'footnotes_inputfield_backlinks_terminator_option';
+ const C_STR_BACKLINKS_TERMINATOR_OPTION = 'footnotes_inputfield_backlinks_terminator_option';
/**
* Settings container key for a custom backlink terminator.
@@ -658,7 +658,7 @@ class Footnotes_Settings {
* @since 2.1.4
* @var str
*/
- const BACKLINKS_TERMINATOR_CUSTOM = 'footnotes_inputfield_backlinks_terminator_custom';
+ const C_STR_BACKLINKS_TERMINATOR_CUSTOM = 'footnotes_inputfield_backlinks_terminator_custom';
/**
* Settings container key to enable the backlinks column width.
@@ -666,7 +666,7 @@ class Footnotes_Settings {
* @since 2.1.4
* @var str
*/
- const BACKLINKS_COLUMN_WIDTH_ENABLED = 'footnotes_inputfield_backlinks_column_width_enabled';
+ const C_STR_BACKLINKS_COLUMN_WIDTH_ENABLED = 'footnotes_inputfield_backlinks_column_width_enabled';
/**
* Settings container key for the backlinks column width scalar.
@@ -674,7 +674,7 @@ class Footnotes_Settings {
* @since 2.1.4
* @var int
*/
- const BACKLINKS_COLUMN_WIDTH_SCALAR = 'footnotes_inputfield_backlinks_column_width_scalar';
+ const C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR = 'footnotes_inputfield_backlinks_column_width_scalar';
/**
* Settings container key for the backlinks column width unit.
@@ -682,7 +682,7 @@ class Footnotes_Settings {
* @since 2.1.4
* @var str
*/
- const BACKLINKS_COLUMN_WIDTH_UNIT = 'footnotes_inputfield_backlinks_column_width_unit';
+ const C_STR_BACKLINKS_COLUMN_WIDTH_UNIT = 'footnotes_inputfield_backlinks_column_width_unit';
/**
* Settings container key to enable a max width for the backlinks column.
@@ -690,7 +690,7 @@ class Footnotes_Settings {
* @since 2.1.4
* @var str
*/
- const BACKLINKS_COLUMN_MAX_WIDTH_ENABLED = 'footnotes_inputfield_backlinks_column_max_width_enabled';
+ const C_STR_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED = 'footnotes_inputfield_backlinks_column_max_width_enabled';
/**
* Settings container key for the backlinks column max width scalar.
@@ -698,7 +698,7 @@ class Footnotes_Settings {
* @since 2.1.4
* @var int
*/
- const BACKLINKS_COLUMN_MAX_WIDTH_SCALAR = 'footnotes_inputfield_backlinks_column_max_width_scalar';
+ const C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR = 'footnotes_inputfield_backlinks_column_max_width_scalar';
/**
* Settings container key for the backlinks column max width unit.
@@ -706,7 +706,7 @@ class Footnotes_Settings {
* @since 2.1.4
* @var str
*/
- const BACKLINKS_COLUMN_MAX_WIDTH_UNIT = 'footnotes_inputfield_backlinks_column_max_width_unit';
+ const C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT = 'footnotes_inputfield_backlinks_column_max_width_unit';
/**
* Settings container key to enable line breaks between backlinks.
@@ -715,7 +715,7 @@ class Footnotes_Settings {
* @var str
* Whether a tag is inserted.
*/
- const BACKLINKS_LINE_BREAKS_ENABLED = 'footnotes_inputfield_backlinks_line_breaks_enabled';
+ const C_STR_BACKLINKS_LINE_BREAKS_ENABLED = 'footnotes_inputfield_backlinks_line_breaks_enabled';
/**
* Settings container key to enable setting the tooltip font size.
@@ -727,7 +727,7 @@ class Footnotes_Settings {
* Was set to inherit since 2.1.1 as it overrode custom CSS,
* Called mouse over box not tooltip for consistency.
*/
- const MOUSE_OVER_BOX_FONT_SIZE_ENABLED = 'footnotes_inputfield_mouse_over_box_font_size_enabled';
+ const C_STR_MOUSE_OVER_BOX_FONT_SIZE_ENABLED = 'footnotes_inputfield_mouse_over_box_font_size_enabled';
/**
* Settings container key for the scalar value of the tooltip font size.
@@ -735,7 +735,7 @@ class Footnotes_Settings {
* @since 2.1.4
* @var flo
*/
- const MOUSE_OVER_BOX_FONT_SIZE_SCALAR = 'footnotes_inputfield_mouse_over_box_font_size_scalar';
+ const C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR = 'footnotes_inputfield_mouse_over_box_font_size_scalar';
/**
* Settings container key for the unit of the tooltip font size.
@@ -743,7 +743,7 @@ class Footnotes_Settings {
* @since 2.1.4
* @var str
*/
- const MOUSE_OVER_BOX_FONT_SIZE_UNIT = 'footnotes_inputfield_mouse_over_box_font_size_unit';
+ const C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT = 'footnotes_inputfield_mouse_over_box_font_size_unit';
/**
* Settings container key for basic responsive page layout support options.
@@ -752,7 +752,7 @@ class Footnotes_Settings {
* @var str
* Whether to concatenate an additional stylesheet.
*/
- const FOOTNOTES_PAGE_LAYOUT_SUPPORT = 'footnotes_inputfield_page_layout_support';
+ const C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT = 'footnotes_inputfield_page_layout_support';
/**
* Settings container key for scroll offset.
@@ -762,7 +762,7 @@ class Footnotes_Settings {
* @since 2.1.4
* @var int
*/
- const FOOTNOTES_SCROLL_OFFSET = 'footnotes_inputfield_scroll_offset';
+ const C_INT_FOOTNOTES_SCROLL_OFFSET = 'footnotes_inputfield_scroll_offset';
/**
* Settings container key for scroll duration.
@@ -772,7 +772,7 @@ class Footnotes_Settings {
* @since 2.1.4
* @var int
*/
- const FOOTNOTES_SCROLL_DURATION = 'footnotes_inputfield_scroll_duration';
+ const C_INT_FOOTNOTES_SCROLL_DURATION = 'footnotes_inputfield_scroll_duration';
/**
* Settings container key for tooltip display fade-in delay.
@@ -780,7 +780,7 @@ class Footnotes_Settings {
* @since 2.1.4
* @var int
*/
- const MOUSE_OVER_BOX_FADE_IN_DELAY = 'footnotes_inputfield_mouse_over_box_fade_in_delay';
+ const C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY = 'footnotes_inputfield_mouse_over_box_fade_in_delay';
/**
* Settings container key for tooltip display fade-in duration.
@@ -788,7 +788,7 @@ class Footnotes_Settings {
* @since 2.1.4
* @var int
*/
- const MOUSE_OVER_BOX_FADE_IN_DURATION = 'footnotes_inputfield_mouse_over_box_fade_in_duration';
+ const C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION = 'footnotes_inputfield_mouse_over_box_fade_in_duration';
/**
* Settings container key for tooltip display fade-out delay.
@@ -796,7 +796,7 @@ class Footnotes_Settings {
* @since 2.1.4
* @var int
*/
- const MOUSE_OVER_BOX_FADE_OUT_DELAY = 'footnotes_inputfield_mouse_over_box_fade_out_delay';
+ const C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY = 'footnotes_inputfield_mouse_over_box_fade_out_delay';
/**
* Settings container key for tooltip display fade-out duration.
@@ -804,7 +804,7 @@ class Footnotes_Settings {
* @since 2.1.4
* @var int
*/
- const MOUSE_OVER_BOX_FADE_OUT_DURATION = 'footnotes_inputfield_mouse_over_box_fade_out_duration';
+ const C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION = 'footnotes_inputfield_mouse_over_box_fade_out_duration';
/**
* Settings container key for URL wrap option.
@@ -815,7 +815,7 @@ class Footnotes_Settings {
* @since 2.1.6
* @var str
*/
- const FOOTNOTE_URL_WRAP_ENABLED = 'footnote_inputfield_url_wrap_enabled';
+ const C_STR_FOOTNOTE_URL_WRAP_ENABLED = 'footnote_inputfield_url_wrap_enabled';
/**
* Settings container key for reference container position shortcode.
@@ -828,7 +828,7 @@ class Footnotes_Settings {
* @since 2.2.0
* @var str
*/
- const REFERENCE_CONTAINER_POSITION_SHORTCODE = 'footnote_inputfield_reference_container_position_shortcode';
+ const C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE = 'footnote_inputfield_reference_container_position_shortcode';
/**
* Settings container key for the Custom CSS migrated to a dedicated tab.
@@ -838,7 +838,7 @@ class Footnotes_Settings {
* @since 2.2.2
* @var str
*/
- const CUSTOM_CSS_NEW = 'footnote_inputfield_custom_css_new';
+ const C_STR_CUSTOM_CSS_NEW = 'footnote_inputfield_custom_css_new';
/**
* Settings container key to enable display of legacy Custom CSS metaboxes.
@@ -853,7 +853,7 @@ class Footnotes_Settings {
* The Boolean must be false if its setting is contained in the container to be hidden,
* because when saving, all missing constants are emptied, and to_bool() converts empty to false.
*/
- const CUSTOM_CSS_LEGACY_ENABLE = 'footnote_inputfield_custom_css_legacy_enable';
+ const C_STR_CUSTOM_CSS_LEGACY_ENABLE = 'footnote_inputfield_custom_css_legacy_enable';
/**
* Settings container key for alternative tooltip position.
@@ -863,7 +863,7 @@ class Footnotes_Settings {
*
* Fixed width is for alternative tooltips, cannot reuse max-width nor offsets.
*/
- const FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION = 'footnotes_inputfield_alternative_mouse_over_box_position';
+ const C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION = 'footnotes_inputfield_alternative_mouse_over_box_position';
/**
* Settings container key for alternative tooltip x offset.
@@ -871,7 +871,7 @@ class Footnotes_Settings {
* @since 2.2.5
* @var int
*/
- const FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X = 'footnotes_inputfield_alternative_mouse_over_box_offset_x';
+ const C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X = 'footnotes_inputfield_alternative_mouse_over_box_offset_x';
/**
* Settings container key for alternative tooltip y offset.
@@ -879,7 +879,7 @@ class Footnotes_Settings {
* @since 2.2.5
* @var int
*/
- const FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y = 'footnotes_inputfield_alternative_mouse_over_box_offset_y';
+ const C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y = 'footnotes_inputfield_alternative_mouse_over_box_offset_y';
/**
* Settings container key for alternative tooltip width.
@@ -887,7 +887,7 @@ class Footnotes_Settings {
* @since 2.2.5
* @var int
*/
- const FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH = 'footnotes_inputfield_alternative_mouse_over_box_width';
+ const C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH = 'footnotes_inputfield_alternative_mouse_over_box_width';
/**
@@ -901,7 +901,7 @@ class Footnotes_Settings {
* @since 2.2.5
* @var str
*/
- const REFERENCE_CONTAINER_LABEL_ELEMENT = 'footnotes_inputfield_reference_container_label_element';
+ const C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT = 'footnotes_inputfield_reference_container_label_element';
/**
* Settings container key to enable the reference container label bottom border.
@@ -914,7 +914,7 @@ class Footnotes_Settings {
* @since 2.2.5
* @var str
*/
- const REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER = 'footnotes_inputfield_reference_container_label_bottom_border';
+ const C_STR_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER = 'footnotes_inputfield_reference_container_label_bottom_border';
/**
* Settings container key to enable reference container table row borders.
@@ -927,7 +927,7 @@ class Footnotes_Settings {
* @since 2.2.10
* @var str
*/
- const REFERENCE_CONTAINER_ROW_BORDERS_ENABLE = 'footnotes_inputfield_reference_container_row_borders_enable';
+ const C_STR_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE = 'footnotes_inputfield_reference_container_row_borders_enable';
/**
* Settings container key for reference container top margin.
@@ -940,7 +940,7 @@ class Footnotes_Settings {
* @since 2.3.0
* @var int
*/
- const REFERENCE_CONTAINER_TOP_MARGIN = 'footnotes_inputfield_reference_container_top_margin';
+ const C_INT_REFERENCE_CONTAINER_TOP_MARGIN = 'footnotes_inputfield_reference_container_top_margin';
/**
* Settings container key for reference container bottom margin.
@@ -953,7 +953,7 @@ class Footnotes_Settings {
* @since 2.3.0
* @var int
*/
- const REFERENCE_CONTAINER_BOTTOM_MARGIN = 'footnotes_inputfield_reference_container_bottom_margin';
+ const C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN = 'footnotes_inputfield_reference_container_bottom_margin';
/**
* Settings container key to enable hard links.
@@ -971,7 +971,7 @@ class Footnotes_Settings {
*
* When the alternative reference container is enabled, hard links are too.
*/
- const FOOTNOTES_HARD_LINKS_ENABLE = 'footnotes_inputfield_hard_links_enable';
+ const C_STR_FOOTNOTES_HARD_LINKS_ENABLE = 'footnotes_inputfield_hard_links_enable';
/**
* Settings container key for the fragment ID slug in referrers.
@@ -979,7 +979,7 @@ class Footnotes_Settings {
* @since 2.3.0
* @var str
*/
- const REFERRER_FRAGMENT_ID_SLUG = 'footnotes_inputfield_referrer_fragment_id_slug';
+ const C_STR_REFERRER_FRAGMENT_ID_SLUG = 'footnotes_inputfield_referrer_fragment_id_slug';
/**
* Settings container key for the fragment ID slug in footnotes.
@@ -987,7 +987,7 @@ class Footnotes_Settings {
* @since 2.3.0
* @var str
*/
- const FOOTNOTE_FRAGMENT_ID_SLUG = 'footnotes_inputfield_footnote_fragment_id_slug';
+ const C_STR_FOOTNOTE_FRAGMENT_ID_SLUG = 'footnotes_inputfield_footnote_fragment_id_slug';
/**
* Settings container key for the ID separator in fragment IDs.
@@ -995,7 +995,7 @@ class Footnotes_Settings {
* @since 2.3.0
* @var str
*/
- const HARD_LINK_IDS_SEPARATOR = 'footnotes_inputfield_hard_link_ids_separator';
+ const C_STR_HARD_LINK_IDS_SEPARATOR = 'footnotes_inputfield_hard_link_ids_separator';
/**
* Settings container key to enable shortcode syntax validation.
@@ -1003,7 +1003,7 @@ class Footnotes_Settings {
* @since 2.4.0
* @var str
*/
- const FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE = 'footnotes_inputfield_shortcode_syntax_validation_enable';
+ const C_STR_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE = 'footnotes_inputfield_shortcode_syntax_validation_enable';
/**
* Settings container key to enable backlink tooltips.
@@ -1021,7 +1021,7 @@ class Footnotes_Settings {
* This tooltip hints to use the backbutton instead, so the history gets streamlined again.
* @link https://wordpress.org/support/topic/making-it-amp-compatible/#post-13837359
*/
- const FOOTNOTES_BACKLINK_TOOLTIP_ENABLE = 'footnotes_inputfield_backlink_tooltip_enable';
+ const C_STR_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE = 'footnotes_inputfield_backlink_tooltip_enable';
/**
* Settings container key to configure the backlink tooltip.
@@ -1034,7 +1034,7 @@ class Footnotes_Settings {
* @since 2.5.4
* @var str
*/
- const FOOTNOTES_BACKLINK_TOOLTIP_TEXT = 'footnotes_inputfield_backlink_tooltip_text';
+ const C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT = 'footnotes_inputfield_backlink_tooltip_text';
/**
* Settings container key to configure the tooltip excerpt delimiter.
@@ -1055,7 +1055,7 @@ class Footnotes_Settings {
* the footnote text separating the tooltip text from the note.
* That is consistent with what WordPress does for excerpts.
*/
- const FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER = 'footnotes_inputfield_tooltip_excerpt_delimiter';
+ const C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER = 'footnotes_inputfield_tooltip_excerpt_delimiter';
/**
* Settings container key to enable mirroring the tooltip excerpt in the reference container.
@@ -1069,7 +1069,7 @@ class Footnotes_Settings {
* But this must not be the default behavior.
* @link https://wordpress.org/support/topic/change-tooltip-text/#post-13935488
*/
- const FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE = 'footnotes_inputfield_tooltip_excerpt_mirror_enable';
+ const C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE = 'footnotes_inputfield_tooltip_excerpt_mirror_enable';
/**
* Settings container key to configure the tooltip excerpt separator in the reference container.
@@ -1077,7 +1077,7 @@ class Footnotes_Settings {
* @since 2.5.4
* @var str
*/
- const FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR = 'footnotes_inputfield_tooltip_excerpt_mirror_separator';
+ const C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR = 'footnotes_inputfield_tooltip_excerpt_mirror_separator';
/**
* Settings container key to enable superscript style normalization.
@@ -1090,7 +1090,7 @@ class Footnotes_Settings {
* @since 2.5.4
* @var str
*/
- const FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT = 'footnotes_inputfield_referrers_normal_superscript';
+ const C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT = 'footnotes_inputfield_referrers_normal_superscript';
/**
* Settings container key to select the script mode for the reference container.
@@ -1103,7 +1103,7 @@ class Footnotes_Settings {
* @since 2.5.6
* @var str
*/
- const FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE = 'footnotes_inputfield_reference_container_script_mode';
+ const C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE = 'footnotes_inputfield_reference_container_script_mode';
/**
* Settings container key to enable AMP compatibility mode.
@@ -1124,7 +1124,7 @@ class Footnotes_Settings {
* @since 2.6.0 (release)
* @var str
*/
- const FOOTNOTES_AMP_COMPATIBILITY_ENABLE = 'footnotes_inputfield_amp_compatibility_enable';
+ const C_STR_FOOTNOTES_AMP_COMPATIBILITY_ENABLE = 'footnotes_inputfield_amp_compatibility_enable';
/**
* Settings container key for scroll duration asymmetricity.
@@ -1132,7 +1132,7 @@ class Footnotes_Settings {
* @since 2.5.11
* @var str
*/
- const FOOTNOTES_SCROLL_DURATION_ASYMMETRICITY = 'footnotes_inputfield_scroll_duration_asymmetricity';
+ const C_STR_FOOTNOTES_SCROLL_DURATION_ASYMMETRICITY = 'footnotes_inputfield_scroll_duration_asymmetricity';
/**
* Settings container key for scroll down duration.
@@ -1140,7 +1140,7 @@ class Footnotes_Settings {
* @since 2.5.11
* @var int
*/
- const FOOTNOTES_SCROLL_DOWN_DURATION = 'footnotes_inputfield_scroll_down_duration';
+ const C_INT_FOOTNOTES_SCROLL_DOWN_DURATION = 'footnotes_inputfield_scroll_down_duration';
/**
* Settings container key for scroll down delay.
@@ -1148,7 +1148,7 @@ class Footnotes_Settings {
* @since 2.5.11
* @var int
*/
- const FOOTNOTES_SCROLL_DOWN_DELAY = 'footnotes_inputfield_scroll_down_delay';
+ const C_INT_FOOTNOTES_SCROLL_DOWN_DELAY = 'footnotes_inputfield_scroll_down_delay';
/**
* Settings container key for scroll up delay.
@@ -1156,7 +1156,7 @@ class Footnotes_Settings {
* @since 2.5.11
* @var int
*/
- const FOOTNOTES_SCROLL_UP_DELAY = 'footnotes_inputfield_scroll_up_delay';
+ const C_INT_FOOTNOTES_SCROLL_UP_DELAY = 'footnotes_inputfield_scroll_up_delay';
/**
* Settings container key to set the solution of the input element label issue.
@@ -1169,7 +1169,7 @@ class Footnotes_Settings {
* append them, or disconnecting this label from the input element (discouraged).
* @link https://wordpress.org/support/topic/compatibility-issue-with-wpforms/#post-14212318
*/
- const FOOTNOTES_LABEL_ISSUE_SOLUTION = 'footnotes_inputfield_label_issue_solution';
+ const C_STR_FOOTNOTES_LABEL_ISSUE_SOLUTION = 'footnotes_inputfield_label_issue_solution';
/**
* Settings container key to enable CSS smooth scrolling.
@@ -1186,7 +1186,7 @@ class Footnotes_Settings {
* @var str
* Native smooth scrolling only works in recent browsers.
*/
- const FOOTNOTES_CSS_SMOOTH_SCROLLING = 'footnotes_inputfield_css_smooth_scrolling';
+ const C_STR_FOOTNOTES_CSS_SMOOTH_SCROLLING = 'footnotes_inputfield_css_smooth_scrolling';
/**
* Settings container key for the footnote section shortcode.
@@ -1199,7 +1199,7 @@ class Footnotes_Settings {
* @since 2.7.0
* @var str
*/
- const FOOTNOTE_SECTION_SHORTCODE = 'footnotes_inputfield_section_shortcode';
+ const C_STR_FOOTNOTE_SECTION_SHORTCODE = 'footnotes_inputfield_section_shortcode';
/**
@@ -1210,9 +1210,9 @@ class Footnotes_Settings {
* Stores a singleton reference of this class.
*
* @since 1.5.0
- * @var Footnotes_Settings
+ * @var MCI_Footnotes_Settings
*/
- private static $instance = null;
+ private static $a_obj_instance = null;
/**
* Contains all Settings Container names.
@@ -1225,7 +1225,7 @@ class Footnotes_Settings {
*
* These are the storage container names, one per dashboard tab.
*/
- private $container = array(
+ private $a_arr_container = array(
'footnotes_storage',
'footnotes_storage_custom',
'footnotes_storage_expert',
@@ -1240,86 +1240,86 @@ class Footnotes_Settings {
*
* Comments are moved to constant docblocks.
*/
- private $default = array(
+ private $a_arr_default = array(
// General settings.
'footnotes_storage' => array(
// AMP compatibility.
- self::FOOTNOTES_AMP_COMPATIBILITY_ENABLE => '',
+ self::C_STR_FOOTNOTES_AMP_COMPATIBILITY_ENABLE => '',
// Footnote start and end short codes.
- self::FOOTNOTES_SHORT_CODE_START => '((',
- self::FOOTNOTES_SHORT_CODE_END => '))',
- self::FOOTNOTES_SHORT_CODE_START_USER_DEFINED => '',
- self::FOOTNOTES_SHORT_CODE_END_USER_DEFINED => '',
- self::FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE => 'yes',
+ self::C_STR_FOOTNOTES_SHORT_CODE_START => '((',
+ self::C_STR_FOOTNOTES_SHORT_CODE_END => '))',
+ self::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED => '',
+ self::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED => '',
+ self::C_STR_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE => 'yes',
// Footnotes numbering.
- self::FOOTNOTES_COUNTER_STYLE => 'arabic_plain',
- self::COMBINE_IDENTICAL_FOOTNOTES => 'yes',
+ self::C_STR_FOOTNOTES_COUNTER_STYLE => 'arabic_plain',
+ self::C_STR_COMBINE_IDENTICAL_FOOTNOTES => 'yes',
// Scrolling behavior.
- self::FOOTNOTES_CSS_SMOOTH_SCROLLING => 'no',
- self::FOOTNOTES_SCROLL_OFFSET => 20,
- self::FOOTNOTES_SCROLL_DURATION => 380,
- self::FOOTNOTES_SCROLL_DURATION_ASYMMETRICITY => 'no',
- self::FOOTNOTES_SCROLL_DOWN_DURATION => 150,
- self::FOOTNOTES_SCROLL_DOWN_DELAY => 0,
- self::FOOTNOTES_SCROLL_UP_DELAY => 0,
- self::FOOTNOTES_HARD_LINKS_ENABLE => 'no',
- self::REFERRER_FRAGMENT_ID_SLUG => 'r',
- self::FOOTNOTE_FRAGMENT_ID_SLUG => 'f',
- self::HARD_LINK_IDS_SEPARATOR => '+',
- self::FOOTNOTES_BACKLINK_TOOLTIP_ENABLE => 'yes',
- self::FOOTNOTES_BACKLINK_TOOLTIP_TEXT => 'Alt+ ←',
+ self::C_STR_FOOTNOTES_CSS_SMOOTH_SCROLLING => 'no',
+ self::C_INT_FOOTNOTES_SCROLL_OFFSET => 20,
+ self::C_INT_FOOTNOTES_SCROLL_DURATION => 380,
+ self::C_STR_FOOTNOTES_SCROLL_DURATION_ASYMMETRICITY => 'no',
+ self::C_INT_FOOTNOTES_SCROLL_DOWN_DURATION => 150,
+ self::C_INT_FOOTNOTES_SCROLL_DOWN_DELAY => 0,
+ self::C_INT_FOOTNOTES_SCROLL_UP_DELAY => 0,
+ self::C_STR_FOOTNOTES_HARD_LINKS_ENABLE => 'no',
+ self::C_STR_REFERRER_FRAGMENT_ID_SLUG => 'r',
+ self::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG => 'f',
+ self::C_STR_HARD_LINK_IDS_SEPARATOR => '+',
+ self::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE => 'yes',
+ self::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT => 'Alt+ ←',
// Reference container.
- self::REFERENCE_CONTAINER_NAME => 'References',
- self::REFERENCE_CONTAINER_LABEL_ELEMENT => 'p',
- self::REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER => 'yes',
- self::REFERENCE_CONTAINER_COLLAPSE => 'no',
- self::FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE => 'jquery',
- self::REFERENCE_CONTAINER_POSITION => 'post_end',
- self::REFERENCE_CONTAINER_POSITION_SHORTCODE => '[[references]]',
- self::FOOTNOTE_SECTION_SHORTCODE => '[[/footnotesection]]',
- self::REFERENCE_CONTAINER_START_PAGE_ENABLE => 'yes',
- self::REFERENCE_CONTAINER_TOP_MARGIN => 24,
- self::REFERENCE_CONTAINER_BOTTOM_MARGIN => 0,
- self::FOOTNOTES_PAGE_LAYOUT_SUPPORT => 'none',
- self::FOOTNOTE_URL_WRAP_ENABLED => 'yes',
- self::REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE => 'yes',
- self::REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH => 'no',
- self::REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE => 'no',
- self::REFERENCE_CONTAINER_ROW_BORDERS_ENABLE => 'no',
+ self::C_STR_REFERENCE_CONTAINER_NAME => 'References',
+ self::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT => 'p',
+ self::C_STR_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER => 'yes',
+ self::C_STR_REFERENCE_CONTAINER_COLLAPSE => 'no',
+ self::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE => 'jquery',
+ self::C_STR_REFERENCE_CONTAINER_POSITION => 'post_end',
+ self::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE => '[[references]]',
+ self::C_STR_FOOTNOTE_SECTION_SHORTCODE => '[[/footnotesection]]',
+ self::C_STR_REFERENCE_CONTAINER_START_PAGE_ENABLE => 'yes',
+ self::C_INT_REFERENCE_CONTAINER_TOP_MARGIN => 24,
+ self::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN => 0,
+ self::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT => 'none',
+ self::C_STR_FOOTNOTE_URL_WRAP_ENABLED => 'yes',
+ self::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE => 'yes',
+ self::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH => 'no',
+ self::C_STR_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE => 'no',
+ self::C_STR_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE => 'no',
- self::BACKLINKS_SEPARATOR_ENABLED => 'yes',
- self::BACKLINKS_SEPARATOR_OPTION => 'comma',
- self::BACKLINKS_SEPARATOR_CUSTOM => '',
+ self::C_STR_BACKLINKS_SEPARATOR_ENABLED => 'yes',
+ self::C_STR_BACKLINKS_SEPARATOR_OPTION => 'comma',
+ self::C_STR_BACKLINKS_SEPARATOR_CUSTOM => '',
- self::BACKLINKS_TERMINATOR_ENABLED => 'no',
- self::BACKLINKS_TERMINATOR_OPTION => 'full_stop',
- self::BACKLINKS_TERMINATOR_CUSTOM => '',
+ self::C_STR_BACKLINKS_TERMINATOR_ENABLED => 'no',
+ self::C_STR_BACKLINKS_TERMINATOR_OPTION => 'full_stop',
+ self::C_STR_BACKLINKS_TERMINATOR_CUSTOM => '',
- self::BACKLINKS_COLUMN_WIDTH_ENABLED => 'no',
- self::BACKLINKS_COLUMN_WIDTH_SCALAR => '50',
- self::BACKLINKS_COLUMN_WIDTH_UNIT => 'px',
+ self::C_STR_BACKLINKS_COLUMN_WIDTH_ENABLED => 'no',
+ self::C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR => '50',
+ self::C_STR_BACKLINKS_COLUMN_WIDTH_UNIT => 'px',
- self::BACKLINKS_COLUMN_MAX_WIDTH_ENABLED => 'no',
- self::BACKLINKS_COLUMN_MAX_WIDTH_SCALAR => '140',
- self::BACKLINKS_COLUMN_MAX_WIDTH_UNIT => 'px',
+ self::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED => 'no',
+ self::C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR => '140',
+ self::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT => 'px',
- self::BACKLINKS_LINE_BREAKS_ENABLED => 'no',
- self::LINK_ELEMENT_ENABLED => 'yes',
+ self::C_STR_BACKLINKS_LINE_BREAKS_ENABLED => 'no',
+ self::C_STR_LINK_ELEMENT_ENABLED => 'yes',
// Footnotes in excerpts.
- self::FOOTNOTES_IN_EXCERPT => 'manual',
+ self::C_STR_FOOTNOTES_IN_EXCERPT => 'manual',
// Footnotes love.
- self::FOOTNOTES_LOVE => 'no',
+ self::C_STR_FOOTNOTES_LOVE => 'no',
// Deprecated.
- self::FOOTNOTES_EXPERT_MODE => 'yes',
+ self::C_STR_FOOTNOTES_EXPERT_MODE => 'yes',
),
@@ -1327,64 +1327,64 @@ class Footnotes_Settings {
'footnotes_storage_custom' => array(
// Backlink symbol.
- self::HYPERLINK_ARROW => '↑',
- self::HYPERLINK_ARROW_USER_DEFINED => '',
+ self::C_STR_HYPERLINK_ARROW => '↑',
+ self::C_STR_HYPERLINK_ARROW_USER_DEFINED => '',
// Referrers.
- self::FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS => 'yes',
- self::FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT => 'no',
- self::FOOTNOTES_STYLING_BEFORE => '[',
- self::FOOTNOTES_STYLING_AFTER => ']',
+ self::C_STR_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS => 'yes',
+ self::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT => 'no',
+ self::C_STR_FOOTNOTES_STYLING_BEFORE => '[',
+ self::C_STR_FOOTNOTES_STYLING_AFTER => ']',
// Referrers in labels.
- self::FOOTNOTES_LABEL_ISSUE_SOLUTION => 'none',
+ self::C_STR_FOOTNOTES_LABEL_ISSUE_SOLUTION => 'none',
// Tooltips.
- self::FOOTNOTES_MOUSE_OVER_BOX_ENABLED => 'yes',
- self::FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE => 'no',
+ self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ENABLED => 'yes',
+ self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE => 'no',
// Tooltip position.
- self::FOOTNOTES_MOUSE_OVER_BOX_POSITION => 'top center',
- self::FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION => 'top right',
- self::FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X => 0,
- self::FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X => -50,
- self::FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y => -7,
- self::FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y => 24,
+ self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION => 'top center',
+ self::C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION => 'top right',
+ self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X => 0,
+ self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X => -50,
+ self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y => -7,
+ self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y => 24,
// Tooltip dimensions.
- self::FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH => 450,
- self::FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH => 400,
+ self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH => 450,
+ self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH => 400,
// Tooltip timing.
- self::MOUSE_OVER_BOX_FADE_IN_DELAY => 0,
- self::MOUSE_OVER_BOX_FADE_IN_DURATION => 200,
- self::MOUSE_OVER_BOX_FADE_OUT_DELAY => 400,
- self::MOUSE_OVER_BOX_FADE_OUT_DURATION => 200,
+ self::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY => 0,
+ self::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION => 200,
+ self::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY => 400,
+ self::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION => 200,
// Tooltip truncation.
- self::FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED => 'yes',
- self::FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH => 200,
- self::FOOTNOTES_TOOLTIP_READON_LABEL => 'Continue reading',
+ self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED => 'yes',
+ self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH => 200,
+ self::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL => 'Continue reading',
// Tooltip text.
- self::FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER => '[[/tooltip]]',
- self::FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE => 'no',
- self::FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR => ' — ',
+ self::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER => '[[/tooltip]]',
+ self::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE => 'no',
+ self::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR => ' — ',
// Tooltip appearance.
- self::MOUSE_OVER_BOX_FONT_SIZE_ENABLED => 'yes',
- self::MOUSE_OVER_BOX_FONT_SIZE_SCALAR => 13,
- self::MOUSE_OVER_BOX_FONT_SIZE_UNIT => 'px',
+ self::C_STR_MOUSE_OVER_BOX_FONT_SIZE_ENABLED => 'yes',
+ self::C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR => 13,
+ self::C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT => 'px',
- self::FOOTNOTES_MOUSE_OVER_BOX_COLOR => '#000000',
- self::FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND => '#ffffff',
- self::FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH => 1,
- self::FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR => '#cccc99',
- self::FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS => 0,
- self::FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR => '#666666',
+ self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR => '#000000',
+ self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND => '#ffffff',
+ self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH => 1,
+ self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR => '#cccc99',
+ self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS => 0,
+ self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR => '#666666',
// Your existing Custom CSS code.
- self::CUSTOM_CSS => '',
+ self::C_STR_CUSTOM_CSS => '',
),
@@ -1392,20 +1392,20 @@ class Footnotes_Settings {
'footnotes_storage_expert' => array(
// WordPress hooks with priority level.
- self::EXPERT_LOOKUP_THE_TITLE => '',
- self::EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL => PHP_INT_MAX,
+ self::C_STR_EXPERT_LOOKUP_THE_TITLE => '',
+ self::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL => PHP_INT_MAX,
- self::EXPERT_LOOKUP_THE_CONTENT => 'checked',
- self::EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL => 98,
+ self::C_STR_EXPERT_LOOKUP_THE_CONTENT => 'checked',
+ self::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL => 98,
- self::EXPERT_LOOKUP_THE_EXCERPT => '',
- self::EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL => PHP_INT_MAX,
+ self::C_STR_EXPERT_LOOKUP_THE_EXCERPT => '',
+ self::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL => PHP_INT_MAX,
- self::EXPERT_LOOKUP_WIDGET_TITLE => '',
- self::EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL => PHP_INT_MAX,
+ self::C_STR_EXPERT_LOOKUP_WIDGET_TITLE => '',
+ self::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL => PHP_INT_MAX,
- self::EXPERT_LOOKUP_WIDGET_TEXT => '',
- self::EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL => 98,
+ self::C_STR_EXPERT_LOOKUP_WIDGET_TEXT => '',
+ self::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL => 98,
),
@@ -1413,10 +1413,10 @@ class Footnotes_Settings {
'footnotes_storage_custom_css' => array(
// Your existing Custom CSS code.
- self::CUSTOM_CSS_LEGACY_ENABLE => 'yes',
+ self::C_STR_CUSTOM_CSS_LEGACY_ENABLE => 'yes',
// Custom CSS.
- self::CUSTOM_CSS_NEW => '',
+ self::C_STR_CUSTOM_CSS_NEW => '',
),
@@ -1428,7 +1428,7 @@ class Footnotes_Settings {
* @since 1.5.0
* @var array
*/
- private $settings = array();
+ private $a_arr_settings = array();
/**
* Class Constructor. Loads all Settings from each WordPress Settings container.
@@ -1443,37 +1443,37 @@ class Footnotes_Settings {
* Returns a singleton of this class.
*
* @since 1.5.0
- * @return Footnotes_Settings
+ * @return MCI_Footnotes_Settings
*/
public static function instance() {
// No instance defined yet, load it.
- if ( ! self::$instance ) {
- self::$instance = new self();
+ if ( ! self::$a_obj_instance ) {
+ self::$a_obj_instance = new self();
}
// Return a singleton of this class.
- return self::$instance;
+ return self::$a_obj_instance;
}
/**
* Returns the name of a specified Settings Container.
*
* @since 1.5.0
- * @param int $index Settings Container Array Key Index.
+ * @param int $p_int_index Settings Container Array Key Index.
* @return str Settings Container name.
*/
- public function get_container( $index ) {
- return $this->container[ $index ];
+ public function get_container( $p_int_index ) {
+ return $this->a_arr_container[ $p_int_index ];
}
/**
* Returns the default values of a specific Settings Container.
*
* @since 1.5.6
- * @param int $index Settings Container Aray Key Index.
+ * @param int $p_int_index Settings Container Aray Key Index.
* @return array
*/
- public function get_defaults( $index ) {
- return $this->default[ $this->container[ $index ] ];
+ public function get_defaults( $p_int_index ) {
+ return $this->a_arr_default[ $this->a_arr_container[ $p_int_index ] ];
}
/**
@@ -1483,11 +1483,11 @@ class Footnotes_Settings {
*/
private function load_all() {
// Clear current settings.
- $this->settings = array();
- $num_settings = count( $this->container );
+ $this->a_arr_settings = array();
+ $num_settings = count( $this->a_arr_container );
for ( $i = 0; $i < $num_settings; $i++ ) {
// Load settings.
- $this->settings = array_merge( $this->settings, $this->load( $i ) );
+ $this->a_arr_settings = array_merge( $this->a_arr_settings, $this->load( $i ) );
}
}
@@ -1502,41 +1502,41 @@ class Footnotes_Settings {
* @link https://wordpress.org/support/topic/leading-space-in-footnotes-tag/
*
* @since 1.5.2
- * @param int $index Settings container array key index.
+ * @param int $p_int_index Settings container array key index.
* @return array Settings loaded from defaults if container is empty (first usage).
*/
- private function load( $index ) {
+ private function load( $p_int_index ) {
// Load all settings from container.
- $options = get_option( $this->get_container( $index ) );
+ $l_arr_options = get_option( $this->get_container( $p_int_index ) );
// Load all default settings.
- $default = $this->default[ $this->get_container( $index ) ];
+ $l_arr_default = $this->a_arr_default[ $this->get_container( $p_int_index ) ];
// No settings found, set them to their default value.
- if ( empty( $options ) ) {
- return $default;
+ if ( empty( $l_arr_options ) ) {
+ return $l_arr_default;
}
// Iterate through all available settings ( = default values).
- foreach ( $default as $key => $value ) {
+ foreach ( $l_arr_default as $l_str_key => $l_str_value ) {
// Available setting not found in the container.
- if ( ! array_key_exists( $key, $options ) ) {
+ if ( ! array_key_exists( $l_str_key, $l_arr_options ) ) {
// Define the setting with its default value.
- $options[ $key ] = $value;
+ $l_arr_options[ $l_str_key ] = $l_str_value;
}
}
// Return settings loaded from Container.
- return $options;
+ return $l_arr_options;
}
/**
* Updates a whole Settings container.
*
* @since 1.5.0
- * @param int $index Index of the Settings container.
- * @param array $new_values new Settings.
+ * @param int $p_int_index Index of the Settings container.
+ * @param array $p_arr_new_values new Settings.
* @return bool
*/
- public function save_options( $index, $new_values ) {
- if ( update_option( $this->get_container( $index ), $new_values ) ) {
+ public function save_options( $p_int_index, $p_arr_new_values ) {
+ if ( update_option( $this->get_container( $p_int_index ), $p_arr_new_values ) ) {
$this->load_all();
return true;
}
@@ -1547,11 +1547,11 @@ class Footnotes_Settings {
* Returns the value of specified Settings name.
*
* @since 1.5.0
- * @param string $key Settings Array Key name.
+ * @param string $p_str_key Settings Array Key name.
* @return mixed Value of the Setting on Success or Null in Settings name is invalid.
*/
- public function get( $key ) {
- return array_key_exists( $key, $this->settings ) ? $this->settings[ $key ] : null;
+ public function get( $p_str_key ) {
+ return array_key_exists( $p_str_key, $this->a_arr_settings ) ? $this->a_arr_settings[ $p_str_key ] : null;
}
/**
@@ -1566,13 +1566,13 @@ class Footnotes_Settings {
*/
public function clear_all() {
// Iterate through each Settings Container.
- $num_settings = count( $this->container );
+ $num_settings = count( $this->a_arr_container );
for ( $i = 0; $i < $num_settings; $i++ ) {
// Delete the settings container.
delete_option( $this->get_container( $i ) );
}
// Set settings back to the default values.
- $this->settings = $this->default;
+ $this->a_arr_settings = $this->a_arr_default;
}
/**
@@ -1583,7 +1583,7 @@ class Footnotes_Settings {
*/
public function register_settings() {
// Register all settings.
- $num_settings = count( $this->container );
+ $num_settings = count( $this->a_arr_container );
for ( $i = 0; $i < $num_settings; $i++ ) {
register_setting( $this->get_container( $i ), $this->get_container( $i ) );
}
diff --git a/class/task.php b/class/task.php
index 3a43798..db61494 100644
--- a/class/task.php
+++ b/class/task.php
@@ -92,7 +92,7 @@ if ( ! defined( 'ABSPATH' ) ) {
*
* @since 1.5.0
*/
-class Footnotes_Task {
+class MCI_Footnotes_Task {
/**
* Contains all footnotes found in the searched content.
@@ -100,7 +100,7 @@ class Footnotes_Task {
* @since 1.5.0
* @var array
*/
- public static $footnotes = array();
+ public static $a_arr_footnotes = array();
/**
* Flag if the display of 'LOVE FOOTNOTES' is allowed on the current public page.
@@ -108,7 +108,7 @@ class Footnotes_Task {
* @since 1.5.0
* @var bool
*/
- public static $allow_love_me = true;
+ public static $a_bool_allow_love_me = true;
/**
* Prefix for the Footnote html element ID.
@@ -116,7 +116,7 @@ class Footnotes_Task {
* @since 1.5.8
* @var string
*/
- public static $prefix = '';
+ public static $a_str_prefix = '';
/**
* Autoload a.k.a. infinite scroll, or archive view.
@@ -135,7 +135,7 @@ class Footnotes_Task {
* As multiple posts are appended to each other, functions and fragment IDs must be disambiguated.
* post ID to make everything unique wrt infinite scroll and archive view.
*/
- public static $post_id = 0;
+ public static $a_int_post_id = 0;
/**
* Multiple reference containers in content and widgets.
@@ -153,7 +153,7 @@ class Footnotes_Task {
* as they may occur when the widget_text hook is active and the page
* is built with Elementor and has an accordion or similar toggle sections.
*/
- public static $reference_container_id = 1;
+ public static $a_int_reference_container_id = 1;
/**
* Hard links for AMP compatibility.
@@ -179,7 +179,7 @@ class Footnotes_Task {
* @var bool
* A property because used both in search() and reference_container().
*/
- public static $hard_links_enabled = false;
+ public static $a_bool_hard_links_enabled = false;
/**
* The referrer slug.
@@ -187,7 +187,7 @@ class Footnotes_Task {
* @since 2.3.0
* @var str
*/
- public static $referrer_link_slug = 'r';
+ public static $a_str_referrer_link_slug = 'r';
/**
* The footnote slug.
@@ -195,7 +195,7 @@ class Footnotes_Task {
* @since 2.3.0
* @var str
*/
- public static $footnote_link_slug = 'f';
+ public static $a_str_footnote_link_slug = 'f';
/**
* The slug and identifier separator.
@@ -203,7 +203,7 @@ class Footnotes_Task {
* @since 2.3.0
* @var str
*/
- private static $link_ids_separator = '+';
+ private static $a_str_link_ids_separator = '+';
/**
* Contains the concatenated fragment ID base.
@@ -211,7 +211,7 @@ class Footnotes_Task {
* @since 2.3.0
* @var str
*/
- public static $post_container_id_compound = '';
+ public static $a_str_post_container_id_compound = '';
/**
* Scroll offset.
@@ -232,7 +232,7 @@ class Footnotes_Task {
* Scroll offset may now need to get into inline CSS.
* Hence it needs to be loaded twice, because priority levels may not match.
*/
- public static $scroll_offset = 34;
+ public static $a_int_scroll_offset = 34;
/**
* Optional link element for footnote referrers and backlinks
@@ -274,7 +274,7 @@ class Footnotes_Task {
* Yet styling these elements with the link color is not universally preferred, so that
* the very presence of these link elements may need to be avoided.
*
- * @see self::$hard_links_enabled
+ * @see self::$a_bool_hard_links_enabled
* A property because used both in search() and reference_container().
*/
@@ -284,7 +284,7 @@ class Footnotes_Task {
* @since 2.3.0
* @var str
*/
- public static $link_span = 'span';
+ public static $a_str_link_span = 'span';
/**
* The opening tag.
@@ -292,7 +292,7 @@ class Footnotes_Task {
* @since 2.3.0
* @var str
*/
- public static $link_open_tag = '';
+ public static $a_str_link_open_tag = '';
/**
* The closing tag.
@@ -300,7 +300,7 @@ class Footnotes_Task {
* @since 2.3.0
* @var str
*/
- public static $link_close_tag = '';
+ public static $a_str_link_close_tag = '';
/**
* Dedicated tooltip text.
@@ -324,7 +324,7 @@ class Footnotes_Task {
* @since 2.5.2
* @var str
*/
- public static $tooltip_shortcode = '[[/tooltip]]';
+ public static $a_str_tooltip_shortcode = '[[/tooltip]]';
/**
* The tooltip delimiter shortcode length.
@@ -332,7 +332,7 @@ class Footnotes_Task {
* @since 2.5.2
* @var int
*/
- public static $tooltip_shortcode_length = 12;
+ public static $a_int_tooltip_shortcode_length = 12;
/**
* Whether to mirror the tooltip text in the reference container.
@@ -340,7 +340,7 @@ class Footnotes_Task {
* @since 2.5.2
* @var bool
*/
- public static $mirror_tooltip_text = false;
+ public static $a_bool_mirror_tooltip_text = false;
/**
* Footnote delimiter start short code.
@@ -349,7 +349,7 @@ class Footnotes_Task {
* @since 2.6.2 (property)
* @var str
*/
- public static $start_tag = '';
+ public static $a_str_start_tag = '';
/**
* Footnote delimiter end short code.
@@ -358,7 +358,7 @@ class Footnotes_Task {
* @since 2.6.2 (property)
* @var str
*/
- public static $end_tag = '';
+ public static $a_str_end_tag = '';
/**
* Footnote delimiter start short code in regex format.
@@ -367,7 +367,7 @@ class Footnotes_Task {
* @since 2.6.2 (property)
* @var str
*/
- public static $start_tag_regex = '';
+ public static $a_str_start_tag_regex = '';
/**
* Footnote delimiter end short code in regex format.
@@ -376,7 +376,7 @@ class Footnotes_Task {
* @since 2.6.2 (property)
* @var str
*/
- public static $end_tag_regex = '';
+ public static $a_str_end_tag_regex = '';
/**
* Footnote delimiter syntax validation enabled.
@@ -395,7 +395,7 @@ class Footnotes_Task {
* is considered a design flaw, and the feature is released as a bug fix after overdue 2.3.0
* released in urgency to provide AMP compat before 2021.
*/
- public static $syntax_error_flag = true;
+ public static $a_bool_syntax_error_flag = true;
/**
* Register WordPress Hooks to replace Footnotes in the content of a public page.
@@ -418,18 +418,18 @@ class Footnotes_Task {
public function register_hooks() {
// Get values from settings.
- $the_title_priority = intval( Footnotes_Settings::instance()->get( Footnotes_Settings::EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL ) );
- $the_content_priority = intval( Footnotes_Settings::instance()->get( Footnotes_Settings::EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL ) );
- $the_excerpt_priority = intval( Footnotes_Settings::instance()->get( Footnotes_Settings::EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL ) );
- $widget_title_priority = intval( Footnotes_Settings::instance()->get( Footnotes_Settings::EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL ) );
- $widget_text_priority = intval( Footnotes_Settings::instance()->get( Footnotes_Settings::EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL ) );
+ $l_int_the_title_priority = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL ) );
+ $l_int_the_content_priority = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL ) );
+ $l_int_the_excerpt_priority = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL ) );
+ $l_int_widget_title_priority = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL ) );
+ $l_int_widget_text_priority = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL ) );
// PHP_INT_MAX can be set by -1.
- $the_title_priority = ( -1 === $the_title_priority ) ? PHP_INT_MAX : $the_title_priority;
- $the_content_priority = ( -1 === $the_content_priority ) ? PHP_INT_MAX : $the_content_priority;
- $the_excerpt_priority = ( -1 === $the_excerpt_priority ) ? PHP_INT_MAX : $the_excerpt_priority;
- $widget_title_priority = ( -1 === $widget_title_priority ) ? PHP_INT_MAX : $widget_title_priority;
- $widget_text_priority = ( -1 === $widget_text_priority ) ? PHP_INT_MAX : $widget_text_priority;
+ $l_int_the_title_priority = ( -1 === $l_int_the_title_priority ) ? PHP_INT_MAX : $l_int_the_title_priority;
+ $l_int_the_content_priority = ( -1 === $l_int_the_content_priority ) ? PHP_INT_MAX : $l_int_the_content_priority;
+ $l_int_the_excerpt_priority = ( -1 === $l_int_the_excerpt_priority ) ? PHP_INT_MAX : $l_int_the_excerpt_priority;
+ $l_int_widget_title_priority = ( -1 === $l_int_widget_title_priority ) ? PHP_INT_MAX : $l_int_widget_title_priority;
+ $l_int_widget_text_priority = ( -1 === $l_int_widget_text_priority ) ? PHP_INT_MAX : $l_int_widget_text_priority;
// Append custom css to the header.
add_filter( 'wp_head', array( $this, 'footnotes_output_head' ), PHP_INT_MAX );
@@ -437,13 +437,13 @@ class Footnotes_Task {
// Append the love and share me slug to the footer.
add_filter( 'wp_footer', array( $this, 'footnotes_output_footer' ), PHP_INT_MAX );
- if ( Footnotes_Convert::to_bool( Footnotes_Settings::instance()->get( Footnotes_Settings::EXPERT_LOOKUP_THE_TITLE ) ) ) {
- add_filter( 'the_title', array( $this, 'footnotes_in_title' ), $the_title_priority );
+ if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_TITLE ) ) ) {
+ add_filter( 'the_title', array( $this, 'footnotes_in_title' ), $l_int_the_title_priority );
}
// Configurable priority level for reference container relative positioning; default 98.
- if ( Footnotes_Convert::to_bool( Footnotes_Settings::instance()->get( Footnotes_Settings::EXPERT_LOOKUP_THE_CONTENT ) ) ) {
- add_filter( 'the_content', array( $this, 'footnotes_in_content' ), $the_content_priority );
+ if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_CONTENT ) ) ) {
+ add_filter( 'the_content', array( $this, 'footnotes_in_content' ), $l_int_the_content_priority );
/**
* Hook for category pages.
@@ -462,7 +462,7 @@ class Footnotes_Task {
* For this to happen, WordPress’ built-in partial HTML blocker needs to be disabled.
* @link https://docs.woocommerce.com/document/allow-html-in-term-category-tag-descriptions/
*/
- add_filter( 'term_description', array( $this, 'footnotes_in_content' ), $the_content_priority );
+ add_filter( 'term_description', array( $this, 'footnotes_in_content' ), $l_int_the_content_priority );
/**
* Hook for popup maker popups.
@@ -474,7 +474,7 @@ class Footnotes_Task {
*
* @since 2.5.1
*/
- add_filter( 'pum_popup_content', array( $this, 'footnotes_in_content' ), $the_content_priority );
+ add_filter( 'pum_popup_content', array( $this, 'footnotes_in_content' ), $l_int_the_content_priority );
}
/**
@@ -485,16 +485,16 @@ class Footnotes_Task {
* @since 2.6.2 The hook 'get_the_excerpt' is readded when attempting to debug excerpt handling.
* @since 2.6.6 The hook 'get_the_excerpt' is removed again because it seems to cause issues in some themes.
*/
- if ( Footnotes_Convert::to_bool( Footnotes_Settings::instance()->get( Footnotes_Settings::EXPERT_LOOKUP_THE_EXCERPT ) ) ) {
- add_filter( 'the_excerpt', array( $this, 'footnotes_in_excerpt' ), $the_excerpt_priority );
+ if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_EXCERPT ) ) ) {
+ add_filter( 'the_excerpt', array( $this, 'footnotes_in_excerpt' ), $l_int_the_excerpt_priority );
}
- if ( Footnotes_Convert::to_bool( Footnotes_Settings::instance()->get( Footnotes_Settings::EXPERT_LOOKUP_WIDGET_TITLE ) ) ) {
- add_filter( 'widget_title', array( $this, 'footnotes_in_widget_title' ), $widget_title_priority );
+ if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_WIDGET_TITLE ) ) ) {
+ add_filter( 'widget_title', array( $this, 'footnotes_in_widget_title' ), $l_int_widget_title_priority );
}
- if ( Footnotes_Convert::to_bool( Footnotes_Settings::instance()->get( Footnotes_Settings::EXPERT_LOOKUP_WIDGET_TEXT ) ) ) {
- add_filter( 'widget_text', array( $this, 'footnotes_in_widget_text' ), $widget_text_priority );
+ if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_WIDGET_TEXT ) ) ) {
+ add_filter( 'widget_text', array( $this, 'footnotes_in_widget_text' ), $l_int_widget_text_priority );
}
/**
@@ -561,8 +561,8 @@ class Footnotes_Task {
*/
// Reset stored footnotes when displaying the header.
- self::$footnotes = array();
- self::$allow_love_me = true;
+ self::$a_arr_footnotes = array();
+ self::$a_bool_allow_love_me = true;
}
/**
@@ -599,7 +599,7 @@ class Footnotes_Task {
* @since 2.5.12
* Native smooth scrolling only works in recent browsers.
*/
- if ( Footnotes_Convert::to_bool( Footnotes_Settings::instance()->get( Footnotes_Settings::FOOTNOTES_CSS_SMOOTH_SCROLLING ) ) ) {
+ if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_CSS_SMOOTH_SCROLLING ) ) ) {
echo "html {scroll-behavior: smooth;}\r\n";
}
@@ -616,9 +616,9 @@ class Footnotes_Task {
* Cannot be included in external stylesheet, as it is only optional.
* The scope is variable too: referrers only, or all superscript elements.
*/
- $normalize_superscript = Footnotes_Settings::instance()->get( Footnotes_Settings::FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT );
- if ( 'no' !== $normalize_superscript ) {
- if ( 'all' === $normalize_superscript ) {
+ $l_str_normalize_superscript = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT );
+ if ( 'no' !== $l_str_normalize_superscript ) {
+ if ( 'all' === $l_str_normalize_superscript ) {
echo 'sup {';
} else {
echo '.footnote_plugin_tooltip_text {';
@@ -636,7 +636,7 @@ class Footnotes_Task {
*
* @since 2.1.1
*/
- if ( ! Footnotes_Convert::to_bool( Footnotes_Settings::instance()->get( Footnotes_Settings::REFERENCE_CONTAINER_START_PAGE_ENABLE ) ) ) {
+ if ( ! MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_START_PAGE_ENABLE ) ) ) {
echo ".home .footnotes_reference_container { display: none; }\r\n";
}
@@ -651,12 +651,12 @@ class Footnotes_Task {
*
* @since 2.3.0
*/
- $reference_container_top_margin = intval( Footnotes_Settings::instance()->get( Footnotes_Settings::REFERENCE_CONTAINER_TOP_MARGIN ) );
- $reference_container_bottom_margin = intval( Footnotes_Settings::instance()->get( Footnotes_Settings::REFERENCE_CONTAINER_BOTTOM_MARGIN ) );
+ $l_int_reference_container_top_margin = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_TOP_MARGIN ) );
+ $l_int_reference_container_bottom_margin = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN ) );
echo '.footnotes_reference_container {margin-top: ';
- echo empty( $reference_container_top_margin ) ? '0' : $reference_container_top_margin;
+ echo empty( $l_int_reference_container_top_margin ) ? '0' : $l_int_reference_container_top_margin;
echo 'px !important; margin-bottom: ';
- echo empty( $reference_container_bottom_margin ) ? '0' : $reference_container_bottom_margin;
+ echo empty( $l_int_reference_container_bottom_margin ) ? '0' : $l_int_reference_container_bottom_margin;
echo "px !important;}\r\n";
/**
@@ -670,9 +670,9 @@ class Footnotes_Task {
*
* @since 2.2.5
*/
- if ( Footnotes_Convert::to_bool( Footnotes_Settings::instance()->get( Footnotes_Settings::REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER ) ) ) {
+ if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER ) ) ) {
echo '.footnote_container_prepare > ';
- echo Footnotes_Settings::instance()->get( Footnotes_Settings::REFERENCE_CONTAINER_LABEL_ELEMENT );
+ echo MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT );
echo " {border-bottom: 1px solid #aaaaaa !important;}\r\n";
}
@@ -691,7 +691,7 @@ class Footnotes_Task {
* issues as browsers won’t reload these style sheets after settings are
* changed while the version string is not.
*/
- if ( Footnotes_Convert::to_bool( Footnotes_Settings::instance()->get( Footnotes_Settings::REFERENCE_CONTAINER_ROW_BORDERS_ENABLE ) ) ) {
+ if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE ) ) ) {
echo '.footnotes_table, .footnotes_plugin_reference_row {';
echo 'border: 1px solid #060606;';
echo " !important;}\r\n";
@@ -701,45 +701,45 @@ class Footnotes_Task {
}
// Ref container first column width and max-width.
- $column_width_enabled = Footnotes_Convert::to_bool( Footnotes_Settings::instance()->get( Footnotes_Settings::BACKLINKS_COLUMN_WIDTH_ENABLED ) );
- $column_max_width_enabled = Footnotes_Convert::to_bool( Footnotes_Settings::instance()->get( Footnotes_Settings::BACKLINKS_COLUMN_MAX_WIDTH_ENABLED ) );
+ $l_bool_column_width_enabled = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_WIDTH_ENABLED ) );
+ $l_bool_column_max_width_enabled = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED ) );
- if ( $column_width_enabled || $column_max_width_enabled ) {
+ if ( $l_bool_column_width_enabled || $l_bool_column_max_width_enabled ) {
echo '.footnote-reference-container { table-layout: fixed; }';
echo '.footnote_plugin_index, .footnote_plugin_index_combi {';
- if ( $column_width_enabled ) {
- $column_width_scalar = Footnotes_Settings::instance()->get( Footnotes_Settings::BACKLINKS_COLUMN_WIDTH_SCALAR );
- $column_width_unit = Footnotes_Settings::instance()->get( Footnotes_Settings::BACKLINKS_COLUMN_WIDTH_UNIT );
+ if ( $l_bool_column_width_enabled ) {
+ $l_int_column_width_scalar = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR );
+ $l_str_column_width_unit = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_WIDTH_UNIT );
- if ( ! empty( $column_width_scalar ) ) {
- if ( '%' === $column_width_unit ) {
- if ( $column_width_scalar > 100 ) {
- $column_width_scalar = 100;
+ if ( ! empty( $l_int_column_width_scalar ) ) {
+ if ( '%' === $l_str_column_width_unit ) {
+ if ( $l_int_column_width_scalar > 100 ) {
+ $l_int_column_width_scalar = 100;
}
}
} else {
- $column_width_scalar = 0;
+ $l_int_column_width_scalar = 0;
}
- echo ' width: ' . $column_width_scalar . $column_width_unit . ' !important;';
+ echo ' width: ' . $l_int_column_width_scalar . $l_str_column_width_unit . ' !important;';
}
- if ( $column_max_width_enabled ) {
- $column_max_width_scalar = Footnotes_Settings::instance()->get( Footnotes_Settings::BACKLINKS_COLUMN_MAX_WIDTH_SCALAR );
- $column_max_width_unit = Footnotes_Settings::instance()->get( Footnotes_Settings::BACKLINKS_COLUMN_MAX_WIDTH_UNIT );
+ if ( $l_bool_column_max_width_enabled ) {
+ $l_int_column_max_width_scalar = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR );
+ $l_str_column_max_width_unit = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT );
- if ( ! empty( $column_max_width_scalar ) ) {
- if ( '%' === $column_max_width_unit ) {
- if ( $column_max_width_scalar > 100 ) {
- $column_max_width_scalar = 100;
+ if ( ! empty( $l_int_column_max_width_scalar ) ) {
+ if ( '%' === $l_str_column_max_width_unit ) {
+ if ( $l_int_column_max_width_scalar > 100 ) {
+ $l_int_column_max_width_scalar = 100;
}
}
} else {
- $column_max_width_scalar = 0;
+ $l_int_column_max_width_scalar = 0;
}
- echo ' max-width: ' . $column_max_width_scalar . $column_max_width_unit . ' !important;';
+ echo ' max-width: ' . $l_int_column_max_width_scalar . $l_str_column_max_width_unit . ' !important;';
}
echo "}\r\n";
@@ -754,24 +754,24 @@ class Footnotes_Task {
*
* @since 2.5.6 hard links are always enabled when the alternative reference container is.
*/
- self::$hard_links_enabled = Footnotes_Convert::to_bool( Footnotes_Settings::instance()->get( Footnotes_Settings::FOOTNOTES_HARD_LINKS_ENABLE ) );
+ self::$a_bool_hard_links_enabled = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_HARD_LINKS_ENABLE ) );
// Correct hard links enabled status depending on AMP compatible or alternative reference container enabled status.
- if ( Footnotes::$amp_enabled || 'jquery' !== Footnotes::$script_mode ) {
- self::$hard_links_enabled = true;
+ if ( MCI_Footnotes::$a_bool_amp_enabled || 'jquery' !== MCI_Footnotes::$a_str_script_mode ) {
+ self::$a_bool_hard_links_enabled = true;
}
- self::$scroll_offset = intval( Footnotes_Settings::instance()->get( Footnotes_Settings::FOOTNOTES_SCROLL_OFFSET ) );
- if ( self::$hard_links_enabled ) {
+ self::$a_int_scroll_offset = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET ) );
+ if ( self::$a_bool_hard_links_enabled ) {
echo '.footnote_referrer_anchor, .footnote_item_anchor {bottom: ';
- echo self::$scroll_offset;
+ echo self::$a_int_scroll_offset;
echo "vh;}\r\n";
}
/*
* Tooltips.
*/
- if ( Footnotes::$tooltips_enabled ) {
+ if ( MCI_Footnotes::$a_bool_tooltips_enabled ) {
echo '.footnote_tooltip {';
/**
@@ -782,9 +782,9 @@ class Footnotes_Task {
* @since 2.1.4
*/
echo ' font-size: ';
- if ( Footnotes_Convert::to_bool( Footnotes_Settings::instance()->get( Footnotes_Settings::MOUSE_OVER_BOX_FONT_SIZE_ENABLED ) ) ) {
- echo Footnotes_Settings::instance()->get( Footnotes_Settings::MOUSE_OVER_BOX_FONT_SIZE_SCALAR );
- echo Footnotes_Settings::instance()->get( Footnotes_Settings::MOUSE_OVER_BOX_FONT_SIZE_UNIT );
+ if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_MOUSE_OVER_BOX_FONT_SIZE_ENABLED ) ) ) {
+ echo MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR );
+ echo MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT );
} else {
echo 'inherit';
}
@@ -793,51 +793,51 @@ class Footnotes_Task {
/*
* Tooltip Text color.
*/
- $color = Footnotes_Settings::instance()->get( Footnotes_Settings::FOOTNOTES_MOUSE_OVER_BOX_COLOR );
- if ( ! empty( $color ) ) {
- printf( ' color: %s !important;', $color );
+ $l_str_color = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR );
+ if ( ! empty( $l_str_color ) ) {
+ printf( ' color: %s !important;', $l_str_color );
}
/*
* Tooltip Background color.
*/
- $background = Footnotes_Settings::instance()->get( Footnotes_Settings::FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND );
- if ( ! empty( $background ) ) {
- printf( ' background-color: %s !important;', $background );
+ $l_str_background = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND );
+ if ( ! empty( $l_str_background ) ) {
+ printf( ' background-color: %s !important;', $l_str_background );
}
/*
* Tooltip Border width.
*/
- $border_width = Footnotes_Settings::instance()->get( Footnotes_Settings::FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH );
- if ( ! empty( $border_width ) && intval( $border_width ) > 0 ) {
- printf( ' border-width: %dpx !important; border-style: solid !important;', $border_width );
+ $l_int_border_width = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH );
+ if ( ! empty( $l_int_border_width ) && intval( $l_int_border_width ) > 0 ) {
+ printf( ' border-width: %dpx !important; border-style: solid !important;', $l_int_border_width );
}
/*
* Tooltip Border color.
*/
- $border_color = Footnotes_Settings::instance()->get( Footnotes_Settings::FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR );
- if ( ! empty( $border_color ) ) {
- printf( ' border-color: %s !important;', $border_color );
+ $l_str_border_color = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR );
+ if ( ! empty( $l_str_border_color ) ) {
+ printf( ' border-color: %s !important;', $l_str_border_color );
}
/*
* Tooltip Corner radius.
*/
- $border_radius = Footnotes_Settings::instance()->get( Footnotes_Settings::FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS );
- if ( ! empty( $border_radius ) && intval( $border_radius ) > 0 ) {
- printf( ' border-radius: %dpx !important;', $border_radius );
+ $l_int_border_radius = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS );
+ if ( ! empty( $l_int_border_radius ) && intval( $l_int_border_radius ) > 0 ) {
+ printf( ' border-radius: %dpx !important;', $l_int_border_radius );
}
/*
* Tooltip Shadow color.
*/
- $box_shadow_color = Footnotes_Settings::instance()->get( Footnotes_Settings::FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR );
- if ( ! empty( $box_shadow_color ) ) {
- printf( ' -webkit-box-shadow: 2px 2px 11px %s;', $box_shadow_color );
- printf( ' -moz-box-shadow: 2px 2px 11px %s;', $box_shadow_color );
- printf( ' box-shadow: 2px 2px 11px %s;', $box_shadow_color );
+ $l_str_box_shadow_color = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR );
+ if ( ! empty( $l_str_box_shadow_color ) ) {
+ printf( ' -webkit-box-shadow: 2px 2px 11px %s;', $l_str_box_shadow_color );
+ printf( ' -moz-box-shadow: 2px 2px 11px %s;', $l_str_box_shadow_color );
+ printf( ' box-shadow: 2px 2px 11px %s;', $l_str_box_shadow_color );
}
/**
@@ -851,7 +851,7 @@ class Footnotes_Task {
*
* @since 2.2.5
*/
- if ( ! Footnotes::$alternative_tooltips_enabled && ! Footnotes::$amp_enabled ) {
+ if ( ! MCI_Footnotes::$a_bool_alternative_tooltips_enabled && ! MCI_Footnotes::$a_bool_amp_enabled ) {
/**
* Dimensions of jQuery tooltips.
@@ -860,9 +860,9 @@ class Footnotes_Task {
*
* @see templates/public/tooltip.html.
*/
- $max_width = Footnotes_Settings::instance()->get( Footnotes_Settings::FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH );
- if ( ! empty( $max_width ) && intval( $max_width ) > 0 ) {
- printf( ' max-width: %dpx !important;', $max_width );
+ $l_int_max_width = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH );
+ if ( ! empty( $l_int_max_width ) && intval( $l_int_max_width ) > 0 ) {
+ printf( ' max-width: %dpx !important;', $l_int_max_width );
}
echo "}\r\n";
@@ -877,12 +877,12 @@ class Footnotes_Task {
*
* @see 'Determine shrink width if alternative tooltips are enabled'.
*/
- $alternative_tooltip_width = intval( Footnotes_Settings::instance()->get( Footnotes_Settings::FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH ) );
+ $l_int_alternative_tooltip_width = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH ) );
echo '.footnote_tooltip.position {';
echo ' width: max-content; ';
// Set also as max-width wrt short tooltip shrinking.
- echo ' max-width: ' . $alternative_tooltip_width . 'px;';
+ echo ' max-width: ' . $l_int_alternative_tooltip_width . 'px;';
/**
* Position.
@@ -890,35 +890,35 @@ class Footnotes_Task {
* @see dev-amp-tooltips.css.
* @see dev-tooltips-alternative.css.
*/
- $alternative_position = Footnotes_Settings::instance()->get( Footnotes_Settings::FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION );
- $offset_x = intval( Footnotes_Settings::instance()->get( Footnotes_Settings::FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X ) );
+ $l_str_alternative_position = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION );
+ $l_int_offset_x = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X ) );
- if ( 'top left' === $alternative_position || 'bottom left' === $alternative_position ) {
- echo ' right: ' . ( ! empty( $offset_x ) ? $offset_x : 0 ) . 'px;';
+ if ( 'top left' === $l_str_alternative_position || 'bottom left' === $l_str_alternative_position ) {
+ echo ' right: ' . ( ! empty( $l_int_offset_x ) ? $l_int_offset_x : 0 ) . 'px;';
} else {
- echo ' left: ' . ( ! empty( $offset_x ) ? $offset_x : 0 ) . 'px;';
+ echo ' left: ' . ( ! empty( $l_int_offset_x ) ? $l_int_offset_x : 0 ) . 'px;';
}
- $offset_y = intval( Footnotes_Settings::instance()->get( Footnotes_Settings::FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y ) );
+ $l_int_offset_y = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y ) );
- if ( 'top left' === $alternative_position || 'top right' === $alternative_position ) {
- echo ' bottom: ' . ( ! empty( $offset_y ) ? $offset_y : 0 ) . 'px;';
+ if ( 'top left' === $l_str_alternative_position || 'top right' === $l_str_alternative_position ) {
+ echo ' bottom: ' . ( ! empty( $l_int_offset_y ) ? $l_int_offset_y : 0 ) . 'px;';
} else {
- echo ' top: ' . ( ! empty( $offset_y ) ? $offset_y : 0 ) . 'px;';
+ echo ' top: ' . ( ! empty( $l_int_offset_y ) ? $l_int_offset_y : 0 ) . 'px;';
}
echo "}\r\n";
/*
* Timing.
*/
- $fade_in_delay = intval( Footnotes_Settings::instance()->get( Footnotes_Settings::MOUSE_OVER_BOX_FADE_IN_DELAY ) );
- $fade_in_delay = ! empty( $fade_in_delay ) ? $fade_in_delay : '0';
- $fade_in_duration = intval( Footnotes_Settings::instance()->get( Footnotes_Settings::MOUSE_OVER_BOX_FADE_IN_DURATION ) );
- $fade_in_duration = ! empty( $fade_in_duration ) ? $fade_in_duration : '0';
- $fade_out_delay = intval( Footnotes_Settings::instance()->get( Footnotes_Settings::MOUSE_OVER_BOX_FADE_OUT_DELAY ) );
- $fade_out_delay = ! empty( $fade_out_delay ) ? $fade_out_delay : '0';
- $fade_out_duration = intval( Footnotes_Settings::instance()->get( Footnotes_Settings::MOUSE_OVER_BOX_FADE_OUT_DURATION ) );
- $fade_out_duration = ! empty( $fade_out_duration ) ? $fade_out_duration : '0';
+ $l_int_fade_in_delay = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY ) );
+ $l_int_fade_in_delay = ! empty( $l_int_fade_in_delay ) ? $l_int_fade_in_delay : '0';
+ $l_int_fade_in_duration = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION ) );
+ $l_int_fade_in_duration = ! empty( $l_int_fade_in_duration ) ? $l_int_fade_in_duration : '0';
+ $l_int_fade_out_delay = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY ) );
+ $l_int_fade_out_delay = ! empty( $l_int_fade_out_delay ) ? $l_int_fade_out_delay : '0';
+ $l_int_fade_out_duration = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION ) );
+ $l_int_fade_out_duration = ! empty( $l_int_fade_out_duration ) ? $l_int_fade_out_duration : '0';
/**
* AMP compatible tooltips.
@@ -927,16 +927,16 @@ class Footnotes_Task {
*
* @see dev-amp-tooltips.css.
*/
- if ( Footnotes::$amp_enabled ) {
+ if ( MCI_Footnotes::$a_bool_amp_enabled ) {
echo 'span.footnote_referrer > span.footnote_tooltip {';
- echo 'transition-delay: ' . $fade_out_delay . 'ms;';
- echo 'transition-duration: ' . $fade_out_duration . 'ms;';
+ echo 'transition-delay: ' . $l_int_fade_out_delay . 'ms;';
+ echo 'transition-duration: ' . $l_int_fade_out_duration . 'ms;';
echo "}\r\n";
echo 'span.footnote_referrer:focus-within > span.footnote_tooltip, span.footnote_referrer:hover > span.footnote_tooltip {';
- echo 'transition-delay: ' . $fade_in_delay . 'ms;';
- echo 'transition-duration: ' . $fade_in_duration . 'ms;';
+ echo 'transition-delay: ' . $l_int_fade_in_delay . 'ms;';
+ echo 'transition-duration: ' . $l_int_fade_in_duration . 'ms;';
echo "}\r\n";
/**
@@ -949,13 +949,13 @@ class Footnotes_Task {
} else {
echo '.footnote_tooltip.hidden {';
- echo 'transition-delay: ' . $fade_out_delay . 'ms;';
- echo 'transition-duration: ' . $fade_out_duration . 'ms;';
+ echo 'transition-delay: ' . $l_int_fade_out_delay . 'ms;';
+ echo 'transition-duration: ' . $l_int_fade_out_duration . 'ms;';
echo "}\r\n";
echo '.footnote_tooltip.shown {';
- echo 'transition-delay: ' . $fade_in_delay . 'ms;';
- echo 'transition-duration: ' . $fade_in_duration . 'ms;';
+ echo 'transition-delay: ' . $l_int_fade_in_delay . 'ms;';
+ echo 'transition-duration: ' . $l_int_fade_in_duration . 'ms;';
echo "}\r\n";
}
}
@@ -971,11 +971,11 @@ class Footnotes_Task {
* Set custom CSS to override settings, not conversely.
* Legacy Custom CSS is used until it’s set to disappear after dashboard tab migration.
*/
- if ( Footnotes_Convert::to_bool( Footnotes_Settings::instance()->get( Footnotes_Settings::CUSTOM_CSS_LEGACY_ENABLE ) ) ) {
- echo Footnotes_Settings::instance()->get( Footnotes_Settings::CUSTOM_CSS );
+ if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS_LEGACY_ENABLE ) ) ) {
+ echo MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS );
echo "\r\n";
}
- echo Footnotes_Settings::instance()->get( Footnotes_Settings::CUSTOM_CSS_NEW );
+ echo MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS_NEW );
// Insert end tag without switching out of PHP.
echo "\r\n\r\n";
@@ -992,7 +992,7 @@ class Footnotes_Task {
* The script for alternative tooltips is printed formatted, not minified,
* for transparency. It isn’t indented though (the PHP open tag neither).
*/
- if ( Footnotes::$alternative_tooltips_enabled ) {
+ if ( MCI_Footnotes::$a_bool_alternative_tooltips_enabled ) {
// Start internal script.
?>
@@ -1019,66 +1019,66 @@ class Footnotes_Task {
* @since 2.2.0 More options.
*/
public function footnotes_output_footer() {
- if ( 'footer' === Footnotes_Settings::instance()->get( Footnotes_Settings::REFERENCE_CONTAINER_POSITION ) ) {
+ if ( 'footer' === MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION ) ) {
echo $this->reference_container();
}
// Get setting for love and share this plugin.
- $love_me_index = Footnotes_Settings::instance()->get( Footnotes_Settings::FOOTNOTES_LOVE );
+ $l_str_love_me_index = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE );
// Check if the admin allows to add a link to the footer.
- if ( empty( $love_me_index ) || 'no' === strtolower( $love_me_index ) || ! self::$allow_love_me ) {
+ if ( empty( $l_str_love_me_index ) || 'no' === strtolower( $l_str_love_me_index ) || ! self::$a_bool_allow_love_me ) {
return;
}
// Set a hyperlink to the word "footnotes" in the Love slug.
- $linked_name = sprintf( '%s', Footnotes_Config::PLUGIN_PUBLIC_NAME );
+ $l_str_linked_name = sprintf( '%s', MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME );
// Get random love me text.
- if ( 'random' === strtolower( $love_me_index ) ) {
- $love_me_index = 'text-' . wp_rand( 1, 7 );
+ if ( 'random' === strtolower( $l_str_love_me_index ) ) {
+ $l_str_love_me_index = 'text-' . wp_rand( 1, 7 );
}
- switch ( $love_me_index ) {
+ switch ( $l_str_love_me_index ) {
// Options named wrt backcompat, simplest is default.
case 'text-1':
/* Translators: 2: Link to plugin page 1: Love heart symbol */
- $love_me_text = sprintf( __( 'I %2$s %1$s', 'footnotes' ), $linked_name, Footnotes_Config::LOVE_SYMBOL );
+ $l_str_love_me_text = sprintf( __( 'I %2$s %1$s', 'footnotes' ), $l_str_linked_name, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL );
break;
case 'text-2':
/* Translators: %s: Link to plugin page */
- $love_me_text = sprintf( __( 'This website uses the awesome %s plugin.', 'footnotes' ), $linked_name );
+ $l_str_love_me_text = sprintf( __( 'This website uses the awesome %s plugin.', 'footnotes' ), $l_str_linked_name );
break;
case 'text-4':
/* Translators: 1: Link to plugin page 2: Love heart symbol */
- $love_me_text = sprintf( '%1$s %2$s', $linked_name, Footnotes_Config::LOVE_SYMBOL );
+ $l_str_love_me_text = sprintf( '%1$s %2$s', $l_str_linked_name, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL );
break;
case 'text-5':
/* Translators: 1: Love heart symbol 2: Link to plugin page */
- $love_me_text = sprintf( '%1$s %2$s', Footnotes_Config::LOVE_SYMBOL, $linked_name );
+ $l_str_love_me_text = sprintf( '%1$s %2$s', MCI_Footnotes_Config::C_STR_LOVE_SYMBOL, $l_str_linked_name );
break;
case 'text-6':
/* Translators: %s: Link to plugin page */
- $love_me_text = sprintf( __( 'This website uses %s.', 'footnotes' ), $linked_name );
+ $l_str_love_me_text = sprintf( __( 'This website uses %s.', 'footnotes' ), $l_str_linked_name );
break;
case 'text-7':
/* Translators: %s: Link to plugin page */
- $love_me_text = sprintf( __( 'This website uses the %s plugin.', 'footnotes' ), $linked_name );
+ $l_str_love_me_text = sprintf( __( 'This website uses the %s plugin.', 'footnotes' ), $l_str_linked_name );
break;
case 'text-3':
default:
/* Translators: %s: Link to plugin page */
- $love_me_text = sprintf( '%s', $linked_name );
+ $l_str_love_me_text = sprintf( '%s', $l_str_linked_name );
break;
}
- echo sprintf( '
%s
', $love_me_text );
+ echo sprintf( '
%s
', $l_str_love_me_text );
}
/**
* Replaces footnotes in the post/page title.
*
* @since 1.5.0
- * @param string $content Title.
- * @return string $content Title with replaced footnotes.
+ * @param string $p_str_content Title.
+ * @return string $p_str_content Title with replaced footnotes.
*/
- public function footnotes_in_title( $content ) {
+ public function footnotes_in_title( $p_str_content ) {
// Appends the reference container if set to "post_end".
- return $this->exec( $content, false );
+ return $this->exec( $p_str_content, false );
}
/**
@@ -1092,41 +1092,41 @@ class Footnotes_Task {
* @link https://wordpress.org/support/topic/multiple-reference-containers-in-single-post/
*
* @since 2.7.0
- * @param string $content Page/Post content.
- * @return string $content Content with replaced footnotes.
+ * @param string $p_str_content Page/Post content.
+ * @return string $p_str_content Content with replaced footnotes.
*/
- public function footnotes_in_content( $content ) {
+ public function footnotes_in_content( $p_str_content ) {
- $ref_container_position = Footnotes_Settings::instance()->get( Footnotes_Settings::REFERENCE_CONTAINER_POSITION );
- $footnote_section_shortcode = Footnotes_Settings::instance()->get( Footnotes_Settings::FOOTNOTE_SECTION_SHORTCODE );
- $footnote_section_shortcode_length = strlen( $footnote_section_shortcode );
+ $l_str_ref_container_position = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION );
+ $l_str_footnote_section_shortcode = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTE_SECTION_SHORTCODE );
+ $l_int_footnote_section_shortcode_length = strlen( $l_str_footnote_section_shortcode );
- if ( strpos( $content, $footnote_section_shortcode ) === false ) {
+ if ( strpos( $p_str_content, $l_str_footnote_section_shortcode ) === false ) {
// phpcs:disable WordPress.PHP.YodaConditions.NotYoda
// Appends the reference container if set to "post_end".
- return $this->exec( $content, 'post_end' === $ref_container_position );
+ return $this->exec( $p_str_content, 'post_end' === $l_str_ref_container_position );
// phpcs:enable WordPress.PHP.YodaConditions.NotYoda
} else {
- $rest_content = $content;
- $sections_raw = array();
- $sections_processed = array();
+ $l_str_rest_content = $p_str_content;
+ $l_arr_sections_raw = array();
+ $l_arr_sections_processed = array();
do {
- $section_end = strpos( $rest_content, $footnote_section_shortcode );
- $sections_raw[] = substr( $rest_content, 0, $section_end );
- $rest_content = substr( $rest_content, $section_end + $footnote_section_shortcode_length );
- } while ( strpos( $rest_content, $footnote_section_shortcode ) !== false );
- $sections_raw[] = $rest_content;
+ $l_int_section_end = strpos( $l_str_rest_content, $l_str_footnote_section_shortcode );
+ $l_arr_sections_raw[] = substr( $l_str_rest_content, 0, $l_int_section_end );
+ $l_str_rest_content = substr( $l_str_rest_content, $l_int_section_end + $l_int_footnote_section_shortcode_length );
+ } while ( strpos( $l_str_rest_content, $l_str_footnote_section_shortcode ) !== false );
+ $l_arr_sections_raw[] = $l_str_rest_content;
- foreach ( $sections_raw as $section ) {
- $sections_processed[] = self::exec( $section, true );
+ foreach ( $l_arr_sections_raw as $l_str_section ) {
+ $l_arr_sections_processed[] = self::exec( $l_str_section, true );
}
- $content = implode( $sections_processed );
- return $content;
+ $p_str_content = implode( $l_arr_sections_processed );
+ return $p_str_content;
}
}
@@ -1135,8 +1135,8 @@ class Footnotes_Task {
* Processes existing excerpt or replaces it with a new one generated on the basis of the post.
*
* @since 1.5.0
- * @param string $excerpt Excerpt content.
- * @return string $excerpt Processed or new excerpt.
+ * @param string $p_str_excerpt Excerpt content.
+ * @return string $p_str_excerpt Processed or new excerpt.
* @since 2.6.2 Debug No option.
* @since 2.6.3 Debug Yes option, the setting becomes fully effective.
*
@@ -1150,17 +1150,17 @@ class Footnotes_Task {
* But issue #65 brought up that manual excerpts can include processable footnotes.
* Default 'manual' is fallback and is backward compatible with the initial setup.
*/
- public function footnotes_in_excerpt( $excerpt ) {
- $excerpt_mode = Footnotes_Settings::instance()->get( Footnotes_Settings::FOOTNOTES_IN_EXCERPT );
+ public function footnotes_in_excerpt( $p_str_excerpt ) {
+ $l_str_excerpt_mode = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_IN_EXCERPT );
- if ( 'yes' === $excerpt_mode ) {
- return $this->generate_excerpt_with_footnotes( $excerpt );
+ if ( 'yes' === $l_str_excerpt_mode ) {
+ return $this->generate_excerpt_with_footnotes( $p_str_excerpt );
- } elseif ( 'no' === $excerpt_mode ) {
- return $this->generate_excerpt( $excerpt );
+ } elseif ( 'no' === $l_str_excerpt_mode ) {
+ return $this->generate_excerpt( $p_str_excerpt );
} else {
- return $this->exec( $excerpt );
+ return $this->exec( $p_str_excerpt );
}
}
@@ -1180,41 +1180,41 @@ class Footnotes_Task {
* @link https://wordpress.org/support/topic/problem-with-footnotes-in-excerpts-of-the-blog-page/
*
* @since 2.6.2
- * @param string $content The post.
- * @return string $content An excerpt of the post.
+ * @param string $p_str_content The post.
+ * @return string $p_str_content An excerpt of the post.
* Applies full WordPress excerpt processing.
* @link https://developer.wordpress.org/reference/functions/wp_trim_excerpt/
* @link https://developer.wordpress.org/reference/functions/wp_trim_words/
*/
- public function generate_excerpt( $content ) {
+ public function generate_excerpt( $p_str_content ) {
// Discard existing excerpt and start on the basis of the post.
- $content = get_the_content( get_the_id() );
+ $p_str_content = get_the_content( get_the_id() );
// Get footnote delimiter shortcodes and unify them.
- $content = self::unify_delimiters( $content );
+ $p_str_content = self::unify_delimiters( $p_str_content );
// Remove footnotes.
- $content = preg_replace( '#' . self::$start_tag_regex . '.+?' . self::$end_tag_regex . '#', '', $content );
+ $p_str_content = preg_replace( '#' . self::$a_str_start_tag_regex . '.+?' . self::$a_str_end_tag_regex . '#', '', $p_str_content );
// Apply WordPress excerpt processing.
- $content = strip_shortcodes( $content );
- $content = excerpt_remove_blocks( $content );
+ $p_str_content = strip_shortcodes( $p_str_content );
+ $p_str_content = excerpt_remove_blocks( $p_str_content );
// Here the footnotes would be processed as part of WordPress content processing.
- $content = apply_filters( 'the_content', $content );
+ $p_str_content = apply_filters( 'the_content', $p_str_content );
// According to Advanced Excerpt, this is some kind of precaution against malformed CDATA in RSS feeds.
- $content = str_replace( ']]>', ']]>', $content );
+ $p_str_content = str_replace( ']]>', ']]>', $p_str_content );
- $excerpt_length = (int) _x( '55', 'excerpt_length' );
- $excerpt_length = (int) apply_filters( 'excerpt_length', $excerpt_length );
- $excerpt_more = apply_filters( 'excerpt_more', ' […]' );
+ $l_int_excerpt_length = (int) _x( '55', 'excerpt_length' );
+ $l_int_excerpt_length = (int) apply_filters( 'excerpt_length', $l_int_excerpt_length );
+ $l_str_excerpt_more = apply_filters( 'excerpt_more', ' […]' );
// Function wp_trim_words() calls wp_strip_all_tags() that wrecks the footnotes.
- $content = wp_trim_words( $content, $excerpt_length, $excerpt_more );
+ $p_str_content = wp_trim_words( $p_str_content, $l_int_excerpt_length, $l_str_excerpt_more );
- return $content;
+ return $p_str_content;
}
/**
@@ -1243,103 +1243,103 @@ class Footnotes_Task {
* @link https://wordpress.org/support/topic/update-crashed-my-website-3/#post-14259396
*
* @since 2.6.4
- * @param string $content The post.
- * @return string $content An excerpt of the post.
+ * @param string $p_str_content The post.
+ * @return string $p_str_content An excerpt of the post.
* Does not apply full WordPress excerpt processing.
* @see self::generate_excerpt()
* Uses information and some code from Advanced Excerpt.
* @link https://wordpress.org/plugins/advanced-excerpt/
*/
- public function generate_excerpt_with_footnotes( $content ) {
+ public function generate_excerpt_with_footnotes( $p_str_content ) {
// Discard existing excerpt and start on the basis of the post.
- $content = get_the_content( get_the_id() );
+ $p_str_content = get_the_content( get_the_id() );
// Get footnote delimiter shortcodes and unify them.
- $content = self::unify_delimiters( $content );
+ $p_str_content = self::unify_delimiters( $p_str_content );
// Apply WordPress excerpt processing.
- $content = strip_shortcodes( $content );
- $content = excerpt_remove_blocks( $content );
+ $p_str_content = strip_shortcodes( $p_str_content );
+ $p_str_content = excerpt_remove_blocks( $p_str_content );
// But do not process footnotes at this point; do only this.
- $content = str_replace( ']]>', ']]>', $content );
+ $p_str_content = str_replace( ']]>', ']]>', $p_str_content );
// Prepare the excerpt length argument.
- $excerpt_length = (int) _x( '55', 'excerpt_length' );
- $excerpt_length = (int) apply_filters( 'excerpt_length', $excerpt_length );
+ $l_int_excerpt_length = (int) _x( '55', 'excerpt_length' );
+ $l_int_excerpt_length = (int) apply_filters( 'excerpt_length', $l_int_excerpt_length );
// Prepare the Read-on string.
- $excerpt_more = apply_filters( 'excerpt_more', ' […]' );
+ $l_str_excerpt_more = apply_filters( 'excerpt_more', ' […]' );
// Safeguard the footnotes.
preg_match_all(
- '#' . self::$start_tag_regex . '.+?' . self::$end_tag_regex . '#',
- $content,
- $saved_footnotes
+ '#' . self::$a_str_start_tag_regex . '.+?' . self::$a_str_end_tag_regex . '#',
+ $p_str_content,
+ $p_arr_saved_footnotes
);
// Prevent the footnotes from altering the excerpt: previously hard-coded '5ED84D6'.
- $placeholder = '@' . mt_rand( 100000000, 2147483647 ) . '@';
- $content = preg_replace(
- '#' . self::$start_tag_regex . '.+?' . self::$end_tag_regex . '#',
- $placeholder,
- $content
+ $l_int_placeholder = '@' . mt_rand( 100000000, 2147483647 ) . '@';
+ $p_str_content = preg_replace(
+ '#' . self::$a_str_start_tag_regex . '.+?' . self::$a_str_end_tag_regex . '#',
+ $l_int_placeholder,
+ $p_str_content
);
// Replace line breaking markup with a separator.
- $separator = ' ';
- $content = preg_replace( '# #', $separator, $content );
- $content = preg_replace( '# #', $separator, $content );
- $content = preg_replace( '#<(p|li|div)[^>]*>#', $separator, $content );
- $content = preg_replace( '#' . $separator . '#', '', $content, 1 );
- $content = preg_replace( '#(p|li|div) *>#', '', $content );
- $content = preg_replace( '#[\r\n]#', '', $content );
+ $l_str_separator = ' ';
+ $p_str_content = preg_replace( '# #', $l_str_separator, $p_str_content );
+ $p_str_content = preg_replace( '# #', $l_str_separator, $p_str_content );
+ $p_str_content = preg_replace( '#<(p|li|div)[^>]*>#', $l_str_separator, $p_str_content );
+ $p_str_content = preg_replace( '#' . $l_str_separator . '#', '', $p_str_content, 1 );
+ $p_str_content = preg_replace( '#(p|li|div) *>#', '', $p_str_content );
+ $p_str_content = preg_replace( '#[\r\n]#', '', $p_str_content );
// To count words like Advanced Excerpt does it.
- $tokens = array();
- $output = '';
- $counter = 0;
+ $l_arr_tokens = array();
+ $l_str_output = '';
+ $l_int_counter = 0;
// Tokenize into tags and words as in Advanced Excerpt.
- preg_match_all( '#(<[^>]+>|[^<>\s]+)\s*#u', $content, $tokens );
+ preg_match_all( '#(<[^>]+>|[^<>\s]+)\s*#u', $p_str_content, $l_arr_tokens );
// Count words following one option of Advanced Excerpt.
- foreach ( $tokens[0] as $token ) {
+ foreach ( $l_arr_tokens[0] as $l_str_token ) {
- if ( $counter >= $excerpt_length ) {
+ if ( $l_int_counter >= $l_int_excerpt_length ) {
break;
}
// If token is not a tag, increment word count.
- if ( '<' !== $token[0] ) {
- $counter++;
+ if ( '<' !== $l_str_token[0] ) {
+ $l_int_counter++;
}
// Append the token to the output.
- $output .= $token;
+ $l_str_output .= $l_str_token;
}
// Complete unbalanced markup, used by Advanced Excerpt.
- $content = force_balance_tags( $output );
+ $p_str_content = force_balance_tags( $l_str_output );
// Readd footnotes in excerpt.
- $index = 0;
- while ( 0 !== preg_match( '#' . $placeholder . '#', $content ) ) {
- $content = preg_replace(
- '#' . $placeholder . '#',
- $saved_footnotes[0][ $index ],
- $content,
+ $l_int_index = 0;
+ while ( 0 !== preg_match( '#' . $l_int_placeholder . '#', $p_str_content ) ) {
+ $p_str_content = preg_replace(
+ '#' . $l_int_placeholder . '#',
+ $p_arr_saved_footnotes[0][ $l_int_index ],
+ $p_str_content,
1
);
- $index++;
+ $l_int_index++;
}
// Append the Read-on string as in wp_trim_words().
- $content .= $excerpt_more;
+ $p_str_content .= $l_str_excerpt_more;
// Process readded footnotes without appending the reference container.
- $content = self::exec( $content, false );
+ $p_str_content = self::exec( $p_str_content, false );
- return $content;
+ return $p_str_content;
}
@@ -1347,25 +1347,25 @@ class Footnotes_Task {
* Replaces footnotes in the widget title.
*
* @since 1.5.0
- * @param string $content Widget content.
- * @return string $content Content with replaced footnotes.
+ * @param string $p_str_content Widget content.
+ * @return string $p_str_content Content with replaced footnotes.
*/
- public function footnotes_in_widget_title( $content ) {
+ public function footnotes_in_widget_title( $p_str_content ) {
// Appends the reference container if set to "post_end".
- return $this->exec( $content, false );
+ return $this->exec( $p_str_content, false );
}
/**
* Replaces footnotes in the content of the current widget.
*
* @since 1.5.0
- * @param string $content Widget content.
- * @return string $content Content with replaced footnotes.
+ * @param string $p_str_content Widget content.
+ * @return string $p_str_content Content with replaced footnotes.
*/
- public function footnotes_in_widget_text( $content ) {
+ public function footnotes_in_widget_text( $p_str_content ) {
// phpcs:disable WordPress.PHP.YodaConditions.NotYoda
// Appends the reference container if set to "post_end".
- return $this->exec( $content, 'post_end' === Footnotes_Settings::instance()->get( Footnotes_Settings::REFERENCE_CONTAINER_POSITION ) ? true : false );
+ return $this->exec( $p_str_content, 'post_end' === MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION ) ? true : false );
// phpcs:enable WordPress.PHP.YodaConditions.NotYoda
}
@@ -1373,15 +1373,15 @@ class Footnotes_Task {
* Replaces all footnotes that occur in the given content.
*
* @since 1.5.0
- * @param string $content Any string that may contain footnotes to be replaced.
- * @param bool $output_references Appends the Reference Container to the output if set to true, default true.
- * @param bool $hide_footnotes_text Hide footnotes found in the string.
+ * @param string $p_str_content Any string that may contain footnotes to be replaced.
+ * @param bool $p_bool_output_references Appends the Reference Container to the output if set to true, default true.
+ * @param bool $p_bool_hide_footnotes_text Hide footnotes found in the string.
* @return string
*/
- public function exec( $content, $output_references = false, $hide_footnotes_text = false ) {
+ public function exec( $p_str_content, $p_bool_output_references = false, $p_bool_hide_footnotes_text = false ) {
// Process content.
- $content = $this->search( $content, $hide_footnotes_text );
+ $p_str_content = $this->search( $p_str_content, $p_bool_hide_footnotes_text );
/**
* Reference container customized positioning through shortcode.
@@ -1401,43 +1401,43 @@ class Footnotes_Task {
* @since 2.2.5
*/
// Append the reference container or insert at shortcode.
- $reference_container_position_shortcode = Footnotes_Settings::instance()->get( Footnotes_Settings::REFERENCE_CONTAINER_POSITION_SHORTCODE );
- if ( empty( $reference_container_position_shortcode ) ) {
- $reference_container_position_shortcode = '[[references]]';
+ $l_str_reference_container_position_shortcode = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE );
+ if ( empty( $l_str_reference_container_position_shortcode ) ) {
+ $l_str_reference_container_position_shortcode = '[[references]]';
}
- if ( $output_references ) {
+ if ( $p_bool_output_references ) {
- if ( strpos( $content, $reference_container_position_shortcode ) ) {
+ if ( strpos( $p_str_content, $l_str_reference_container_position_shortcode ) ) {
- $content = str_replace( $reference_container_position_shortcode, $this->reference_container(), $content );
+ $p_str_content = str_replace( $l_str_reference_container_position_shortcode, $this->reference_container(), $p_str_content );
} else {
- $content .= $this->reference_container();
+ $p_str_content .= $this->reference_container();
}
// Increment the container ID.
- self::$reference_container_id++;
+ self::$a_int_reference_container_id++;
}
// Delete position shortcode should any remain.
- $content = str_replace( $reference_container_position_shortcode, '', $content );
+ $p_str_content = str_replace( $l_str_reference_container_position_shortcode, '', $p_str_content );
// Take a look if the LOVE ME slug should NOT be displayed on this page/post, remove the short code if found.
- if ( strpos( $content, Footnotes_Config::NO_LOVE_SLUG ) ) {
- self::$allow_love_me = false;
- $content = str_replace( Footnotes_Config::NO_LOVE_SLUG, '', $content );
+ if ( strpos( $p_str_content, MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG ) ) {
+ self::$a_bool_allow_love_me = false;
+ $p_str_content = str_replace( MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG, '', $p_str_content );
}
// Return the content with replaced footnotes and optional reference container appended.
- return $content;
+ return $p_str_content;
}
/**
* Brings the delimiters and unifies their various HTML escapement schemas.
*
- * @param string $content TODO.
+ * @param string $p_str_content TODO.
*
* - Bugfix: Footnote delimiter short codes: fix numbering bug by cross-editor HTML escapement schema unification, thanks to @patrick_here @alifarahani8000 @gova bug reports.
*
@@ -1456,69 +1456,69 @@ class Footnotes_Task {
* when the opening tag is already escaped. In visual mode, the Block Editor
* does not escape the greater-than sign.
*/
- public function unify_delimiters( $content ) {
+ public function unify_delimiters( $p_str_content ) {
// Get footnotes start and end tag short codes.
- $starting_tag = Footnotes_Settings::instance()->get( Footnotes_Settings::FOOTNOTES_SHORT_CODE_START );
- $ending_tag = Footnotes_Settings::instance()->get( Footnotes_Settings::FOOTNOTES_SHORT_CODE_END );
- if ( 'userdefined' === $starting_tag || 'userdefined' === $ending_tag ) {
- $starting_tag = Footnotes_Settings::instance()->get( Footnotes_Settings::FOOTNOTES_SHORT_CODE_START_USER_DEFINED );
- $ending_tag = Footnotes_Settings::instance()->get( Footnotes_Settings::FOOTNOTES_SHORT_CODE_END_USER_DEFINED );
+ $l_str_starting_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START );
+ $l_str_ending_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END );
+ if ( 'userdefined' === $l_str_starting_tag || 'userdefined' === $l_str_ending_tag ) {
+ $l_str_starting_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED );
+ $l_str_ending_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED );
}
// If any footnotes short code is empty, return the content without changes.
- if ( empty( $starting_tag ) || empty( $ending_tag ) ) {
- return $content;
+ if ( empty( $l_str_starting_tag ) || empty( $l_str_ending_tag ) ) {
+ return $p_str_content;
}
- if ( preg_match( '#[&"\'<>]#', $starting_tag . $ending_tag ) ) {
+ if ( preg_match( '#[&"\'<>]#', $l_str_starting_tag . $l_str_ending_tag ) ) {
- $harmonized_start_tag = '{[(|fnote_stt|)]}';
- $harmonized_end_tag = '{[(|fnote_end|)]}';
+ $l_str_harmonized_start_tag = '{[(|fnote_stt|)]}';
+ $l_str_harmonized_end_tag = '{[(|fnote_end|)]}';
// Harmonize footnotes without escaping any HTML special characters in delimiter shortcodes.
// The footnote has been added in the Block Editor code editor (doesn’t work in Classic Editor text mode).
- $content = str_replace( $starting_tag, $harmonized_start_tag, $content );
- $content = str_replace( $ending_tag, $harmonized_end_tag, $content );
+ $p_str_content = str_replace( $l_str_starting_tag, $l_str_harmonized_start_tag, $p_str_content );
+ $p_str_content = str_replace( $l_str_ending_tag, $l_str_harmonized_end_tag, $p_str_content );
// Harmonize footnotes while escaping HTML special characters in delimiter shortcodes.
// The footnote has been added in the Classic Editor visual mode.
- $content = str_replace( htmlspecialchars( $starting_tag ), $harmonized_start_tag, $content );
- $content = str_replace( htmlspecialchars( $ending_tag ), $harmonized_end_tag, $content );
+ $p_str_content = str_replace( htmlspecialchars( $l_str_starting_tag ), $l_str_harmonized_start_tag, $p_str_content );
+ $p_str_content = str_replace( htmlspecialchars( $l_str_ending_tag ), $l_str_harmonized_end_tag, $p_str_content );
// Harmonize footnotes while escaping HTML special characters except greater-than sign in delimiter shortcodes.
// The footnote has been added in the Block Editor visual mode.
- $content = str_replace( str_replace( '>', '>', htmlspecialchars( $starting_tag ) ), $harmonized_start_tag, $content );
- $content = str_replace( str_replace( '>', '>', htmlspecialchars( $ending_tag ) ), $harmonized_end_tag, $content );
+ $p_str_content = str_replace( str_replace( '>', '>', htmlspecialchars( $l_str_starting_tag ) ), $l_str_harmonized_start_tag, $p_str_content );
+ $p_str_content = str_replace( str_replace( '>', '>', htmlspecialchars( $l_str_ending_tag ) ), $l_str_harmonized_end_tag, $p_str_content );
// Assign the delimiter shortcodes.
- self::$start_tag = $harmonized_start_tag;
- self::$end_tag = $harmonized_end_tag;
+ self::$a_str_start_tag = $l_str_harmonized_start_tag;
+ self::$a_str_end_tag = $l_str_harmonized_end_tag;
// Assign the regex-conformant shortcodes.
- self::$start_tag_regex = '\{\[\(\|fnote_stt\|\)\]\}';
- self::$end_tag_regex = '\{\[\(\|fnote_end\|\)\]\}';
+ self::$a_str_start_tag_regex = '\{\[\(\|fnote_stt\|\)\]\}';
+ self::$a_str_end_tag_regex = '\{\[\(\|fnote_end\|\)\]\}';
} else {
// Assign the delimiter shortcodes.
- self::$start_tag = $starting_tag;
- self::$end_tag = $ending_tag;
+ self::$a_str_start_tag = $l_str_starting_tag;
+ self::$a_str_end_tag = $l_str_ending_tag;
// Make shortcodes conform to regex syntax.
- self::$start_tag_regex = preg_replace( '#([\(\)\{\}\[\]\|\*\.\?\!])#', '\\\\$1', self::$start_tag );
- self::$end_tag_regex = preg_replace( '#([\(\)\{\}\[\]\|\*\.\?\!])#', '\\\\$1', self::$end_tag );
+ self::$a_str_start_tag_regex = preg_replace( '#([\(\)\{\}\[\]\|\*\.\?\!])#', '\\\\$1', self::$a_str_start_tag );
+ self::$a_str_end_tag_regex = preg_replace( '#([\(\)\{\}\[\]\|\*\.\?\!])#', '\\\\$1', self::$a_str_end_tag );
}
- return $content;
+ return $p_str_content;
}
/**
* Replaces all footnotes in the given content and appends them to the static property.
*
* @since 1.5.0
- * @param string $content Any content to be searched for footnotes.
- * @param bool $hide_footnotes_text Hide footnotes found in the string.
+ * @param string $p_str_content Any content to be searched for footnotes.
+ * @param bool $p_bool_hide_footnotes_text Hide footnotes found in the string.
* @return string
*
* @since 2.0.0 various.
@@ -1537,10 +1537,10 @@ class Footnotes_Task {
*
* @since 2.5.13
*/
- public function search( $content, $hide_footnotes_text ) {
+ public function search( $p_str_content, $p_bool_hide_footnotes_text ) {
// Get footnote delimiter shortcodes and unify them.
- $content = self::unify_delimiters( $content );
+ $p_str_content = self::unify_delimiters( $p_str_content );
/**
* Checks for balanced footnote delimiters; delimiter syntax validation.
@@ -1561,59 +1561,59 @@ class Footnotes_Task {
* prepend a warning to the content; displays de facto beneath the post title.
*/
// If enabled.
- if ( Footnotes_Convert::to_bool( Footnotes_Settings::instance()->get( Footnotes_Settings::FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE ) ) ) {
+ if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE ) ) ) {
// Apply different regex depending on whether start shortcode is double/triple opening parenthesis.
- if ( '((' === self::$start_tag || '(((' === self::$start_tag ) {
+ if ( '((' === self::$a_str_start_tag || '(((' === self::$a_str_start_tag ) {
// This prevents from catching a script containing e.g. a double opening parenthesis.
- $validation_regex = '#' . self::$start_tag_regex . '(((?!' . self::$end_tag_regex . ')[^\{\}])*?)(' . self::$start_tag_regex . '|$)#s';
+ $l_str_validation_regex = '#' . self::$a_str_start_tag_regex . '(((?!' . self::$a_str_end_tag_regex . ')[^\{\}])*?)(' . self::$a_str_start_tag_regex . '|$)#s';
} else {
// Catch all only if the start shortcode is not double/triple opening parenthesis, i.e. is unlikely to occur in scripts.
- $validation_regex = '#' . self::$start_tag_regex . '(((?!' . self::$end_tag_regex . ').)*?)(' . self::$start_tag_regex . '|$)#s';
+ $l_str_validation_regex = '#' . self::$a_str_start_tag_regex . '(((?!' . self::$a_str_end_tag_regex . ').)*?)(' . self::$a_str_start_tag_regex . '|$)#s';
}
// Check syntax and get error locations.
- preg_match( $validation_regex, $content, $error_location );
- if ( empty( $error_location ) ) {
- self::$syntax_error_flag = false;
+ preg_match( $l_str_validation_regex, $p_str_content, $p_arr_error_location );
+ if ( empty( $p_arr_error_location ) ) {
+ self::$a_bool_syntax_error_flag = false;
}
// Prevent generating and inserting the warning multiple times.
- if ( self::$syntax_error_flag ) {
+ if ( self::$a_bool_syntax_error_flag ) {
// Get plain text string for error location.
- $error_spot_string = wp_strip_all_tags( $error_location[1] );
+ $l_str_error_spot_string = wp_strip_all_tags( $p_arr_error_location[1] );
// Limit string length to 300 characters.
- if ( strlen( $error_spot_string ) > 300 ) {
- $error_spot_string = substr( $error_spot_string, 0, 299 ) . '…';
+ if ( strlen( $l_str_error_spot_string ) > 300 ) {
+ $l_str_error_spot_string = substr( $l_str_error_spot_string, 0, 299 ) . '…';
}
// Compose warning box.
- $syntax_error_warning = '
';
- $syntax_error_warning .= __( 'WARNING: unbalanced footnote start tag short code found.', 'footnotes' );
- $syntax_error_warning .= '
';
+ $l_str_syntax_error_warning = '
';
+ $l_str_syntax_error_warning .= __( 'WARNING: unbalanced footnote start tag short code found.', 'footnotes' );
+ $l_str_syntax_error_warning .= '
';
// Syntax validation setting in the dashboard under the General settings tab.
/* Translators: 1: General Settings 2: Footnote start and end short codes 3: Check for balanced shortcodes */
- $syntax_error_warning .= sprintf( __( 'If this warning is irrelevant, please disable the syntax validation feature in the dashboard under %1$s > %2$s > %3$s.', 'footnotes' ), __( 'General settings', 'footnotes' ), __( 'Footnote start and end short codes', 'footnotes' ), __( 'Check for balanced shortcodes', 'footnotes' ) );
+ $l_str_syntax_error_warning .= sprintf( __( 'If this warning is irrelevant, please disable the syntax validation feature in the dashboard under %1$s > %2$s > %3$s.', 'footnotes' ), __( 'General settings', 'footnotes' ), __( 'Footnote start and end short codes', 'footnotes' ), __( 'Check for balanced shortcodes', 'footnotes' ) );
- $syntax_error_warning .= '
';
- $syntax_error_warning .= __( 'Unbalanced start tag short code found before:', 'footnotes' );
- $syntax_error_warning .= '