Settings'; array_push($links, $settings_link); } return $links; } public function addoptions() { require_once(plugin_dir_path(__FILE__) .'/annie_admin.php'); add_options_page('Annie Plugin Options', 'Annie', 'manage_options', basename(__FILE__), 'annie_options_subpanel'); } public function highlight_shortcode($annie_attributes, $annieText = '') { $default_style = get_option('annie_defaultHighlight', 'yellow'); if ($default_style == "custom") { $default_style = get_option('annie_defaultHighlightCustom', 'yellow'); } extract( shortcode_atts( array( 'style' => $default_style ), $annie_attributes ) ); $hilight_text = ''. $annieText .''; $this->highlightText[] = $annieText; // Take care of any nested shortcodes $hilight_text = do_shortcode($hilight_text); $this->showToolbox = true; return $hilight_text; } public function footnote_shortcode($annie_attributes, $annieText = '') { global $post, $tippy; // Store the text in our array $this->footnoteText[$this->footcount] = $annieText; // No markup for footnotes; just the text. $annieShortcodeText = do_shortcode($annieText); $annie_cleanText = $annieShortcodeText; // $annie_cleanText = str_replace('[', '{', $annie_cleanText); // Format the footnote reference if (is_object($tippy) && get_option('annie_footnoteDisplay', 'link') == 'tooltip') { $annie_footnoteLink = get_permalink($post->ID) ."#foot_text_". $post->ID . "_". $this->footcount; $annie_footnoteTitle = $this->footcount; if (get_option('annie_footnoteFormat', 'numbers') == "other") { $annie_footnoteTitle = get_option('annie_footnoteFormatText', '*'); } $annie_tippyValues = array( 'header' => 'off', 'title' => $annie_footnoteTitle, 'href' => $annie_footnoteLink, 'text' => $annie_cleanText, 'class' => 'annie_footnoteRef annie_custom', 'name' => 'foot_loc_'. $post->ID . '_'. $this->footcount, 'item' => 'foot_tip_'. $post->ID . '_'. $this->footcount, 'useDiv' => true ); $annie_returnLink = $tippy->getLink($annie_tippyValues); } else { $annie_returnLink = ''. $this->footcount .''; } $this->footcount++; $this->showToolbox = true; return $annie_returnLink; } public function footnote_display_shortcode($annie_attributes = '', $annie_text = '') { $annie_returnText = $this->process_content(''); $this->footnotesShowing = true; return $annie_returnText; } public function process_content($content) { global $post; if (!$this->footnotesShowing && (is_single() || $this->is_page_val) && get_option('annie_footnoteShowNotes', 'show') == 'show' && sizeof($this->footnoteText) > 0) { $footnoteHeader = get_option('annie_footnoteNotesHeader', 'Notes:'); $content .= '