Automatically fix 227 errors
This commit is contained in:
parent
d13245a98e
commit
09337696e2
9 changed files with 292 additions and 298 deletions
|
@ -26,7 +26,7 @@ class MCI_Footnotes_Config {
|
||||||
* @since 1.5.0
|
* @since 1.5.0
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
const C_STR_PLUGIN_NAME = "footnotes";
|
const C_STR_PLUGIN_NAME = 'footnotes';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Public Plugin name.
|
* Public Plugin name.
|
||||||
|
|
|
@ -109,19 +109,19 @@ class MCI_Footnotes_Convert {
|
||||||
private static function to_romanic( $p_int_value, $p_bool_upper_case ) {
|
private static function to_romanic( $p_int_value, $p_bool_upper_case ) {
|
||||||
// Table containing all necessary romanic letters.
|
// Table containing all necessary romanic letters.
|
||||||
$l_arr_romanic_letters = array(
|
$l_arr_romanic_letters = array(
|
||||||
'M' => 1000,
|
'M' => 1000,
|
||||||
'CM' => 900,
|
'CM' => 900,
|
||||||
'D' => 500,
|
'D' => 500,
|
||||||
'CD' => 400,
|
'CD' => 400,
|
||||||
'C' => 100,
|
'C' => 100,
|
||||||
'XC' => 90,
|
'XC' => 90,
|
||||||
'L' => 50,
|
'L' => 50,
|
||||||
'XL' => 40,
|
'XL' => 40,
|
||||||
'X' => 10,
|
'X' => 10,
|
||||||
'IX' => 9,
|
'IX' => 9,
|
||||||
'V' => 5,
|
'V' => 5,
|
||||||
'IV' => 4,
|
'IV' => 4,
|
||||||
'I' => 1,
|
'I' => 1,
|
||||||
);
|
);
|
||||||
// Return value.
|
// Return value.
|
||||||
$l_str_return = '';
|
$l_str_return = '';
|
||||||
|
@ -129,7 +129,7 @@ class MCI_Footnotes_Convert {
|
||||||
while ( $p_int_value > 0 ) {
|
while ( $p_int_value > 0 ) {
|
||||||
foreach ( $l_arr_romanic_letters as $l_str_romanic => $l_int_arabic ) {
|
foreach ( $l_arr_romanic_letters as $l_str_romanic => $l_int_arabic ) {
|
||||||
if ( $p_int_value >= $l_int_arabic ) {
|
if ( $p_int_value >= $l_int_arabic ) {
|
||||||
$p_int_value -= $l_int_arabic;
|
$p_int_value -= $l_int_arabic;
|
||||||
$l_str_return .= $l_str_romanic;
|
$l_str_return .= $l_str_romanic;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -197,20 +197,20 @@ class MCI_Footnotes_Convert {
|
||||||
if ( empty( $p_mixed_Value ) ) {
|
if ( empty( $p_mixed_Value ) ) {
|
||||||
var_dump( $p_mixed_Value );
|
var_dump( $p_mixed_Value );
|
||||||
|
|
||||||
} else if ( is_array( $p_mixed_Value ) ) {
|
} elseif ( is_array( $p_mixed_Value ) ) {
|
||||||
printf( '<pre>' );
|
printf( '<pre>' );
|
||||||
print_r( $p_mixed_Value );
|
print_r( $p_mixed_Value );
|
||||||
printf( '</pre>' );
|
printf( '</pre>' );
|
||||||
|
|
||||||
} else if ( is_object( $p_mixed_Value ) ) {
|
} elseif ( is_object( $p_mixed_Value ) ) {
|
||||||
printf( '<pre>' );
|
printf( '<pre>' );
|
||||||
print_r( $p_mixed_Value );
|
print_r( $p_mixed_Value );
|
||||||
printf( '</pre>' );
|
printf( '</pre>' );
|
||||||
|
|
||||||
} else if ( is_numeric( $p_mixed_Value ) || is_int( $p_mixed_Value ) ) {
|
} elseif ( is_numeric( $p_mixed_Value ) || is_int( $p_mixed_Value ) ) {
|
||||||
var_dump( $p_mixed_Value );
|
var_dump( $p_mixed_Value );
|
||||||
|
|
||||||
} else if ( is_date( $p_mixed_Value ) ) {
|
} elseif ( is_date( $p_mixed_Value ) ) {
|
||||||
var_dump( $p_mixed_Value );
|
var_dump( $p_mixed_Value );
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -46,7 +46,6 @@ class MCI_Footnotes {
|
||||||
* @since 2.4.0
|
* @since 2.4.0
|
||||||
* @date 2021-01-04T1355+0100
|
* @date 2021-01-04T1355+0100
|
||||||
*
|
*
|
||||||
*
|
|
||||||
* @link https://wordpress.org/support/topic/template-override-filter/#post-13864301
|
* @link https://wordpress.org/support/topic/template-override-filter/#post-13864301
|
||||||
* @link https://github.com/misfist/footnotes/releases/tag/2.4.0d3 repository
|
* @link https://github.com/misfist/footnotes/releases/tag/2.4.0d3 repository
|
||||||
* @link https://github.com/misfist/footnotes/compare/2.4.0%E2%80%A62.4.0d3 diff
|
* @link https://github.com/misfist/footnotes/compare/2.4.0%E2%80%A62.4.0d3 diff
|
||||||
|
@ -57,7 +56,7 @@ class MCI_Footnotes {
|
||||||
* Load tooltip inline script only if j_query tooltips are enabled.
|
* Load tooltip inline script only if j_query tooltips are enabled.
|
||||||
* Actual value depends on settings.
|
* Actual value depends on settings.
|
||||||
*/
|
*/
|
||||||
public static $a_bool_tooltips_enabled = false;
|
public static $a_bool_tooltips_enabled = false;
|
||||||
public static $a_bool_alternative_tooltips_enabled = false;
|
public static $a_bool_alternative_tooltips_enabled = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -173,9 +172,9 @@ class MCI_Footnotes {
|
||||||
* The condition about tooltips was missing, only the not-alternative-tooltips part was present.
|
* The condition about tooltips was missing, only the not-alternative-tooltips part was present.
|
||||||
*/
|
*/
|
||||||
// Set conditions re-used for stylesheet enqueuing:.
|
// Set conditions re-used for stylesheet enqueuing:.
|
||||||
self::$a_bool_tooltips_enabled = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED ) );
|
self::$a_bool_tooltips_enabled = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_BOOL_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_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE ) );
|
self::$a_bool_alternative_tooltips_enabled = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE ) );
|
||||||
$l_str_script_mode = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE );
|
$l_str_script_mode = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enqueues the j_query library registered by WordPress.
|
* Enqueues the j_query library registered by WordPress.
|
||||||
|
@ -303,14 +302,14 @@ class MCI_Footnotes {
|
||||||
if ( self::$a_bool_tooltips_enabled ) {
|
if ( self::$a_bool_tooltips_enabled ) {
|
||||||
if ( self::$a_bool_alternative_tooltips_enabled ) {
|
if ( self::$a_bool_alternative_tooltips_enabled ) {
|
||||||
$l_str_tooltip_mode = 'al';
|
$l_str_tooltip_mode = 'al';
|
||||||
$l_str_tcomplement = 'ternative-tooltips';
|
$l_str_tcomplement = 'ternative-tooltips';
|
||||||
} else {
|
} else {
|
||||||
$l_str_tooltip_mode = 'jq';
|
$l_str_tooltip_mode = 'jq';
|
||||||
$l_str_tcomplement = 'uery-tooltips';
|
$l_str_tcomplement = 'uery-tooltips';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$l_str_tooltip_mode = 'no';
|
$l_str_tooltip_mode = 'no';
|
||||||
$l_str_tcomplement = '-tooltips';
|
$l_str_tcomplement = '-tooltips';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set basic responsive page layout mode for use in stylesheet name:.
|
// Set basic responsive page layout mode for use in stylesheet name:.
|
||||||
|
|
|
@ -341,7 +341,7 @@ class MCI_Footnotes_Settings {
|
||||||
*
|
*
|
||||||
* @since 1.3.0 Adding: new settings tab for custom CSS settings.
|
* @since 1.3.0 Adding: new settings tab for custom CSS settings.
|
||||||
*/
|
*/
|
||||||
const C_STR_CUSTOM_CSS = 'footnote_inputfield_custom_css';
|
const C_STR_CUSTOM_CSS = 'footnote_inputfield_custom_css';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Settings Container Key for the Custom CSS migrated to a dedicated tab.
|
* Settings Container Key for the Custom CSS migrated to a dedicated tab.
|
||||||
|
@ -350,7 +350,7 @@ class MCI_Footnotes_Settings {
|
||||||
* @date 2020-12-15T0520+0100
|
* @date 2020-12-15T0520+0100
|
||||||
* @var str
|
* @var str
|
||||||
*/
|
*/
|
||||||
const C_STR_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.
|
* Settings Container Key to enable display of legacy Custom CSS metaboxes.
|
||||||
|
@ -435,7 +435,7 @@ class MCI_Footnotes_Settings {
|
||||||
*
|
*
|
||||||
* @var str
|
* @var str
|
||||||
*/
|
*/
|
||||||
const C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS = 'footnotes_inputfield_referrer_superscript_tags';
|
const C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS = 'footnotes_inputfield_referrer_superscript_tags';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Settings Container Key to enable the display of a backlink symbol.
|
* Settings Container Key to enable the display of a backlink symbol.
|
||||||
|
@ -463,7 +463,7 @@ class MCI_Footnotes_Settings {
|
||||||
*
|
*
|
||||||
* @var str
|
* @var str
|
||||||
*/
|
*/
|
||||||
const C_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE = 'footnotes_inputfield_reference_container_start_page_enable';
|
const C_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE = 'footnotes_inputfield_reference_container_start_page_enable';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Settings Container Key to enable the legacy layout of the reference container.
|
* Settings Container Key to enable the legacy layout of the reference container.
|
||||||
|
@ -473,7 +473,7 @@ class MCI_Footnotes_Settings {
|
||||||
* @since 2.1.1
|
* @since 2.1.1
|
||||||
* @var str
|
* @var str
|
||||||
*/
|
*/
|
||||||
const C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE = 'footnotes_inputfield_reference_container_3column_layout_enable';
|
const C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE = 'footnotes_inputfield_reference_container_3column_layout_enable';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Settings Container Key to get the backlink symbol switch side.
|
* Settings Container Key to get the backlink symbol switch side.
|
||||||
|
@ -498,7 +498,7 @@ class MCI_Footnotes_Settings {
|
||||||
*
|
*
|
||||||
* @var str
|
* @var str
|
||||||
*/
|
*/
|
||||||
const C_INT_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 '' hook priority level
|
* Settings Container Key for '' hook priority level
|
||||||
|
@ -531,15 +531,15 @@ class MCI_Footnotes_Settings {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Link element option:.
|
// Link element option:.
|
||||||
const C_BOOL_LINK_ELEMENT_ENABLED = 'footnote_inputfield_link_element_enabled';
|
const C_BOOL_LINK_ELEMENT_ENABLED = 'footnote_inputfield_link_element_enabled';
|
||||||
|
|
||||||
// Backlink typography:.
|
// Backlink typography:.
|
||||||
const C_BOOL_BACKLINKS_SEPARATOR_ENABLED = 'footnotes_inputfield_backlinks_separator_enabled';
|
const C_BOOL_BACKLINKS_SEPARATOR_ENABLED = 'footnotes_inputfield_backlinks_separator_enabled';
|
||||||
const C_STR_BACKLINKS_SEPARATOR_OPTION = 'footnotes_inputfield_backlinks_separator_option';
|
const C_STR_BACKLINKS_SEPARATOR_OPTION = 'footnotes_inputfield_backlinks_separator_option';
|
||||||
const C_STR_BACKLINKS_SEPARATOR_CUSTOM = 'footnotes_inputfield_backlinks_separator_custom';
|
const C_STR_BACKLINKS_SEPARATOR_CUSTOM = 'footnotes_inputfield_backlinks_separator_custom';
|
||||||
const C_BOOL_BACKLINKS_TERMINATOR_ENABLED = 'footnotes_inputfield_backlinks_terminator_enabled';
|
const C_BOOL_BACKLINKS_TERMINATOR_ENABLED = 'footnotes_inputfield_backlinks_terminator_enabled';
|
||||||
const C_STR_BACKLINKS_TERMINATOR_OPTION = 'footnotes_inputfield_backlinks_terminator_option';
|
const C_STR_BACKLINKS_TERMINATOR_OPTION = 'footnotes_inputfield_backlinks_terminator_option';
|
||||||
const C_STR_BACKLINKS_TERMINATOR_CUSTOM = 'footnotes_inputfield_backlinks_terminator_custom';
|
const C_STR_BACKLINKS_TERMINATOR_CUSTOM = 'footnotes_inputfield_backlinks_terminator_custom';
|
||||||
|
|
||||||
// Backlink layout:.
|
// Backlink layout:.
|
||||||
const C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED = 'footnotes_inputfield_backlinks_column_width_enabled';
|
const C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED = 'footnotes_inputfield_backlinks_column_width_enabled';
|
||||||
|
@ -552,12 +552,12 @@ class MCI_Footnotes_Settings {
|
||||||
|
|
||||||
// Tooltip font size:.
|
// Tooltip font size:.
|
||||||
// Called mouse over box not tooltip for consistency.
|
// Called mouse over box not tooltip for consistency.
|
||||||
const C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED = 'footnotes_inputfield_mouse_over_box_font_size_enabled';
|
const C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED = 'footnotes_inputfield_mouse_over_box_font_size_enabled';
|
||||||
const C_FLO_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';
|
||||||
const C_STR_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';
|
||||||
|
|
||||||
// Page layout support:.
|
// Page layout support:.
|
||||||
const C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT = 'footnotes_inputfield_page_layout_support';
|
const C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT = 'footnotes_inputfield_page_layout_support';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Scroll offset and duration
|
* Scroll offset and duration
|
||||||
|
@ -569,15 +569,15 @@ class MCI_Footnotes_Settings {
|
||||||
* @date 2020-12-05T0538+0100
|
* @date 2020-12-05T0538+0100
|
||||||
*/
|
*/
|
||||||
// Scroll offset and duration:.
|
// Scroll offset and duration:.
|
||||||
const C_INT_FOOTNOTES_SCROLL_OFFSET = 'footnotes_inputfield_scroll_offset';
|
const C_INT_FOOTNOTES_SCROLL_OFFSET = 'footnotes_inputfield_scroll_offset';
|
||||||
const C_INT_FOOTNOTES_SCROLL_DURATION = 'footnotes_inputfield_scroll_duration';
|
const C_INT_FOOTNOTES_SCROLL_DURATION = 'footnotes_inputfield_scroll_duration';
|
||||||
|
|
||||||
// Tooltip display durations:.
|
// Tooltip display durations:.
|
||||||
// Called mouse over box not tooltip for consistency.
|
// Called mouse over box not tooltip for consistency.
|
||||||
const C_INT_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';
|
||||||
const C_INT_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';
|
||||||
const C_INT_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';
|
||||||
const C_INT_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
|
* Settings Container Key for URL wrap option
|
||||||
|
@ -590,7 +590,7 @@ class MCI_Footnotes_Settings {
|
||||||
*
|
*
|
||||||
* 2020-12-09T1554+0100..2020-12-13T1313+0100
|
* 2020-12-09T1554+0100..2020-12-13T1313+0100
|
||||||
*/
|
*/
|
||||||
const C_BOOL_FOOTNOTE_URL_WRAP_ENABLED = 'footnote_inputfield_url_wrap_enabled';
|
const C_BOOL_FOOTNOTE_URL_WRAP_ENABLED = 'footnote_inputfield_url_wrap_enabled';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Settings Container Key for reference container position shortcode
|
* Settings Container Key for reference container position shortcode
|
||||||
|
@ -600,7 +600,7 @@ class MCI_Footnotes_Settings {
|
||||||
*
|
*
|
||||||
* 2020-12-13T2056+0100
|
* 2020-12-13T2056+0100
|
||||||
*/
|
*/
|
||||||
const C_STR_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 Keys for alternative tooltip position
|
* Settings Container Keys for alternative tooltip position
|
||||||
|
@ -619,8 +619,8 @@ class MCI_Footnotes_Settings {
|
||||||
const C_INT_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';
|
||||||
const C_INT_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';
|
||||||
|
|
||||||
const C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT = 'footnotes_inputfield_reference_container_label_element';
|
const C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT = 'footnotes_inputfield_reference_container_label_element';
|
||||||
const C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER = 'footnotes_inputfield_reference_container_label_bottom_border';
|
const C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER = 'footnotes_inputfield_reference_container_label_bottom_border';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Settings Container Key for table cell borders, thanks to @noobishh
|
* Settings Container Key for table cell borders, thanks to @noobishh
|
||||||
|
@ -632,7 +632,7 @@ class MCI_Footnotes_Settings {
|
||||||
*
|
*
|
||||||
* 2020-12-25T2311+0100
|
* 2020-12-25T2311+0100
|
||||||
*/
|
*/
|
||||||
const C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE = 'footnotes_inputfield_reference_container_row_borders_enable';
|
const C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE = 'footnotes_inputfield_reference_container_row_borders_enable';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Settings container keys for reference container top and bottom margins
|
* Settings container keys for reference container top and bottom margins
|
||||||
|
@ -810,175 +810,175 @@ class MCI_Footnotes_Settings {
|
||||||
*/
|
*/
|
||||||
private $a_arr_default = array(
|
private $a_arr_default = array(
|
||||||
|
|
||||||
'footnotes_storage' => array(
|
'footnotes_storage' => array(
|
||||||
|
|
||||||
self::C_STR_FOOTNOTES_SHORT_CODE_START => '((',
|
self::C_STR_FOOTNOTES_SHORT_CODE_START => '((',
|
||||||
self::C_STR_FOOTNOTES_SHORT_CODE_END => '))',
|
self::C_STR_FOOTNOTES_SHORT_CODE_END => '))',
|
||||||
self::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED => '',
|
self::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED => '',
|
||||||
self::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED => '',
|
self::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED => '',
|
||||||
|
|
||||||
self::C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE => 'yes',
|
self::C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE => 'yes',
|
||||||
|
|
||||||
self::C_STR_FOOTNOTES_COUNTER_STYLE => 'arabic_plain',
|
self::C_STR_FOOTNOTES_COUNTER_STYLE => 'arabic_plain',
|
||||||
self::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES => 'yes',
|
self::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES => 'yes',
|
||||||
|
|
||||||
self::C_BOOL_FOOTNOTES_HARD_LINKS_ENABLE => 'no',
|
self::C_BOOL_FOOTNOTES_HARD_LINKS_ENABLE => 'no',
|
||||||
self::C_STR_REFERRER_FRAGMENT_ID_SLUG => 'r',
|
self::C_STR_REFERRER_FRAGMENT_ID_SLUG => 'r',
|
||||||
self::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG => 'f',
|
self::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG => 'f',
|
||||||
self::C_STR_HARD_LINK_IDS_SEPARATOR => '+',
|
self::C_STR_HARD_LINK_IDS_SEPARATOR => '+',
|
||||||
self::C_INT_FOOTNOTES_SCROLL_OFFSET => 20,
|
self::C_INT_FOOTNOTES_SCROLL_OFFSET => 20,
|
||||||
self::C_INT_FOOTNOTES_SCROLL_DURATION => 380,
|
self::C_INT_FOOTNOTES_SCROLL_DURATION => 380,
|
||||||
|
|
||||||
// 2.5.4 fast-tracked:.
|
// 2.5.4 fast-tracked:.
|
||||||
self::C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE => 'yes',
|
self::C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE => 'yes',
|
||||||
self::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT => 'Alt+ ←',
|
self::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT => 'Alt+ ←',
|
||||||
|
|
||||||
|
|
||||||
self::C_STR_REFERENCE_CONTAINER_NAME => 'References',
|
self::C_STR_REFERENCE_CONTAINER_NAME => 'References',
|
||||||
self::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT => 'p',
|
self::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT => 'p',
|
||||||
self::C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER => 'yes',
|
self::C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER => 'yes',
|
||||||
self::C_BOOL_REFERENCE_CONTAINER_COLLAPSE => 'no',
|
self::C_BOOL_REFERENCE_CONTAINER_COLLAPSE => 'no',
|
||||||
self::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE => 'jquery',
|
self::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE => 'jquery',
|
||||||
|
|
||||||
self::C_STR_REFERENCE_CONTAINER_POSITION => 'post_end',
|
self::C_STR_REFERENCE_CONTAINER_POSITION => 'post_end',
|
||||||
self::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE => '[[references]]',
|
self::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE => '[[references]]',
|
||||||
self::C_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE => 'yes',
|
self::C_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE => 'yes',
|
||||||
|
|
||||||
// Whether to enqueue additional stylesheet:.
|
// Whether to enqueue additional stylesheet:.
|
||||||
self::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT => 'none',
|
self::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT => 'none',
|
||||||
|
|
||||||
// Top and bottom margins:.
|
// Top and bottom margins:.
|
||||||
self::C_INT_REFERENCE_CONTAINER_TOP_MARGIN => 24,
|
self::C_INT_REFERENCE_CONTAINER_TOP_MARGIN => 24,
|
||||||
self::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN => 0,
|
self::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN => 0,
|
||||||
|
|
||||||
// Table cell borders:.
|
// Table cell borders:.
|
||||||
self::C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE => 'no',
|
self::C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE => 'no',
|
||||||
|
|
||||||
// Backlink symbol:.
|
// Backlink symbol:.
|
||||||
self::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE => 'no',
|
self::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE => 'no',
|
||||||
self::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE => 'yes',
|
self::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE => 'yes',
|
||||||
self::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH => 'no',
|
self::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH => 'no',
|
||||||
|
|
||||||
// Backlink separators and terminators are often not preferred..
|
// Backlink separators and terminators are often not preferred..
|
||||||
// But a choice must be provided along with the ability to customize:.
|
// But a choice must be provided along with the ability to customize:.
|
||||||
self::C_BOOL_BACKLINKS_SEPARATOR_ENABLED => 'yes',
|
self::C_BOOL_BACKLINKS_SEPARATOR_ENABLED => 'yes',
|
||||||
self::C_STR_BACKLINKS_SEPARATOR_OPTION => 'comma',
|
self::C_STR_BACKLINKS_SEPARATOR_OPTION => 'comma',
|
||||||
self::C_STR_BACKLINKS_SEPARATOR_CUSTOM => '',
|
self::C_STR_BACKLINKS_SEPARATOR_CUSTOM => '',
|
||||||
self::C_BOOL_BACKLINKS_TERMINATOR_ENABLED => 'no',
|
self::C_BOOL_BACKLINKS_TERMINATOR_ENABLED => 'no',
|
||||||
self::C_STR_BACKLINKS_TERMINATOR_OPTION => 'full_stop',
|
self::C_STR_BACKLINKS_TERMINATOR_OPTION => 'full_stop',
|
||||||
self::C_STR_BACKLINKS_TERMINATOR_CUSTOM => '',
|
self::C_STR_BACKLINKS_TERMINATOR_CUSTOM => '',
|
||||||
|
|
||||||
// Set backlinks column width:.
|
// Set backlinks column width:.
|
||||||
self::C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED => 'no',
|
self::C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED => 'no',
|
||||||
self::C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR => '50',
|
self::C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR => '50',
|
||||||
self::C_STR_BACKLINKS_COLUMN_WIDTH_UNIT => 'px',
|
self::C_STR_BACKLINKS_COLUMN_WIDTH_UNIT => 'px',
|
||||||
|
|
||||||
// Set backlinks column max. width:.
|
// Set backlinks column max. width:.
|
||||||
self::C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED => 'no',
|
self::C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED => 'no',
|
||||||
self::C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR => '140',
|
self::C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR => '140',
|
||||||
self::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT => 'px',
|
self::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT => 'px',
|
||||||
|
|
||||||
// Whether a <br /> tag is inserted:.
|
// Whether a <br /> tag is inserted:.
|
||||||
self::C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED => 'no',
|
self::C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED => 'no',
|
||||||
|
|
||||||
// Whether to enable URL line wrapping:.
|
// Whether to enable URL line wrapping:.
|
||||||
self::C_BOOL_FOOTNOTE_URL_WRAP_ENABLED => 'yes',
|
self::C_BOOL_FOOTNOTE_URL_WRAP_ENABLED => 'yes',
|
||||||
|
|
||||||
// Whether to use link elements:.
|
// Whether to use link elements:.
|
||||||
self::C_BOOL_LINK_ELEMENT_ENABLED => 'yes',
|
self::C_BOOL_LINK_ELEMENT_ENABLED => 'yes',
|
||||||
|
|
||||||
// Excerpt should be disabled:.
|
// Excerpt should be disabled:.
|
||||||
self::C_BOOL_FOOTNOTES_IN_EXCERPT => 'no',
|
self::C_BOOL_FOOTNOTES_IN_EXCERPT => 'no',
|
||||||
|
|
||||||
self::C_BOOL_FOOTNOTES_EXPERT_MODE => 'yes',
|
self::C_BOOL_FOOTNOTES_EXPERT_MODE => 'yes',
|
||||||
|
|
||||||
self::C_STR_FOOTNOTES_LOVE => 'no',
|
self::C_STR_FOOTNOTES_LOVE => 'no',
|
||||||
|
|
||||||
),
|
),
|
||||||
|
|
||||||
'footnotes_storage_custom' => array(
|
'footnotes_storage_custom' => array(
|
||||||
|
|
||||||
self::C_STR_HYPERLINK_ARROW => '↑',
|
self::C_STR_HYPERLINK_ARROW => '↑',
|
||||||
self::C_STR_HYPERLINK_ARROW_USER_DEFINED => '',
|
self::C_STR_HYPERLINK_ARROW_USER_DEFINED => '',
|
||||||
|
|
||||||
self::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL => 'Continue reading',
|
self::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL => 'Continue reading',
|
||||||
|
|
||||||
self::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS => 'yes',
|
self::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS => 'yes',
|
||||||
|
|
||||||
self::C_STR_FOOTNOTES_STYLING_BEFORE => '[',
|
self::C_STR_FOOTNOTES_STYLING_BEFORE => '[',
|
||||||
self::C_STR_FOOTNOTES_STYLING_AFTER => ']',
|
self::C_STR_FOOTNOTES_STYLING_AFTER => ']',
|
||||||
|
|
||||||
self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED => 'yes',
|
self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED => 'yes',
|
||||||
|
|
||||||
self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE => 'no',
|
self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE => 'no',
|
||||||
|
|
||||||
// The mouse over content truncation should be enabled by default.
|
// The mouse over content truncation should be enabled by default.
|
||||||
// To raise awareness of the functionality and to prevent the screen.
|
// To raise awareness of the functionality and to prevent the screen.
|
||||||
// From being filled at mouse-over, and to allow the Continue reading:.
|
// From being filled at mouse-over, and to allow the Continue reading:.
|
||||||
self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED => 'yes',
|
self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED => 'yes',
|
||||||
|
|
||||||
// The truncation length is raised from 150 to 200 chars:.
|
// The truncation length is raised from 150 to 200 chars:.
|
||||||
self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH => 200,
|
self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH => 200,
|
||||||
|
|
||||||
// 2.5.4 fast-tracked:.
|
// 2.5.4 fast-tracked:.
|
||||||
self::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER => '[[/tooltip]]',
|
self::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER => '[[/tooltip]]',
|
||||||
self::C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE => 'no',
|
self::C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE => 'no',
|
||||||
self::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR => ' — ',
|
self::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR => ' — ',
|
||||||
self::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT => 'no',
|
self::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT => 'no',
|
||||||
|
|
||||||
|
|
||||||
// The default position should not be lateral because of the risk.
|
// The default position should not be lateral because of the risk.
|
||||||
// The box gets squeezed between note anchor at line end and window edge,.
|
// 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:.
|
// And top because reading at the bottom of the window is more likely:.
|
||||||
self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION => 'top center',
|
self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION => 'top center',
|
||||||
|
|
||||||
self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X => 0,
|
self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X => 0,
|
||||||
// The vertical offset must be negative for the box not to cover.
|
// The vertical offset must be negative for the box not to cover.
|
||||||
// The current line of text (web coordinates origin is top left):.
|
// The current line of text (web coordinates origin is top left):.
|
||||||
self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y => -7,
|
self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y => -7,
|
||||||
|
|
||||||
// The width should be limited to start with, for the box to have shape:.
|
// The width should be limited to start with, for the box to have shape:.
|
||||||
self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH => 450,
|
self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH => 450,
|
||||||
|
|
||||||
// Fixed width is for alternative tooltips, cannot reuse max-width nor offsets:.
|
// Fixed width is for alternative tooltips, cannot reuse max-width nor offsets:.
|
||||||
self::C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION => 'top right',
|
self::C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION => 'top right',
|
||||||
self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X => -50,
|
self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X => -50,
|
||||||
self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y => 24,
|
self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y => 24,
|
||||||
self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH => 400,
|
self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH => 400,
|
||||||
|
|
||||||
// Tooltip display durations:.
|
// Tooltip display durations:.
|
||||||
// Called mouse over box not tooltip for consistency.
|
// Called mouse over box not tooltip for consistency.
|
||||||
self::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY => 0,
|
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_IN_DURATION => 200,
|
||||||
self::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY => 400,
|
self::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY => 400,
|
||||||
self::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION => 200,
|
self::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION => 200,
|
||||||
|
|
||||||
// Tooltip font size reset to legacy by default since 2.1.4;.
|
// Tooltip font size reset to legacy by default since 2.1.4;.
|
||||||
// Was set to inherit since 2.1.1 as it overrode custom CSS,.
|
// Was set to inherit since 2.1.1 as it overrode custom CSS,.
|
||||||
// Is moved to settings since 2.1.4 2020-12-04T1023+0100.
|
// Is moved to settings since 2.1.4 2020-12-04T1023+0100.
|
||||||
self::C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED => 'yes',
|
self::C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED => 'yes',
|
||||||
self::C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR => 13,
|
self::C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR => 13,
|
||||||
self::C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT => 'px',
|
self::C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT => 'px',
|
||||||
|
|
||||||
self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR => '',
|
self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR => '',
|
||||||
// The mouse over box shouldn’t feature a colored background.
|
// The mouse over box shouldn’t feature a colored background.
|
||||||
// By default, due to diverging user preferences. White is neutral:.
|
// By default, due to diverging user preferences. White is neutral:.
|
||||||
self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND => '#ffffff',
|
self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND => '#ffffff',
|
||||||
|
|
||||||
self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH => 1,
|
self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH => 1,
|
||||||
self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR => '#cccc99',
|
self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR => '#cccc99',
|
||||||
|
|
||||||
// The mouse over box corners mustn’t be rounded as that is outdated:.
|
// The mouse over box corners mustn’t be rounded as that is outdated:.
|
||||||
self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS => 0,
|
self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS => 0,
|
||||||
|
|
||||||
self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR => '#666666',
|
self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR => '#666666',
|
||||||
|
|
||||||
// Custom CSS migrates to a dedicated tab:.
|
// Custom CSS migrates to a dedicated tab:.
|
||||||
self::C_STR_CUSTOM_CSS => '',
|
self::C_STR_CUSTOM_CSS => '',
|
||||||
|
|
||||||
),
|
),
|
||||||
|
|
||||||
'footnotes_storage_expert' => array(
|
'footnotes_storage_expert' => array(
|
||||||
|
|
||||||
// These are checkboxes; keyword 'checked' is converted to Boolean true,.
|
// These are checkboxes; keyword 'checked' is converted to Boolean true,.
|
||||||
// Empty string to false (default):.
|
// Empty string to false (default):.
|
||||||
|
@ -988,45 +988,45 @@ class MCI_Footnotes_Settings {
|
||||||
// See <https://wordpress.org/support/topic/more-feature-ideas/>.
|
// See <https://wordpress.org/support/topic/more-feature-ideas/>.
|
||||||
// Yet in titles, footnotes are still buggy, because WordPress.
|
// Yet in titles, footnotes are still buggy, because WordPress.
|
||||||
// Uses the title string in menus and in the title element..
|
// Uses the title string in menus and in the title element..
|
||||||
self::C_BOOL_EXPERT_LOOKUP_THE_TITLE => '',
|
self::C_BOOL_EXPERT_LOOKUP_THE_TITLE => '',
|
||||||
|
|
||||||
self::C_BOOL_EXPERT_LOOKUP_THE_CONTENT => 'checked',
|
self::C_BOOL_EXPERT_LOOKUP_THE_CONTENT => 'checked',
|
||||||
|
|
||||||
// And the_excerpt is disabled by default following @nikelaos in.
|
// And the_excerpt is disabled by default following @nikelaos in.
|
||||||
// <https://wordpress.org/support/topic/jquery-comes-up-in-feed-content/#post-13110879>.
|
// <https://wordpress.org/support/topic/jquery-comes-up-in-feed-content/#post-13110879>.
|
||||||
// <https://wordpress.org/support/topic/doesnt-work-any-more-11/#post-13687068>.
|
// <https://wordpress.org/support/topic/doesnt-work-any-more-11/#post-13687068>.
|
||||||
self::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT => '',
|
self::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT => '',
|
||||||
|
|
||||||
self::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE => '',
|
self::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE => '',
|
||||||
|
|
||||||
// The widget_text hook must be disabled by default, because it causes.
|
// The widget_text hook must be disabled by default, because it causes.
|
||||||
// Multiple reference containers to appear in Elementor accordions, but.
|
// Multiple reference containers to appear in Elementor accordions, but.
|
||||||
// It must be enabled if multiple reference containers are desired, as.
|
// It must be enabled if multiple reference containers are desired, as.
|
||||||
// In Elementor toggles..
|
// In Elementor toggles..
|
||||||
self::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT => '',
|
self::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT => '',
|
||||||
|
|
||||||
// Initially hard-coded default.
|
// Initially hard-coded default.
|
||||||
// Shows "9223372036854780000" instead of 9223372036854775807 in the numbox.
|
// Shows "9223372036854780000" instead of 9223372036854775807 in the numbox.
|
||||||
// Empty should be interpreted as PHP_INT_MAX, but a numbox cannot be set to empty:.
|
// Empty should be interpreted as PHP_INT_MAX, but a numbox cannot be set to empty:.
|
||||||
// <https://github.com/Modernizr/Modernizr/issues/171>.
|
// <https://github.com/Modernizr/Modernizr/issues/171>.
|
||||||
// Interpret -1 as PHP_INT_MAX instead.
|
// Interpret -1 as PHP_INT_MAX instead.
|
||||||
self::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL => PHP_INT_MAX,
|
self::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL => PHP_INT_MAX,
|
||||||
|
|
||||||
// Priority level of the_content and of widget_text as the only relevant.
|
// Priority level of the_content and of widget_text as the only relevant.
|
||||||
// Hooks must be less than 99 because social buttons may yield scripts.
|
// Hooks must be less than 99 because social buttons may yield scripts.
|
||||||
// That contain the strings '((' and '))', i.e. the default footnote.
|
// That contain the strings '((' and '))', i.e. the default footnote.
|
||||||
// Start and end short codes, causing issues with fake footnotes..
|
// Start and end short codes, causing issues with fake footnotes..
|
||||||
self::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL => 98,
|
self::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL => 98,
|
||||||
self::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL => PHP_INT_MAX,
|
self::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL => PHP_INT_MAX,
|
||||||
self::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL => PHP_INT_MAX,
|
self::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL => PHP_INT_MAX,
|
||||||
self::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL => 98,
|
self::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL => 98,
|
||||||
|
|
||||||
),
|
),
|
||||||
|
|
||||||
'footnotes_storage_custom_css' => array(
|
'footnotes_storage_custom_css' => array(
|
||||||
|
|
||||||
self::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE => 'yes',
|
self::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE => 'yes',
|
||||||
self::C_STR_CUSTOM_CSS_NEW => '',
|
self::C_STR_CUSTOM_CSS_NEW => '',
|
||||||
|
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|
131
class/task.php
131
class/task.php
|
@ -167,7 +167,6 @@ class MCI_Footnotes_Task {
|
||||||
* @since 2.4.0
|
* @since 2.4.0
|
||||||
* @date 2021-01-04T1355+0100
|
* @date 2021-01-04T1355+0100
|
||||||
*
|
*
|
||||||
*
|
|
||||||
* @link https://wordpress.org/support/topic/template-override-filter/#post-13864301
|
* @link https://wordpress.org/support/topic/template-override-filter/#post-13864301
|
||||||
* @link https://github.com/misfist/footnotes/releases/tag/2.4.0d3 repository
|
* @link https://github.com/misfist/footnotes/releases/tag/2.4.0d3 repository
|
||||||
* @link https://github.com/misfist/footnotes/compare/2.4.0%E2%80%A62.4.0d3 diff
|
* @link https://github.com/misfist/footnotes/compare/2.4.0%E2%80%A62.4.0d3 diff
|
||||||
|
@ -178,7 +177,7 @@ class MCI_Footnotes_Task {
|
||||||
* Load tooltip inline script only if j_query tooltips are enabled.
|
* Load tooltip inline script only if j_query tooltips are enabled.
|
||||||
* Actual value depends on settings.
|
* Actual value depends on settings.
|
||||||
*/
|
*/
|
||||||
public static $a_bool_tooltips_enabled = false;
|
public static $a_bool_tooltips_enabled = false;
|
||||||
public static $a_bool_alternative_tooltips_enabled = false;
|
public static $a_bool_alternative_tooltips_enabled = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -210,10 +209,10 @@ class MCI_Footnotes_Task {
|
||||||
* animated scrolling.
|
* animated scrolling.
|
||||||
* When the alternative reference container is enabled, hard links are too.
|
* When the alternative reference container is enabled, hard links are too.
|
||||||
*/
|
*/
|
||||||
public static $a_bool_hard_links_enable = false;
|
public static $a_bool_hard_links_enable = false;
|
||||||
public static $a_str_referrer_link_slug = 'r';
|
public static $a_str_referrer_link_slug = 'r';
|
||||||
public static $a_str_footnote_link_slug = 'f';
|
public static $a_str_footnote_link_slug = 'f';
|
||||||
public static $a_str_link_ids_separator = '+';
|
public static $a_str_link_ids_separator = '+';
|
||||||
public static $a_str_post_container_id_compound = '';
|
public static $a_str_post_container_id_compound = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -240,7 +239,7 @@ class MCI_Footnotes_Task {
|
||||||
* Scroll offset may now need to get into inline CSS.
|
* Scroll offset may now need to get into inline CSS.
|
||||||
* Hence it needs to be loaded twice, because priority levels may not match.
|
* Hence it needs to be loaded twice, because priority levels may not match.
|
||||||
*/
|
*/
|
||||||
public static $a_int_scroll_offset = 34;
|
public static $a_int_scroll_offset = 34;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Optional link element for footnote referrers and backlinks
|
* Optional link element for footnote referrers and backlinks
|
||||||
|
@ -289,7 +288,7 @@ class MCI_Footnotes_Task {
|
||||||
*
|
*
|
||||||
* @see self::$a_bool_hard_links_enable
|
* @see self::$a_bool_hard_links_enable
|
||||||
*/
|
*/
|
||||||
public static $a_str_link_span = 'span';
|
public static $a_str_link_span = 'span';
|
||||||
public static $a_str_link_open_tag = '';
|
public static $a_str_link_open_tag = '';
|
||||||
public static $a_str_link_close_tag = '';
|
public static $a_str_link_close_tag = '';
|
||||||
|
|
||||||
|
@ -309,8 +308,8 @@ class MCI_Footnotes_Task {
|
||||||
* the footnote text separating the tooltip text from the note.
|
* the footnote text separating the tooltip text from the note.
|
||||||
* That is consistent with what WordPress does for excerpts.
|
* That is consistent with what WordPress does for excerpts.
|
||||||
*/
|
*/
|
||||||
public static $a_bool_mirror_tooltip_text = false;
|
public static $a_bool_mirror_tooltip_text = false;
|
||||||
public static $a_str_tooltip_shortcode = '[[/tooltip]]';
|
public static $a_str_tooltip_shortcode = '[[/tooltip]]';
|
||||||
public static $a_int_tooltip_shortcode_length = 12;
|
public static $a_int_tooltip_shortcode_length = 12;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -547,7 +546,7 @@ class MCI_Footnotes_Task {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Reset stored footnotes when displaying the header.
|
// Reset stored footnotes when displaying the header.
|
||||||
self::$a_arr_footnotes = array();
|
self::$a_arr_footnotes = array();
|
||||||
self::$a_bool_allow_love_me = true;
|
self::$a_bool_allow_love_me = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -619,7 +618,7 @@ class MCI_Footnotes_Task {
|
||||||
* @reporter @hamshe
|
* @reporter @hamshe
|
||||||
* @link https://wordpress.org/support/topic/reference-container-in-elementor/#post-13786635
|
* @link https://wordpress.org/support/topic/reference-container-in-elementor/#post-13786635
|
||||||
*/
|
*/
|
||||||
$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_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 ) );
|
$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 '.footnotes_reference_container {margin-top: ';
|
||||||
echo empty( $l_int_reference_container_top_margin ) ? '0' : $l_int_reference_container_top_margin;
|
echo empty( $l_int_reference_container_top_margin ) ? '0' : $l_int_reference_container_top_margin;
|
||||||
|
@ -666,7 +665,7 @@ class MCI_Footnotes_Task {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ref container first column width and max-width:.
|
// 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_width_enabled = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_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 ) );
|
$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_max_width_enabled ) {
|
if ( $l_bool_column_width_enabled || $l_bool_column_max_width_enabled ) {
|
||||||
|
@ -676,7 +675,7 @@ class MCI_Footnotes_Task {
|
||||||
if ( $l_bool_column_width_enabled ) {
|
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_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 );
|
$l_str_column_width_unit = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_WIDTH_UNIT );
|
||||||
|
|
||||||
if ( ! empty( $l_int_column_width_scalar ) ) {
|
if ( ! empty( $l_int_column_width_scalar ) ) {
|
||||||
if ( $l_str_column_width_unit == '%' ) {
|
if ( $l_str_column_width_unit == '%' ) {
|
||||||
|
@ -694,7 +693,7 @@ class MCI_Footnotes_Task {
|
||||||
if ( $l_bool_column_max_width_enabled ) {
|
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_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 );
|
$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_max_width_scalar ) ) {
|
if ( ! empty( $l_int_column_max_width_scalar ) ) {
|
||||||
if ( $l_str_column_maxWidth_unit == '%' ) {
|
if ( $l_str_column_maxWidth_unit == '%' ) {
|
||||||
|
@ -737,7 +736,7 @@ class MCI_Footnotes_Task {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tooltips:.
|
// Tooltips:.
|
||||||
self::$a_bool_tooltips_enabled = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED ) );
|
self::$a_bool_tooltips_enabled = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_BOOL_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_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE ) );
|
self::$a_bool_alternative_tooltips_enabled = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE ) );
|
||||||
|
|
||||||
if ( self::$a_bool_tooltips_enabled ) {
|
if ( self::$a_bool_tooltips_enabled ) {
|
||||||
|
@ -838,7 +837,7 @@ class MCI_Footnotes_Task {
|
||||||
|
|
||||||
// Position:.
|
// Position:.
|
||||||
$l_str_alternative_position = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION );
|
$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 ) );
|
$l_int_offset_x = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X ) );
|
||||||
|
|
||||||
if ( $l_str_alternative_position == 'top left' || $l_str_alternative_position == 'bottom left' ) {
|
if ( $l_str_alternative_position == 'top left' || $l_str_alternative_position == 'bottom left' ) {
|
||||||
echo ' right: ' . ( ! empty( $l_int_offset_x ) ? $l_int_offset_x : 0 ) . 'px;';
|
echo ' right: ' . ( ! empty( $l_int_offset_x ) ? $l_int_offset_x : 0 ) . 'px;';
|
||||||
|
@ -858,18 +857,18 @@ class MCI_Footnotes_Task {
|
||||||
// Timing:.
|
// Timing:.
|
||||||
// J_query tooltip timing is in templates/public/tooltip.html, filled in after line 690 below..
|
// J_query tooltip timing is in templates/public/tooltip.html, filled in after line 690 below..
|
||||||
echo ' .footnote_tooltip.shown {';
|
echo ' .footnote_tooltip.shown {';
|
||||||
$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 = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY ) );
|
||||||
$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 = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION ) );
|
||||||
$l_int_fade_in_delay = ! empty( $l_int_fade_in_delay ) ? $l_int_fade_in_delay : '0';
|
$l_int_fade_in_delay = ! empty( $l_int_fade_in_delay ) ? $l_int_fade_in_delay : '0';
|
||||||
$l_int_fade_in_duration = ! empty( $l_int_fade_in_duration ) ? $l_int_fade_in_duration : '0';
|
$l_int_fade_in_duration = ! empty( $l_int_fade_in_duration ) ? $l_int_fade_in_duration : '0';
|
||||||
echo " transition-delay: $l_int_fade_in_delay" . 'ms;';
|
echo " transition-delay: $l_int_fade_in_delay" . 'ms;';
|
||||||
echo " transition-duration: $l_int_fade_in_duration" . 'ms;';
|
echo " transition-duration: $l_int_fade_in_duration" . 'ms;';
|
||||||
|
|
||||||
echo '} .footnote_tooltip.hidden {';
|
echo '} .footnote_tooltip.hidden {';
|
||||||
$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 = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY ) );
|
||||||
$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 = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION ) );
|
||||||
$l_int_fade_out_delay = ! empty( $l_int_fade_out_delay ) ? $l_int_fade_out_delay : '0';
|
$l_int_fade_out_delay = ! empty( $l_int_fade_out_delay ) ? $l_int_fade_out_delay : '0';
|
||||||
$l_int_fade_out_duration = ! empty( $l_int_fade_out_duration ) ? $l_int_fade_out_duration : '0';
|
$l_int_fade_out_duration = ! empty( $l_int_fade_out_duration ) ? $l_int_fade_out_duration : '0';
|
||||||
echo " transition-delay: $l_int_fade_out_delay" . 'ms;';
|
echo " transition-delay: $l_int_fade_out_delay" . 'ms;';
|
||||||
echo " transition-duration: $l_int_fade_out_duration" . 'ms;';
|
echo " transition-duration: $l_int_fade_out_duration" . 'ms;';
|
||||||
|
|
||||||
|
@ -1063,9 +1062,9 @@ class MCI_Footnotes_Task {
|
||||||
*/
|
*/
|
||||||
private function replace_post_object( $p_obj_post ) {
|
private function replace_post_object( $p_obj_post ) {
|
||||||
// MCI_Footnotes_Convert::debug($p_obj_post);.
|
// MCI_Footnotes_Convert::debug($p_obj_post);.
|
||||||
$p_obj_post->post_content = $this->exec( $p_obj_post->post_content );
|
$p_obj_post->post_content = $this->exec( $p_obj_post->post_content );
|
||||||
$p_obj_post->post_content_filtered = $this->exec( $p_obj_post->post_content_filtered );
|
$p_obj_post->post_content_filtered = $this->exec( $p_obj_post->post_content_filtered );
|
||||||
$p_obj_post->post_excerpt = $this->exec( $p_obj_post->post_excerpt );
|
$p_obj_post->post_excerpt = $this->exec( $p_obj_post->post_excerpt );
|
||||||
return $p_obj_post;
|
return $p_obj_post;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1136,7 +1135,7 @@ class MCI_Footnotes_Task {
|
||||||
// Take a look if the LOVE ME slug should NOT be displayed on this page/post, remove the short code if found.
|
// Take a look if the LOVE ME slug should NOT be displayed on this page/post, remove the short code if found.
|
||||||
if ( strpos( $p_str_content, MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG ) !== false ) {
|
if ( strpos( $p_str_content, MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG ) !== false ) {
|
||||||
self::$a_bool_allow_love_me = false;
|
self::$a_bool_allow_love_me = false;
|
||||||
$p_str_content = str_replace( MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG, '', $p_str_content );
|
$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 the content with replaced footnotes and optional reference container appended:.
|
||||||
return $p_str_content;
|
return $p_str_content;
|
||||||
|
@ -1170,15 +1169,15 @@ class MCI_Footnotes_Task {
|
||||||
|
|
||||||
// Get start and end tag for the footnotes short code.
|
// Get start and end tag for the footnotes short code.
|
||||||
$l_str_starting_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START );
|
$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 );
|
$l_str_ending_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END );
|
||||||
if ( $l_str_starting_tag == 'userdefined' || $l_str_ending_tag == 'userdefined' ) {
|
if ( $l_str_starting_tag == 'userdefined' || $l_str_ending_tag == 'userdefined' ) {
|
||||||
$l_str_starting_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED );
|
$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 );
|
$l_str_ending_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED );
|
||||||
}
|
}
|
||||||
// Decode html special chars.
|
// Decode html special chars.
|
||||||
if ( $p_bool_convert_html_chars ) {
|
if ( $p_bool_convert_html_chars ) {
|
||||||
$l_str_starting_tag = htmlspecialchars( $l_str_starting_tag );
|
$l_str_starting_tag = htmlspecialchars( $l_str_starting_tag );
|
||||||
$l_str_ending_tag = htmlspecialchars( $l_str_ending_tag );
|
$l_str_ending_tag = htmlspecialchars( $l_str_ending_tag );
|
||||||
}
|
}
|
||||||
|
|
||||||
// If footnotes short code is empty, return the content without changes.
|
// If footnotes short code is empty, return the content without changes.
|
||||||
|
@ -1212,7 +1211,7 @@ class MCI_Footnotes_Task {
|
||||||
|
|
||||||
// Make shortcodes conform to regex syntax:.
|
// Make shortcodes conform to regex syntax:.
|
||||||
$l_str_start_tag_regex = preg_replace( '#([\(\)\{\}\[\]\*\.\?\!])#', '\\\\$1', $l_str_starting_tag );
|
$l_str_start_tag_regex = preg_replace( '#([\(\)\{\}\[\]\*\.\?\!])#', '\\\\$1', $l_str_starting_tag );
|
||||||
$l_str_end_tag_regex = preg_replace( '#([\(\)\{\}\[\]\*\.\?\!])#', '\\\\$1', $l_str_ending_tag );
|
$l_str_end_tag_regex = preg_replace( '#([\(\)\{\}\[\]\*\.\?\!])#', '\\\\$1', $l_str_ending_tag );
|
||||||
|
|
||||||
// Apply different regex depending on whether start shortcode is double/triple opening parenthesis:.
|
// Apply different regex depending on whether start shortcode is double/triple opening parenthesis:.
|
||||||
if ( $l_str_starting_tag == '((' || $l_str_starting_tag == '(((' ) {
|
if ( $l_str_starting_tag == '((' || $l_str_starting_tag == '(((' ) {
|
||||||
|
@ -1285,7 +1284,7 @@ class MCI_Footnotes_Task {
|
||||||
* @since 2.5.4
|
* @since 2.5.4
|
||||||
* @see self::add_filter('pum_popup_content', array($this, "the_content"), $l_int_the_content_priority)
|
* @see self::add_filter('pum_popup_content', array($this, "the_content"), $l_int_the_content_priority)
|
||||||
*/
|
*/
|
||||||
self::$a_bool_tooltips_enabled = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED ) );
|
self::$a_bool_tooltips_enabled = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_BOOL_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_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE ) );
|
self::$a_bool_alternative_tooltips_enabled = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE ) );
|
||||||
|
|
||||||
// Load tooltip inline script if j_query tooltips are enabled:.
|
// Load tooltip inline script if j_query tooltips are enabled:.
|
||||||
|
@ -1293,7 +1292,7 @@ class MCI_Footnotes_Task {
|
||||||
$l_obj_template_tooltip = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'tooltip' );
|
$l_obj_template_tooltip = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'tooltip' );
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$l_obj_template = null;
|
$l_obj_template = null;
|
||||||
$l_obj_template_tooltip = null;
|
$l_obj_template_tooltip = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1322,10 +1321,10 @@ class MCI_Footnotes_Task {
|
||||||
$l_str_footnote_text = substr( $p_str_content, $l_int_pos_start + strlen( $l_str_starting_tag ), $l_int_length - strlen( $l_str_starting_tag ) );
|
$l_str_footnote_text = substr( $p_str_content, $l_int_pos_start + strlen( $l_str_starting_tag ), $l_int_length - strlen( $l_str_starting_tag ) );
|
||||||
|
|
||||||
// Get tooltip text if present:.
|
// Get tooltip text if present:.
|
||||||
self::$a_str_tooltip_shortcode = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER );
|
self::$a_str_tooltip_shortcode = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER );
|
||||||
self::$a_int_tooltip_shortcode_length = strlen( self::$a_str_tooltip_shortcode );
|
self::$a_int_tooltip_shortcode_length = strlen( self::$a_str_tooltip_shortcode );
|
||||||
$l_int_tooltip_text_length = strpos( $l_str_footnote_text, self::$a_str_tooltip_shortcode );
|
$l_int_tooltip_text_length = strpos( $l_str_footnote_text, self::$a_str_tooltip_shortcode );
|
||||||
$l_bool_has_tooltip_text = $l_int_tooltip_text_length === false ? false : true;
|
$l_bool_has_tooltip_text = $l_int_tooltip_text_length === false ? false : true;
|
||||||
if ( $l_bool_has_tooltip_text ) {
|
if ( $l_bool_has_tooltip_text ) {
|
||||||
$l_str_tooltip_text = substr( $l_str_footnote_text, 0, $l_int_tooltip_text_length );
|
$l_str_tooltip_text = substr( $l_str_footnote_text, 0, $l_int_tooltip_text_length );
|
||||||
} else {
|
} else {
|
||||||
|
@ -1501,7 +1500,7 @@ class MCI_Footnotes_Task {
|
||||||
|
|
||||||
// Display only a truncated footnote text if option enabled:.
|
// 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_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_max_length = 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:.
|
// Define excerpt text as footnote text by default:.
|
||||||
$l_str_excerpt_text = $l_str_footnote_text;
|
$l_str_excerpt_text = $l_str_footnote_text;
|
||||||
|
@ -1589,7 +1588,7 @@ class MCI_Footnotes_Task {
|
||||||
// Whether hard links are enabled:.
|
// Whether hard links are enabled:.
|
||||||
if ( self::$a_bool_hard_links_enable ) {
|
if ( self::$a_bool_hard_links_enable ) {
|
||||||
|
|
||||||
self::$a_str_link_span = 'a';
|
self::$a_str_link_span = 'a';
|
||||||
self::$a_str_link_close_tag = '</a>';
|
self::$a_str_link_close_tag = '</a>';
|
||||||
// Self::$a_str_link_open_tag will be defined as needed.
|
// Self::$a_str_link_open_tag will be defined as needed.
|
||||||
|
|
||||||
|
@ -1625,14 +1624,14 @@ class MCI_Footnotes_Task {
|
||||||
*
|
*
|
||||||
* If no hyperlink nor offset anchor is needed, initialize as empty.
|
* If no hyperlink nor offset anchor is needed, initialize as empty.
|
||||||
*/
|
*/
|
||||||
$l_str_footnote_link_argument = '';
|
$l_str_footnote_link_argument = '';
|
||||||
$l_str_referrer_anchor_element = '';
|
$l_str_referrer_anchor_element = '';
|
||||||
|
|
||||||
// The link element is set independently as it may be needed for styling:.
|
// The link element is set independently as it may be needed for styling:.
|
||||||
if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_BOOL_LINK_ELEMENT_ENABLED ) ) ) {
|
if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_BOOL_LINK_ELEMENT_ENABLED ) ) ) {
|
||||||
|
|
||||||
self::$a_str_link_span = 'a';
|
self::$a_str_link_span = 'a';
|
||||||
self::$a_str_link_open_tag = '<a>';
|
self::$a_str_link_open_tag = '<a>';
|
||||||
self::$a_str_link_close_tag = '</a>';
|
self::$a_str_link_close_tag = '</a>';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1685,8 +1684,8 @@ class MCI_Footnotes_Task {
|
||||||
// If standard tooltips are enabled but alternative are not:.
|
// If standard tooltips are enabled but alternative are not:.
|
||||||
if ( self::$a_bool_tooltips_enabled && ! self::$a_bool_alternative_tooltips_enabled ) {
|
if ( self::$a_bool_tooltips_enabled && ! self::$a_bool_alternative_tooltips_enabled ) {
|
||||||
|
|
||||||
$l_int_offset_y = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y ) );
|
$l_int_offset_y = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y ) );
|
||||||
$l_int_offset_x = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X ) );
|
$l_int_offset_x = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X ) );
|
||||||
$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 = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY ) );
|
||||||
$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 = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION ) );
|
||||||
$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 = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY ) );
|
||||||
|
@ -1816,7 +1815,7 @@ class MCI_Footnotes_Task {
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// If the backlink symbol isn’t enabled, set it to empty:.
|
// If the backlink symbol isn’t enabled, set it to empty:.
|
||||||
$l_str_arrow = '';
|
$l_str_arrow = '';
|
||||||
$l_str_footnote_arrow = '';
|
$l_str_footnote_arrow = '';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1992,7 +1991,7 @@ class MCI_Footnotes_Task {
|
||||||
|
|
||||||
// Get the footnote index string and.
|
// Get the footnote index string and.
|
||||||
// Keep supporting legacy index placeholder:.
|
// 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
|
* Case of only one backlink per table row
|
||||||
|
@ -2044,8 +2043,8 @@ class MCI_Footnotes_Task {
|
||||||
$l_str_hard_link_address .= $l_str_use_backbutton_hint;
|
$l_str_hard_link_address .= $l_str_use_backbutton_hint;
|
||||||
|
|
||||||
// Compose optional opening link tag with optional hard link, mandatory for instance:.
|
// Compose optional opening link tag with optional hard link, mandatory for instance:.
|
||||||
self::$a_str_link_open_tag = '<a' . $l_str_hard_link_address;
|
self::$a_str_link_open_tag = '<a' . $l_str_hard_link_address;
|
||||||
self::$a_str_link_open_tag = ' class="footnote_hard_back_link">';
|
self::$a_str_link_open_tag = ' class="footnote_hard_back_link">';
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// Define as empty, too:.
|
// Define as empty, too:.
|
||||||
|
@ -2102,7 +2101,7 @@ class MCI_Footnotes_Task {
|
||||||
$l_str_backlink_event .= "_$l_str_footnote_id');\"";
|
$l_str_backlink_event .= "_$l_str_footnote_id');\"";
|
||||||
|
|
||||||
// The dedicated template enumerating backlinks uses another variable:.
|
// The dedicated template enumerating backlinks uses another variable:.
|
||||||
$l_str_footnote_backlinks = $l_str_footnote_reference;
|
$l_str_footnote_backlinks = $l_str_footnote_reference;
|
||||||
|
|
||||||
// Append the click event right to the backlink item for enumerations;.
|
// Append the click event right to the backlink item for enumerations;.
|
||||||
// Else it goes in the table cell:.
|
// Else it goes in the table cell:.
|
||||||
|
@ -2203,14 +2202,14 @@ class MCI_Footnotes_Task {
|
||||||
|
|
||||||
// Get reference container item text if tooltip text goes separate:.
|
// Get reference container item text if tooltip text goes separate:.
|
||||||
$l_int_tooltip_text_length = strpos( $l_str_footnote_text, self::$a_str_tooltip_shortcode );
|
$l_int_tooltip_text_length = strpos( $l_str_footnote_text, self::$a_str_tooltip_shortcode );
|
||||||
$l_bool_has_tooltip_text = $l_int_tooltip_text_length === false ? false : true;
|
$l_bool_has_tooltip_text = $l_int_tooltip_text_length === false ? false : true;
|
||||||
if ( $l_bool_has_tooltip_text ) {
|
if ( $l_bool_has_tooltip_text ) {
|
||||||
$l_str_not_tooltip_text = substr( $l_str_footnote_text, ( $l_int_tooltip_text_length + self::$a_int_tooltip_shortcode_length ) );
|
$l_str_not_tooltip_text = substr( $l_str_footnote_text, ( $l_int_tooltip_text_length + self::$a_int_tooltip_shortcode_length ) );
|
||||||
self::$a_bool_mirror_tooltip_text = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE ) );
|
self::$a_bool_mirror_tooltip_text = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE ) );
|
||||||
if ( self::$a_bool_mirror_tooltip_text ) {
|
if ( self::$a_bool_mirror_tooltip_text ) {
|
||||||
$l_str_tooltip_text = substr( $l_str_footnote_text, 0, $l_int_tooltip_text_length );
|
$l_str_tooltip_text = substr( $l_str_footnote_text, 0, $l_int_tooltip_text_length );
|
||||||
$l_str_reference_text_introducer = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR );
|
$l_str_reference_text_introducer = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR );
|
||||||
$l_str_reference_text = $l_str_tooltip_text . $l_str_reference_text_introducer . $l_str_not_tooltip_text;
|
$l_str_reference_text = $l_str_tooltip_text . $l_str_reference_text_introducer . $l_str_not_tooltip_text;
|
||||||
} else {
|
} else {
|
||||||
$l_str_reference_text = $l_str_not_tooltip_text;
|
$l_str_reference_text = $l_str_not_tooltip_text;
|
||||||
}
|
}
|
||||||
|
@ -2223,27 +2222,27 @@ class MCI_Footnotes_Task {
|
||||||
array(
|
array(
|
||||||
|
|
||||||
// Placeholder used in all templates:.
|
// Placeholder used in all templates:.
|
||||||
'text' => $l_str_reference_text,
|
'text' => $l_str_reference_text,
|
||||||
|
|
||||||
// Used in standard layout W/O COMBINED FOOTNOTES:.
|
// Used in standard layout W/O COMBINED FOOTNOTES:.
|
||||||
'post_id' => self::$a_int_post_id,
|
'post_id' => self::$a_int_post_id,
|
||||||
'container_id' => self::$a_int_reference_container_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-start' => self::$a_str_link_open_tag,
|
||||||
'link-end' => self::$a_str_link_close_tag,
|
'link-end' => self::$a_str_link_close_tag,
|
||||||
'link-span' => self::$a_str_link_span,
|
'link-span' => self::$a_str_link_span,
|
||||||
'terminator' => $l_str_terminator,
|
'terminator' => $l_str_terminator,
|
||||||
'anchor-element' => $l_str_footnote_anchor_element,
|
'anchor-element' => $l_str_footnote_anchor_element,
|
||||||
'hard-link' => $l_str_hard_link_address,
|
'hard-link' => $l_str_hard_link_address,
|
||||||
|
|
||||||
// Used in standard layout WITH COMBINED IDENTICALS TURNED ON:.
|
// Used in standard layout WITH COMBINED IDENTICALS TURNED ON:.
|
||||||
'pointer' => $l_bool_flag_combined ? '' : ' pointer',
|
'pointer' => $l_bool_flag_combined ? '' : ' pointer',
|
||||||
'event' => $l_bool_flag_combined ? '' : $l_str_backlink_event,
|
'event' => $l_bool_flag_combined ? '' : $l_str_backlink_event,
|
||||||
'backlinks' => $l_bool_flag_combined ? $l_str_footnote_backlinks : $l_str_footnote_reference,
|
'backlinks' => $l_bool_flag_combined ? $l_str_footnote_backlinks : $l_str_footnote_reference,
|
||||||
|
|
||||||
// Legacy placeholders for use in legacy layout templates:.
|
// Legacy placeholders for use in legacy layout templates:.
|
||||||
'arrow' => $l_str_footnote_arrow,
|
'arrow' => $l_str_footnote_arrow,
|
||||||
'index' => $l_str_footnote_id,
|
'index' => $l_str_footnote_id,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -101,7 +101,6 @@ class MCI_Footnotes_Template {
|
||||||
* Define plugin root path
|
* Define plugin root path
|
||||||
*
|
*
|
||||||
* @since 2.4.0d3
|
* @since 2.4.0d3
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
$this->plugin_directory = plugin_dir_path( dirname( __FILE__ ) );
|
$this->plugin_directory = plugin_dir_path( dirname( __FILE__ ) );
|
||||||
|
|
||||||
|
@ -109,7 +108,6 @@ class MCI_Footnotes_Template {
|
||||||
* Modularize functions
|
* Modularize functions
|
||||||
*
|
*
|
||||||
* @since 2.4.0d3
|
* @since 2.4.0d3
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
if ( $template = $this->get_template( $p_str_file_type, $p_str_file_name, $p_str_extension ) ) {
|
if ( $template = $this->get_template( $p_str_file_type, $p_str_file_name, $p_str_extension ) ) {
|
||||||
$this->process_template( $template );
|
$this->process_template( $template );
|
||||||
|
@ -165,7 +163,6 @@ class MCI_Footnotes_Template {
|
||||||
/**
|
/**
|
||||||
* Process template file
|
* Process template file
|
||||||
*
|
*
|
||||||
*
|
|
||||||
* @since 2.4.0d3
|
* @since 2.4.0d3
|
||||||
*
|
*
|
||||||
* @param string $template
|
* @param string $template
|
||||||
|
@ -191,7 +188,6 @@ class MCI_Footnotes_Template {
|
||||||
/**
|
/**
|
||||||
* Get the template
|
* Get the template
|
||||||
*
|
*
|
||||||
*
|
|
||||||
* @since 2.4.0d3
|
* @since 2.4.0d3
|
||||||
*
|
*
|
||||||
* @param string $p_str_file_type
|
* @param string $p_str_file_type
|
||||||
|
@ -211,8 +207,8 @@ class MCI_Footnotes_Template {
|
||||||
* } );
|
* } );
|
||||||
*/
|
*/
|
||||||
$template_directory = apply_filters( 'mci_footnotes_template_directory', 'footnotes/templates/' );
|
$template_directory = apply_filters( 'mci_footnotes_template_directory', 'footnotes/templates/' );
|
||||||
$custom_directory = apply_filters( 'mci_footnotes_custom_template_directory', 'footnotes-custom/' );
|
$custom_directory = apply_filters( 'mci_footnotes_custom_template_directory', 'footnotes-custom/' );
|
||||||
$template_name = $p_str_file_type . '/' . $p_str_file_name . '.' . $p_str_extension;
|
$template_name = $p_str_file_type . '/' . $p_str_file_name . '.' . $p_str_extension;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Look in active (child) theme
|
* Look in active (child) theme
|
||||||
|
|
|
@ -67,15 +67,15 @@ class MCI_Footnotes_WYSIWYG {
|
||||||
public static function ajax_callback() {
|
public static function ajax_callback() {
|
||||||
// Get start and end tag for the footnotes short code.
|
// Get start and end tag for the footnotes short code.
|
||||||
$l_str_starting_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START );
|
$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 );
|
$l_str_ending_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END );
|
||||||
if ( $l_str_starting_tag == 'userdefined' || $l_str_ending_tag == 'userdefined' ) {
|
if ( $l_str_starting_tag == 'userdefined' || $l_str_ending_tag == 'userdefined' ) {
|
||||||
$l_str_starting_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED );
|
$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 );
|
$l_str_ending_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED );
|
||||||
}
|
}
|
||||||
echo wp_json_encode(
|
echo wp_json_encode(
|
||||||
array(
|
array(
|
||||||
'start' => htmlspecialchars( $l_str_starting_tag ),
|
'start' => htmlspecialchars( $l_str_starting_tag ),
|
||||||
'end' => htmlspecialchars( $l_str_ending_tag ),
|
'end' => htmlspecialchars( $l_str_ending_tag ),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
exit;
|
exit;
|
||||||
|
|
|
@ -49,7 +49,7 @@ define( 'C_STR_FOOTNOTES_VERSION', '2.5.6d4' );
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Get all common classes and functions
|
// Get all common classes and functions
|
||||||
require_once( dirname( __FILE__ ) . '/includes.php' );
|
require_once dirname( __FILE__ ) . '/includes.php';
|
||||||
|
|
||||||
// add Plugin Links to the "installed plugins" page
|
// add Plugin Links to the "installed plugins" page
|
||||||
$l_str_plugin_file = 'footnotes/footnotes.php';
|
$l_str_plugin_file = 'footnotes/footnotes.php';
|
||||||
|
|
|
@ -28,7 +28,7 @@ function mci_footnotes_require_php_files( $p_str_directory ) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
/** @noinspection PhpIncludeInspection */
|
/** @noinspection PhpIncludeInspection */
|
||||||
require_once( $p_str_directory . $l_str_file_name );
|
require_once $p_str_directory . $l_str_file_name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue