- Add: Pre defined footnote short codes and possibility for a user defined short code

git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@920318 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
Aricura 2014-05-24 11:53:54 +00:00
parent 2765649d58
commit b7af8ff042
4 changed files with 71 additions and 7 deletions

View file

@ -40,6 +40,14 @@ define("FOOTNOTE_INPUTFIELD_COUNTER_STYLE", "footnote_inputfield_counter_style")
*/
define("FOOTNOTE_INPUTFIELD_REFERENCE_CONTAINER_PLACE", "footnote_inputfield_reference_container_place");
/*
* id of input field for 'user defined placeholder start and end tag
* @since 1.1.2
*/
define("FOOTNOTE_INPUTFIELD_PLACEHOLDER_START_USERDEFINED", "footnote_inputfield_placeholder_start_user_defined");
define("FOOTNOTE_INPUTFIELD_PLACEHOLDER_END_USERDEFINED", "footnote_inputfield_placeholder_end_user_defined");
/* PLUGIN REFERENCES CONTAINER ID */
define("FOOTNOTE_REFERENCES_CONTAINER_ID", "footnote_references_container"); /* id for the div surrounding the footnotes */

View file

@ -218,6 +218,13 @@ function footnotes_getFromString($p_str_Content)
/*get footnote counter style */
$l_str_CounterStyle = $g_arr_FootnotesSettings[FOOTNOTE_INPUTFIELD_COUNTER_STYLE];
if ($l_str_StartingTag == "userdefined" || $l_str_EndingTag == "userdefined") {
/* get user defined footnote starting tag */
$l_str_StartingTag = $g_arr_FootnotesSettings[FOOTNOTE_INPUTFIELD_PLACEHOLDER_START_USERDEFINED];
/*get user defined footnote ending tag */
$l_str_EndingTag = $g_arr_FootnotesSettings[FOOTNOTE_INPUTFIELD_PLACEHOLDER_END_USERDEFINED];
}
/* check for a footnote placeholder in the current page */
do {
/* get first occurence of a footnote starting tag */