Convert all variables from camelCase to snake_case

This commit is contained in:
Ben Goldsworthy 2021-02-21 10:50:08 +00:00
parent 2899e87cb0
commit 1371c19f4d
9 changed files with 401 additions and 401 deletions

View file

@ -33,7 +33,7 @@ class MCI_Footnotes_Convert {
* Edited:
* @since 2.2.0 lowercase Roman numerals supported
*/
public static function Index( $p_int_index, $p_str_convert_style = 'arabic_plain' ) {
public static function index( $p_int_index, $p_str_convert_style = 'arabic_plain' ) {
switch ( $p_str_convert_style ) {
case 'romanic':
return self::to_romanic( $p_int_index, true );

View file

@ -81,7 +81,7 @@ class MCI_Footnotes_Hooks {
* @param string $p_str_plugin_file_name Plugins init file name.
* @return array
*/
public static function Plugin_links( $p_arr_links, $p_str_plugin_file_name ) {
public static function plugin_links( $p_arr_links, $p_str_plugin_file_name ) {
// Append link to the WordPress Plugin page.
$p_arr_links[] = sprintf( '<a href="http://wordpress.org/support/plugin/footnotes" target="_blank">%s</a>', __( 'Support', MCI_Footnotes_Config::C_STR_PLUGIN_NAME ) );
// Append link to the Settings page.

View file

@ -82,30 +82,30 @@ class MCI_Footnotes_Layout_Diagnostics extends MCI_Footnotes_Layout_Engine {
*/
public function Diagnostics() {
global $wp_version;
$l_str_PhpExtensions = '';
$l_str_php_extensions = '';
// iterate through each PHP extension
foreach ( get_loaded_extensions() as $l_int_Index => $l_str_Extension ) {
if ( $l_int_Index > 0 ) {
$l_str_PhpExtensions .= ' | ';
foreach ( get_loaded_extensions() as $l_int_index => $l_str_extension ) {
if ( $l_int_index > 0 ) {
$l_str_php_extensions .= ' | ';
}
$l_str_PhpExtensions .= $l_str_Extension . ' ' . phpversion( $l_str_Extension );
$l_str_php_extensions .= $l_str_extension . ' ' . phpversion( $l_str_extension );
}
/** @var WP_Theme $l_obj_CurrentTheme */
$l_obj_CurrentTheme = wp_get_theme();
/** @var WP_Theme $l_obj_current_theme */
$l_obj_current_theme = wp_get_theme();
$l_str_WordPressPlugins = '';
$l_str_wordpress_plugins = '';
// iterate through each installed WordPress Plugin
foreach ( get_plugins() as $l_arr_Plugin ) {
$l_str_WordPressPlugins .= '<tr>';
$l_str_WordPressPlugins .= '<td>' . $l_arr_Plugin['Name'] . '</td>';
$l_str_WordPressPlugins .= '<td>' . $l_arr_Plugin['Version'] . ' [' . $l_arr_Plugin['PluginURI'] . ']' . '</td>';
$l_str_WordPressPlugins .= '</tr>';
foreach ( get_plugins() as $l_arr_plugin ) {
$l_str_wordpress_plugins .= '<tr>';
$l_str_wordpress_plugins .= '<td>' . $l_arr_plugin['Name'] . '</td>';
$l_str_wordpress_plugins .= '<td>' . $l_arr_plugin['Version'] . ' [' . $l_arr_plugin['PluginURI'] . ']' . '</td>';
$l_str_wordpress_plugins .= '</tr>';
}
// load template file
$l_obj_Template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'diagnostics' );
$l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'diagnostics' );
// replace all placeholders
$l_obj_Template->replace(
$l_obj_template->replace(
array(
'label-server' => __( 'Server name', MCI_Footnotes_Config::C_STR_PLUGIN_NAME ),
'server' => $_SERVER['SERVER_NAME'],
@ -123,18 +123,18 @@ class MCI_Footnotes_Layout_Diagnostics extends MCI_Footnotes_Layout_Engine {
'memory-limit' => ini_get( 'memory_limit' ),
'label-php-extensions' => __( 'PHP extensions', MCI_Footnotes_Config::C_STR_PLUGIN_NAME ),
'php-extensions' => $l_str_PhpExtensions,
'php-extensions' => $l_str_php_extensions,
'label-wordpress' => __( 'WordPress version', MCI_Footnotes_Config::C_STR_PLUGIN_NAME ),
'wordpress' => $wp_version,
'label-theme' => __( 'Active Theme', MCI_Footnotes_Config::C_STR_PLUGIN_NAME ),
'theme' => $l_obj_CurrentTheme->get( 'Name' ) . ' ' . $l_obj_CurrentTheme->get( 'Version' ) . ', ' . $l_obj_CurrentTheme->get( 'Author' ) . ' [' . $l_obj_CurrentTheme->get( 'AuthorURI' ) . ']',
'theme' => $l_obj_current_theme->get( 'Name' ) . ' ' . $l_obj_current_theme->get( 'Version' ) . ', ' . $l_obj_current_theme->get( 'Author' ) . ' [' . $l_obj_current_theme->get( 'AuthorURI' ) . ']',
'plugins' => $l_str_WordPressPlugins,
'plugins' => $l_str_wordpress_plugins,
)
);
// display template with replaced placeholders
echo $l_obj_Template->getContent();
echo $l_obj_template->getContent();
}
}

View file

@ -184,19 +184,19 @@ abstract class MCI_Footnotes_Layout_Engine {
*
* @author Stefan Herndler
* @since 1.5.0
* @param string $p_str_parent_iD Parent section unique id.
* @param string $p_str_parent_id Parent section unique id.
*/
private function register_meta_boxes( $p_str_parent_iD ) {
private function register_meta_boxes( $p_str_parent_id ) {
// iterate through each meta box
foreach ( $this->get_meta_boxes() as $l_arr_meta_box ) {
if ( $l_arr_meta_box['parent'] != $p_str_parent_iD ) {
if ( $l_arr_meta_box['parent'] != $p_str_parent_id ) {
continue;
}
add_meta_box(
$p_str_parent_iD . '-' . $l_arr_meta_box['id'], // unique id
$p_str_parent_id . '-' . $l_arr_meta_box['id'], // unique id
$l_arr_meta_box['title'], // meta box title
array( $this, $l_arr_meta_box['callback'] ), // callback function to display (echo) the content
$p_str_parent_iD, // post type = parent section id
$p_str_parent_id, // post type = parent section id
'main' // context
);
}
@ -258,8 +258,8 @@ abstract class MCI_Footnotes_Layout_Engine {
$this->append_scripts();
// get current section
reset( $this->a_arr_sections );
$l_str_active_section_iD = isset( $_GET['t'] ) ? $_GET['t'] : key( $this->a_arr_sections );
$l_arr_active_section = $this->a_arr_sections[ $l_str_active_section_iD ];
$l_str_active_section_id = isset( $_GET['t'] ) ? $_GET['t'] : key( $this->a_arr_sections );
$l_arr_active_section = $this->a_arr_sections[ $l_str_active_section_id ];
// store settings
$l_bool_settings_updated = false;
if ( array_key_exists( 'save-settings', $_POST ) ) {
@ -326,11 +326,11 @@ abstract class MCI_Footnotes_Layout_Engine {
$l_arr_new_settings = array();
// get current section
reset( $this->a_arr_sections );
$l_str_active_section_iD = isset( $_GET['t'] ) ? $_GET['t'] : key( $this->a_arr_sections );
$l_arr_active_section = $this->a_arr_sections[ $l_str_active_section_iD ];
$l_str_active_section_id = isset( $_GET['t'] ) ? $_GET['t'] : key( $this->a_arr_sections );
$l_arr_active_section = $this->a_arr_sections[ $l_str_active_section_id ];
// iterate through each value that has to be in the specific container
foreach ( MCI_Footnotes_Settings::instance()->get_defaults( $l_arr_active_section['container'] ) as $l_str_key => $l_mixed_Value ) {
foreach ( MCI_Footnotes_Settings::instance()->get_defaults( $l_arr_active_section['container'] ) as $l_str_key => $l_mixed_value ) {
// setting is available in the POST array, use it
if ( array_key_exists( $l_str_key, $_POST ) ) {
$l_arr_new_settings[ $l_str_key ] = $_POST[ $l_str_key ];
@ -349,7 +349,7 @@ abstract class MCI_Footnotes_Layout_Engine {
* @author Stefan Herndler
* @since 1.5.0
*/
public function Description() {
public function description() {
// default no description will be displayed
}
@ -361,7 +361,7 @@ abstract class MCI_Footnotes_Layout_Engine {
* @param string $p_str_setting_key_name Settings Array key name.
* @return array Contains Settings ID, Settings Name and Settings Value.
*/
protected function Load_setting( $p_str_setting_key_name ) {
protected function load_setting( $p_str_setting_key_name ) {
// get current section
reset( $this->a_arr_sections );
$p_arr_return = array();
@ -440,15 +440,15 @@ abstract class MCI_Footnotes_Layout_Engine {
* @author Stefan Herndler
* @since 1.5.0
* @param string $p_str_setting_name Name of the Settings key to pre load the input field.
* @param int $p_str_maxLength Maximum length of the input, default 999 characters.
* @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( $p_str_setting_name, $p_str_maxLength = 999, $p_bool_readonly = false, $p_bool_hidden = false ) {
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
$l_arr_data = $this->Load_setting( $p_str_setting_name );
$l_arr_data = $this->load_setting( $p_str_setting_name );
if ( $p_bool_hidden ) {
$l_str_style .= 'display:none;';
}
@ -456,7 +456,7 @@ abstract class MCI_Footnotes_Layout_Engine {
'<input type="text" name="%s" id="%s" maxlength="%d" style="%s" value="%s" %s/>',
$l_arr_data['name'],
$l_arr_data['id'],
$p_str_maxLength,
$p_str_max_length,
$l_str_style,
$l_arr_data['value'],
$p_bool_readonly ? 'readonly="readonly"' : ''
@ -473,7 +473,7 @@ abstract class MCI_Footnotes_Layout_Engine {
*/
protected function add_checkbox( $p_str_setting_name ) {
// collect data for given settings field
$l_arr_data = $this->Load_setting( $p_str_setting_name );
$l_arr_data = $this->load_setting( $p_str_setting_name );
return sprintf(
'<input type="checkbox" name="%s" id="%s" %s/>',
$l_arr_data['name'],
@ -493,7 +493,7 @@ abstract class MCI_Footnotes_Layout_Engine {
*/
protected function add_select_box( $p_str_setting_name, $p_arr_options ) {
// collect data for given settings field
$l_arr_data = $this->Load_setting( $p_str_setting_name );
$l_arr_data = $this->load_setting( $p_str_setting_name );
$l_str_options = '';
/* loop through all array keys */
@ -523,7 +523,7 @@ abstract class MCI_Footnotes_Layout_Engine {
*/
protected function add_text_area( $p_str_setting_name ) {
// collect data for given settings field
$l_arr_data = $this->Load_setting( $p_str_setting_name );
$l_arr_data = $this->load_setting( $p_str_setting_name );
return sprintf(
'<textarea name="%s" id="%s">%s</textarea>',
$l_arr_data['name'],
@ -542,7 +542,7 @@ abstract class MCI_Footnotes_Layout_Engine {
*/
protected function add_color_selection( $p_str_setting_name ) {
// collect data for given settings field
$l_arr_data = $this->Load_setting( $p_str_setting_name );
$l_arr_data = $this->load_setting( $p_str_setting_name );
return sprintf(
'<input type="text" name="%s" id="%s" class="mfmmf-color-picker" value="%s"/>',
$l_arr_data['name'],
@ -557,7 +557,7 @@ abstract class MCI_Footnotes_Layout_Engine {
* @author Stefan Herndler
* @since 1.5.0
* @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 $p_in_min Minimum value.
* @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
@ -565,9 +565,9 @@ abstract class MCI_Footnotes_Layout_Engine {
* Edited:
* @since 2.1.4 step argument and number_format() to allow decimals 2020-12-03T0631+0100..2020-12-12T1110+0100
*/
protected function add_num_box( $p_str_setting_name, $p_in_Min, $p_int_max, $p_bool_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
$l_arr_data = $this->Load_setting( $p_str_setting_name );
$l_arr_data = $this->load_setting( $p_str_setting_name );
if ( $p_bool_deci ) {
$l_str_value = number_format( floatval( $l_arr_data['value'] ), 1 );
@ -576,7 +576,7 @@ abstract class MCI_Footnotes_Layout_Engine {
$l_arr_data['name'],
$l_arr_data['id'],
$l_str_value,
$p_in_Min,
$p_in_min,
$p_int_max
);
} else {
@ -585,7 +585,7 @@ abstract class MCI_Footnotes_Layout_Engine {
$l_arr_data['name'],
$l_arr_data['id'],
$l_arr_data['value'],
$p_in_Min,
$p_in_min,
$p_int_max
);
}

File diff suppressed because it is too large Load diff

View file

@ -1141,7 +1141,7 @@ class MCI_Footnotes_Settings {
$this->a_arr_settings = array();
for ( $i = 0; $i < count( $this->a_arr_container ); $i++ ) {
// Load settings.
$this->a_arr_settings = array_merge( $this->a_arr_settings, $this->Load( $i ) );
$this->a_arr_settings = array_merge( $this->a_arr_settings, $this->load( $i ) );
}
}
@ -1156,7 +1156,7 @@ class MCI_Footnotes_Settings {
* @since ditched trimming whitespace from text box content in response to user request.
* @link https://wordpress.org/support/topic/leading-space-in-footnotes-tag/#post-5347966
*/
private function Load( $p_int_index ) {
private function load( $p_int_index ) {
// Load all settings from container.
$l_arr_options = get_option( $this->get_container( $p_int_index ) );
// Load all default settings.
@ -1227,7 +1227,7 @@ class MCI_Footnotes_Settings {
* done by deleting and reinstalling (see the warning about database backup).
* 2020-12-13T1353+0100
*/
public function Clear_all() {
public function clear_all() {
// Iterate through each Settings Container.
for ( $i = 0; $i < count( $this->a_arr_container ); $i++ ) {
// Delete the settings container.
@ -1244,7 +1244,7 @@ class MCI_Footnotes_Settings {
* @author Stefan Herndler
* @since 1.5.0
*/
public function Register_settings() {
public function register_settings() {
// Register all settings.
for ( $i = 0; $i < count( $this->a_arr_container ); $i++ ) {
register_setting( $this->get_container( $i ), $this->get_container( $i ) );

View file

@ -674,9 +674,9 @@ class MCI_Footnotes_Task {
// Ref container first column width and max-width:.
$l_bool_column_width_enabled = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED ) );
$l_bool_column_maxWidth_enabled = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED ) );
$l_bool_column_max_width_enabled = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED ) );
if ( $l_bool_column_width_enabled || $l_bool_column_maxWidth_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 {';
@ -698,22 +698,22 @@ class MCI_Footnotes_Task {
echo " width: $l_int_column_width_scalar$l_str_column_width_unit !important;";
}
if ( $l_bool_column_maxWidth_enabled ) {
if ( $l_bool_column_max_width_enabled ) {
$l_int_column_maxWidth_scalar = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR );
$l_int_column_max_width_scalar = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR );
$l_str_column_maxWidth_unit = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT );
if ( ! empty( $l_int_column_maxWidth_scalar ) ) {
if ( ! empty( $l_int_column_max_width_scalar ) ) {
if ( $l_str_column_maxWidth_unit == '%' ) {
if ( $l_int_column_maxWidth_scalar > 100 ) {
$l_int_column_maxWidth_scalar = 100;
if ( $l_int_column_max_width_scalar > 100 ) {
$l_int_column_max_width_scalar = 100;
}
}
} else {
$l_int_column_maxWidth_scalar = 0;
$l_int_column_max_width_scalar = 0;
}
echo " max-width: $l_int_column_maxWidth_scalar$l_str_column_maxWidth_unit !important;";
echo " max-width: $l_int_column_max_width_scalar$l_str_column_maxWidth_unit !important;";
}
echo "}\r\n";
@ -943,7 +943,7 @@ class MCI_Footnotes_Task {
*/
public function wp_footer() {
if ( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION ) == 'footer' ) {
echo $this->Reference_container();
echo $this->reference_container();
}
// Get setting for love and share this plugin.
$l_str_love_me_index = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE );
@ -1054,17 +1054,17 @@ class MCI_Footnotes_Task {
*
* @author Stefan Herndler
* @since 1.5.4
* @param array|WP_Post $p_mixed_Posts
* @param array|WP_Post $p_mixed_posts
*/
public function the_post( &$p_mixed_Posts ) {
public function the_post( &$p_mixed_posts ) {
// Single WP_Post object received.
if ( ! is_array( $p_mixed_Posts ) ) {
$p_mixed_Posts = $this->replace_post_object( $p_mixed_Posts );
if ( ! is_array( $p_mixed_posts ) ) {
$p_mixed_posts = $this->replace_post_object( $p_mixed_posts );
return;
}
// Array of WP_Post objects received.
for ( $l_int_index = 0; $l_int_index < count( $p_mixed_Posts ); $l_int_index++ ) {
$p_mixed_Posts[ $l_int_index ] = $this->replace_post_object( $p_mixed_Posts[ $l_int_index ] );
for ( $l_int_index = 0; $l_int_index < count( $p_mixed_posts ); $l_int_index++ ) {
$p_mixed_posts[ $l_int_index ] = $this->replace_post_object( $p_mixed_posts[ $l_int_index ] );
}
}
@ -1134,11 +1134,11 @@ class MCI_Footnotes_Task {
if ( strpos( $p_str_content, $l_str_reference_container_position_shortcode ) !== false ) {
$p_str_content = str_replace( $l_str_reference_container_position_shortcode, $this->Reference_container(), $p_str_content );
$p_str_content = str_replace( $l_str_reference_container_position_shortcode, $this->reference_container(), $p_str_content );
} else {
$p_str_content .= $this->Reference_container();
$p_str_content .= $this->reference_container();
}
@ -1514,11 +1514,11 @@ class MCI_Footnotes_Task {
// Display the footnote referrers and the tooltips:.
if ( ! $p_bool_hide_footnotes_text ) {
$l_int_index = MCI_Footnotes_Convert::Index( $l_int_footnote_index, MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE ) );
$l_int_index = MCI_Footnotes_Convert::index( $l_int_footnote_index, MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE ) );
// Display only a truncated footnote text if option enabled:.
$l_bool_enable_excerpt = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED ) );
$l_int_maxLength = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH ) );
$l_int_max_length = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH ) );
// Define excerpt text as footnote text by default:.
$l_str_excerpt_text = $l_str_footnote_text;
@ -1541,8 +1541,8 @@ class MCI_Footnotes_Task {
*/
if ( self::$a_bool_tooltips_enabled && $l_bool_enable_excerpt ) {
$l_str_dummy_text = strip_tags( $l_str_footnote_text );
if ( is_int( $l_int_maxLength ) && strlen( $l_str_dummy_text ) > $l_int_maxLength ) {
$l_str_excerpt_text = substr( $l_str_dummy_text, 0, $l_int_maxLength );
if ( is_int( $l_int_max_length ) && strlen( $l_str_dummy_text ) > $l_int_max_length ) {
$l_str_excerpt_text = substr( $l_str_dummy_text, 0, $l_int_max_length );
$l_str_excerpt_text = substr( $l_str_excerpt_text, 0, strrpos( $l_str_excerpt_text, ' ' ) );
$l_str_excerpt_text .= '&nbsp;&#x2026; <';
$l_str_excerpt_text .= self::$a_bool_hard_links_enable ? 'a' : 'span';
@ -1794,7 +1794,7 @@ class MCI_Footnotes_Task {
* @since 2.1.1 Bugfix: Referrers, reference container: Combining identical footnotes: fix dead links and ensure referrer-backlink bijectivity, thanks to @happyches bug report.
* @since 2.1.1 Bugfix: Reference container: Backlink symbol: make optional, not suggest configuring it to invisible, thanks to @spaceling feedback.
*/
public function Reference_container() {
public function reference_container() {
// No footnotes have been replaced on this page:.
if ( empty( self::$a_arr_footnotes ) ) {
@ -2010,7 +2010,7 @@ class MCI_Footnotes_Task {
// Get the footnote index string and.
// Keep supporting legacy index placeholder:.
$l_str_footnote_id = MCI_Footnotes_Convert::Index( ( $l_int_index + 1 ), MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE ) );
$l_str_footnote_id = MCI_Footnotes_Convert::index( ( $l_int_index + 1 ), MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE ) );
/**
* Case of only one backlink per table row
@ -2164,7 +2164,7 @@ class MCI_Footnotes_Task {
$l_bool_flag_combined = true;
// Update the footnote ID:.
$l_str_footnote_id = MCI_Footnotes_Convert::Index( ( $l_int_check_index + 1 ), MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE ) );
$l_str_footnote_id = MCI_Footnotes_Convert::index( ( $l_int_check_index + 1 ), MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE ) );
// Resume composing the backlinks enumeration:.
$l_str_footnote_backlinks .= "$l_str_separator</";
@ -2246,7 +2246,7 @@ class MCI_Footnotes_Task {
// Used in standard layout W/O COMBINED FOOTNOTES:.
'post_id' => self::$a_int_post_id,
'container_id' => self::$a_int_reference_container_id,
'note_id' => MCI_Footnotes_Convert::Index( $l_int_first_footnote_index, MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE ) ),
'note_id' => MCI_Footnotes_Convert::index( $l_int_first_footnote_index, MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE ) ),
'link-start' => self::$a_str_link_open_tag,
'link-end' => self::$a_str_link_close_tag,
'link-span' => self::$a_str_link_span,

View file

@ -75,11 +75,11 @@ abstract class MCI_Footnotes_Widget_Base extends WP_Widget {
* “The called constructor method for WP_Widget in MCI_Footnotes_Widget_ReferenceContainer is deprecated since version 4.3.0! Use __construct() instead.
*/
public function __construct() {
$l_arr_WidgetOptions = array(
$l_arr_widget_options = array(
'classname' => __CLASS__,
'description' => $this->getDescription(),
);
$l_arr_ControlOptions = array(
$l_arr_control_options = array(
'id_base' => strtolower( $this->getID() ),
'width' => $this->getWidgetWidth(),
);
@ -87,8 +87,8 @@ abstract class MCI_Footnotes_Widget_Base extends WP_Widget {
parent::__construct(
strtolower( $this->getID() ), // unique ID for the widget, has to be lowercase
$this->getName(), // Plugin name to be displayed
$l_arr_WidgetOptions, // Optional Widget Options
$l_arr_ControlOptions // Optional Widget Control Options
$l_arr_widget_options, // Optional Widget Options
$l_arr_control_options // Optional Widget Control Options
);
}
}

View file

@ -76,10 +76,10 @@ class MCI_Footnotes_Widget_ReferenceContainer extends MCI_Footnotes_Widget_Base
* @param mixed $instance
*/
public function widget( $args, $instance ) {
global $g_obj_MCI_Footnotes;
global $g_obj_mci_footnotes;
// reference container positioning is set to "widget area"
if ( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION ) == 'widget' ) {
echo $g_obj_MCI_Footnotes->a_obj_Task->ReferenceContainer();
echo $g_obj_mci_footnotes->a_obj_task->ReferenceContainer();
}
}
}