2014-07-31 10:17:38 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Created by Stefan Herndler.
|
|
|
|
* User: Stefan
|
|
|
|
* Date: 30.07.14 10:53
|
|
|
|
* Version: 1.0
|
|
|
|
* Since: 1.3
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
// define class only once
|
|
|
|
if (!class_exists("MCI_Footnotes_Tab_Custom")) :
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Class MCI_Footnotes_Tab_Custom
|
|
|
|
* @since 1.3
|
|
|
|
*/
|
|
|
|
class MCI_Footnotes_Tab_Custom extends MCI_Footnotes_Admin {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* register the meta boxes for the tab
|
|
|
|
* @constructor
|
|
|
|
* @since 1.3
|
|
|
|
* @param array $p_arr_Tabs
|
|
|
|
*/
|
|
|
|
public function __construct(&$p_arr_Tabs) {
|
|
|
|
// add tab to the tab array
|
2014-08-08 09:43:47 +00:00
|
|
|
$p_arr_Tabs[FOOTNOTES_SETTINGS_TAB_CUSTOM] = __("Customize", FOOTNOTES_PLUGIN_NAME);
|
2014-07-31 10:17:38 +00:00
|
|
|
// register settings tab
|
|
|
|
add_settings_section(
|
|
|
|
"MCI_Footnotes_Settings_Section_Custom",
|
|
|
|
" ",
|
|
|
|
array($this, 'Description'),
|
|
|
|
FOOTNOTES_SETTINGS_TAB_CUSTOM
|
|
|
|
);
|
2014-08-08 09:43:47 +00:00
|
|
|
// styling
|
2014-07-31 10:17:38 +00:00
|
|
|
add_meta_box(
|
2014-08-08 09:43:47 +00:00
|
|
|
'MCI_Footnotes_Tab_Custom_Styling',
|
2014-08-18 15:06:06 +00:00
|
|
|
__("Superscript layout", FOOTNOTES_PLUGIN_NAME),
|
|
|
|
array($this, 'Superscript'),
|
2014-08-08 09:43:47 +00:00
|
|
|
FOOTNOTES_SETTINGS_TAB_CUSTOM,
|
|
|
|
'main'
|
|
|
|
);
|
|
|
|
// custom css
|
|
|
|
add_meta_box(
|
|
|
|
'MCI_Footnotes_Tab_Custom_Customize',
|
2014-07-31 10:17:38 +00:00
|
|
|
__("Add custom CSS to the public page", FOOTNOTES_PLUGIN_NAME),
|
|
|
|
array($this, 'CSS'),
|
|
|
|
FOOTNOTES_SETTINGS_TAB_CUSTOM,
|
|
|
|
'main'
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* output a description for the tab
|
|
|
|
* @since 1.3
|
|
|
|
*/
|
|
|
|
public function Description() {
|
|
|
|
// unused
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2014-08-08 09:43:47 +00:00
|
|
|
* footnotes layout before and after the index in text
|
|
|
|
* @since 1.3.1
|
|
|
|
*/
|
2014-08-18 15:06:06 +00:00
|
|
|
public function Superscript() {
|
2014-08-08 09:43:47 +00:00
|
|
|
// setting for 'before footnotes'
|
2014-08-18 15:06:06 +00:00
|
|
|
$this->AddLabel(FOOTNOTES_INPUT_CUSTOM_STYLING_BEFORE, __("Before Footnotes index:", FOOTNOTES_PLUGIN_NAME));
|
2014-08-08 09:43:47 +00:00
|
|
|
$this->AddTextbox(FOOTNOTES_INPUT_CUSTOM_STYLING_BEFORE, "footnote_plugin_50");
|
|
|
|
$this->AddNewline();
|
|
|
|
// setting for 'after footnotes'
|
2014-08-18 15:06:06 +00:00
|
|
|
$this->AddLabel(FOOTNOTES_INPUT_CUSTOM_STYLING_AFTER, __("After Footnotes index:", FOOTNOTES_PLUGIN_NAME));
|
2014-08-08 09:43:47 +00:00
|
|
|
$this->AddTextbox(FOOTNOTES_INPUT_CUSTOM_STYLING_AFTER, "footnote_plugin_50");
|
|
|
|
$this->AddNewline();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* customize css box for public page
|
2014-07-31 10:17:38 +00:00
|
|
|
* @since 1.3
|
|
|
|
*/
|
|
|
|
public function CSS() {
|
|
|
|
$l_str_Separator = " ⇒ ";
|
|
|
|
// setting for 'reference label'
|
|
|
|
$this->AddLabel(FOOTNOTES_INPUT_CUSTOM_CSS, __("Add custom CSS:", FOOTNOTES_PLUGIN_NAME));
|
|
|
|
$this->AddTextarea(FOOTNOTES_INPUT_CUSTOM_CSS, 12, "footnote_plugin_100");
|
|
|
|
$this->AddNewline();
|
|
|
|
|
|
|
|
$this->AddText($this->Highlight(gettext("Available CSS classes to customize the footnotes and the reference container:")) . "<br/>");
|
|
|
|
|
|
|
|
echo "<blockquote>";
|
|
|
|
$this->AddText($this->Highlight(".footnote_plugin_tooltip_text") . $l_str_Separator . gettext("inline footnotes") . "<br/>");
|
|
|
|
$this->AddText($this->Highlight(".footnote_tooltip") . $l_str_Separator . gettext("inline footnotes, mouse over highlight box") . "<br/><br/>");
|
|
|
|
|
|
|
|
$this->AddText($this->Highlight(".footnote_plugin_index") . $l_str_Separator . gettext("reference container footnotes index") . "<br/>");
|
|
|
|
$this->AddText($this->Highlight(".footnote_plugin_link") . $l_str_Separator . gettext("reference container footnotes linked arrow") . "<br/>");
|
|
|
|
$this->AddText($this->Highlight(".footnote_plugin_text") . $l_str_Separator . gettext("reference container footnotes text"));
|
|
|
|
echo "</blockquote>";
|
|
|
|
}
|
|
|
|
} // class MCI_Footnotes_Tab_Custom
|
|
|
|
|
|
|
|
endif;
|