Changeset 3388488
- Timestamp:
- 11/02/2025 08:36:08 PM (5 months ago)
- Location:
- footnotes-made-easy
- Files:
-
- 12 added
- 3 edited
-
tags/3.0.8 (added)
-
tags/3.0.8/css (added)
-
tags/3.0.8/css/dbad.css (added)
-
tags/3.0.8/css/tooltips.css (added)
-
tags/3.0.8/css/tooltips.min.css (added)
-
tags/3.0.8/footnotes-made-easy.php (added)
-
tags/3.0.8/js (added)
-
tags/3.0.8/js/tooltips.js (added)
-
tags/3.0.8/js/tooltips.min.js (added)
-
tags/3.0.8/options.php (added)
-
tags/3.0.8/readme.txt (added)
-
tags/3.0.8/uninstall.php (added)
-
trunk/footnotes-made-easy.php (modified) (9 diffs)
-
trunk/options.php (modified) (6 diffs)
-
trunk/readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
footnotes-made-easy/trunk/footnotes-made-easy.php
r3342111 r3388488 1 1 <?php 2 2 /* 3 Plugin Name: Footnotes Made Easy 4 Plugin URI: https://github.com/divibanks/footnotes-made-easy/ 5 Description: Allows post authors to easily add and manage footnotes in posts. 6 Version: 3.0.7 7 Author: Patrick Lumumba 8 Author URI: https://lumumbas.blog 9 Text Domain: footnotes-made-easy 3 * Plugin Name: Footnotes Made Easy 4 * Plugin URI: https://lumumbas.blog/plugins/footnotes-made-easy/ 5 * Description: Allows post authors to easily add and manage footnotes in posts. 6 * Version: 3.0.8 7 * Requires at least: 4.6 8 * Requires PHP: 7.4 9 * Author: Patrick Lumumba 10 * Author URI: https://lumumbas.blog 11 * License: GPL v2 or later 12 * License URI: https://www.gnu.org/licenses/gpl-2.0.html 13 * Text Domain: footnotes-made-easy 10 14 */ 11 15 … … 107 111 } 108 112 109 $footnotes_options = array(); 110 $post_array = $_POST; 111 112 if ( !empty( $post_array[ 'save_options' ] ) && !empty( $post_array[ 'save_footnotes_made_easy_options' ] ) ) { 113 $footnotes_options[ 'superscript' ] = ( array_key_exists( 'superscript', $post_array ) ) ? true : false; 114 $footnotes_options[ 'pre_backlink' ] = sanitize_text_field( $post_array[ 'pre_backlink' ] ); 115 $footnotes_options[ 'backlink' ] = sanitize_text_field( $post_array[ 'backlink' ] ); 116 $footnotes_options[ 'post_backlink' ] = sanitize_text_field( $post_array[ 'post_backlink' ] ); 117 $footnotes_options[ 'pre_identifier' ] = sanitize_text_field( $post_array[ 'pre_identifier' ] ); 118 $footnotes_options[ 'inner_pre_identifier' ] = sanitize_text_field( $post_array[ 'inner_pre_identifier' ] ); 119 $footnotes_options[ 'list_style_type' ] = sanitize_text_field( $post_array[ 'list_style_type' ] ); 120 $footnotes_options[ 'inner_post_identifier' ] = sanitize_text_field( $post_array[ 'inner_post_identifier' ] ); 121 $footnotes_options[ 'post_identifier' ] = sanitize_text_field( $post_array[ 'post_identifier' ] ); 122 $footnotes_options[ 'list_style_symbol' ] = sanitize_text_field( $post_array[ 'list_style_symbol' ] ); 123 $footnotes_options[ 'pre_footnotes' ] = $post_array[ 'pre_footnotes' ]; 124 $footnotes_options[ 'post_footnotes' ] = $post_array[ 'post_footnotes' ]; 125 $footnotes_options[ 'no_display_home' ] = ( array_key_exists( 'no_display_home', $post_array ) ) ? true : false; 126 $footnotes_options[ 'no_display_preview' ] = ( array_key_exists( 'no_display_preview', $post_array) ) ? true : false; 127 $footnotes_options[ 'no_display_archive' ] = ( array_key_exists( 'no_display_archive', $post_array ) ) ? true : false; 128 $footnotes_options[ 'no_display_date' ] = ( array_key_exists( 'no_display_date', $post_array ) ) ? true : false; 129 $footnotes_options[ 'no_display_category' ] = ( array_key_exists( 'no_display_category', $post_array ) ) ? true : false; 130 $footnotes_options[ 'no_display_search' ] = ( array_key_exists( 'no_display_search', $post_array ) ) ? true : false; 131 $footnotes_options[ 'no_display_feed' ] = ( array_key_exists( 'no_display_feed', $post_array ) ) ? true : false; 132 $footnotes_options[ 'combine_identical_notes' ] = ( array_key_exists( 'combine_identical_notes', $post_array ) ) ? true : false; 133 $footnotes_options[ 'priority' ] = sanitize_text_field( $post_array[ 'priority' ] ); 134 $footnotes_options[ 'footnotes_open' ] = sanitize_text_field( $post_array[ 'footnotes_open' ] ); 135 $footnotes_options[ 'footnotes_close' ] = sanitize_text_field( $post_array[ 'footnotes_close' ] ); 136 $footnotes_options[ 'pretty_tooltips' ] = ( array_key_exists( 'pretty_tooltips', $post_array ) ) ? true : false; 137 138 update_option( 'swas_footnote_options', $footnotes_options ); 139 $this->current_options = $footnotes_options; 140 } 113 // SECURITY FIX: Move options processing to admin_init hook instead of constructor 114 // This ensures it only runs in admin context with proper authentication 115 add_action( 'admin_init', array( $this, 'save_options' ) ); 141 116 142 117 // Hook me up … … 147 122 148 123 add_filter( 'plugin_action_links', array( $this, 'add_settings_link' ), 10, 2 ); 149 add_filter( 'plugin_row_meta', array( $this, 'plugin_meta' ), 10, 2 ); 124 add_filter( 'plugin_row_meta', array( $this, 'plugin_meta' ), 10, 2 ); 125 126 // Custom admin footer for our settings page 127 add_filter( 'admin_footer_text', array( $this, 'admin_footer_text' ) ); 128 add_filter( 'update_footer', array( $this, 'admin_footer_version' ), 11 ); 129 } 130 131 /** 132 * Save Options - SECURITY FIX 133 * 134 * Process and save plugin options with proper security checks 135 * 136 * @since 3.0.8 137 */ 138 function save_options() { 139 // SECURITY FIX: Only process if all security requirements are met: 140 // 1. User must be in admin area 141 // 2. User must have manage_options capability 142 // 3. Request must be POST with our specific save flags 143 // 4. Nonce must be valid (CSRF protection) 144 if ( ! is_admin() ) { 145 return; 146 } 147 148 if ( ! current_user_can( 'manage_options' ) ) { 149 return; 150 } 151 152 // SECURITY FIX: Check for save flags and verify nonce BEFORE accessing $_POST 153 if ( empty( $_POST[ 'save_options' ] ) || empty( $_POST[ 'save_footnotes_made_easy_options' ] ) ) { 154 return; 155 } 156 157 if ( ! check_admin_referer( 'footnotes-nonce', 'footnotes_nonce' ) ) { 158 return; 159 } 160 161 // Now it's safe to access POST data 162 $post_array = $_POST; 163 164 // Now it's safe to process the options 165 $footnotes_options = array(); 166 167 $footnotes_options[ 'superscript' ] = ( array_key_exists( 'superscript', $post_array ) ) ? true : false; 168 $footnotes_options[ 'pre_backlink' ] = sanitize_text_field( $post_array[ 'pre_backlink' ] ); 169 $footnotes_options[ 'backlink' ] = sanitize_text_field( $post_array[ 'backlink' ] ); 170 $footnotes_options[ 'post_backlink' ] = sanitize_text_field( $post_array[ 'post_backlink' ] ); 171 $footnotes_options[ 'pre_identifier' ] = sanitize_text_field( $post_array[ 'pre_identifier' ] ); 172 $footnotes_options[ 'inner_pre_identifier' ] = sanitize_text_field( $post_array[ 'inner_pre_identifier' ] ); 173 $footnotes_options[ 'list_style_type' ] = sanitize_text_field( $post_array[ 'list_style_type' ] ); 174 $footnotes_options[ 'inner_post_identifier' ] = sanitize_text_field( $post_array[ 'inner_post_identifier' ] ); 175 $footnotes_options[ 'post_identifier' ] = sanitize_text_field( $post_array[ 'post_identifier' ] ); 176 $footnotes_options[ 'list_style_symbol' ] = sanitize_text_field( $post_array[ 'list_style_symbol' ] ); 177 178 // SECURITY FIX: Sanitize HTML content fields to prevent XSS 179 $footnotes_options[ 'pre_footnotes' ] = wp_kses_post( $post_array[ 'pre_footnotes' ] ); 180 $footnotes_options[ 'post_footnotes' ] = wp_kses_post( $post_array[ 'post_footnotes' ] ); 181 182 $footnotes_options[ 'no_display_home' ] = ( array_key_exists( 'no_display_home', $post_array ) ) ? true : false; 183 $footnotes_options[ 'no_display_preview' ] = ( array_key_exists( 'no_display_preview', $post_array) ) ? true : false; 184 $footnotes_options[ 'no_display_archive' ] = ( array_key_exists( 'no_display_archive', $post_array ) ) ? true : false; 185 $footnotes_options[ 'no_display_date' ] = ( array_key_exists( 'no_display_date', $post_array ) ) ? true : false; 186 $footnotes_options[ 'no_display_category' ] = ( array_key_exists( 'no_display_category', $post_array ) ) ? true : false; 187 $footnotes_options[ 'no_display_search' ] = ( array_key_exists( 'no_display_search', $post_array ) ) ? true : false; 188 $footnotes_options[ 'no_display_feed' ] = ( array_key_exists( 'no_display_feed', $post_array ) ) ? true : false; 189 $footnotes_options[ 'combine_identical_notes' ] = ( array_key_exists( 'combine_identical_notes', $post_array ) ) ? true : false; 190 $footnotes_options[ 'priority' ] = sanitize_text_field( $post_array[ 'priority' ] ); 191 $footnotes_options[ 'footnotes_open' ] = sanitize_text_field( $post_array[ 'footnotes_open' ] ); 192 $footnotes_options[ 'footnotes_close' ] = sanitize_text_field( $post_array[ 'footnotes_close' ] ); 193 $footnotes_options[ 'pretty_tooltips' ] = ( array_key_exists( 'pretty_tooltips', $post_array ) ) ? true : false; 194 195 update_option( 'swas_footnote_options', $footnotes_options ); 196 $this->current_options = $footnotes_options; 150 197 } 151 198 … … 238 285 $identifiers[ $i ][ 'use_footnote' ] = count( $footnotes ); 239 286 $footnotes[ $identifiers[ $i ][ 'use_footnote' ] ][ 'text' ] = $identifiers[ $i ][ 'text' ]; 240 $footnotes[ $identifiers[ $i ][ 'use_footnote' ] ][ 'symbol' ] = isset( $identifiers[ $i ][ 'symbol' ] ) ? $identifiers[ $i ][ 'symbol' ]: '';287 $footnotes[ $identifiers[ $i ][ 'use_footnote' ] ][ 'symbol' ] = ( $style === 'symbol' ) ? $this->convert_num( count( $footnotes ), $style, count( $identifiers ) ) : ''; 241 288 $footnotes[ $identifiers[ $i ][ 'use_footnote' ] ][ 'identifiers' ][] = $i; 242 289 } … … 253 300 254 301 foreach ( $identifiers as $key => $value ) { 255 256 $id_id = "identifier_" . $key . "_" . $post->ID; 302 $id_id = "identifier_" . ( $key + 1 ) . "_" . $post->ID; 257 303 $id_num = ( $style === 'decimal' ) ? $value[ 'use_footnote' ] + $start_number : $this->convert_num( $value[ 'use_footnote' ] + $start_number, $style, count( $footnotes ) ); 258 $id_href = ( ( $use_full_link ) ? get_permalink( $post->ID ) : '' ) . "#footnote_" . $value[ 'use_footnote' ]. "_" . $post->ID;304 $id_href = ( ( $use_full_link ) ? get_permalink( $post->ID ) : '' ) . "#footnote_" . ( $value[ 'use_footnote' ] + $start_number ) . "_" . $post->ID; 259 305 $id_title = str_replace( '"', """, htmlentities( html_entity_decode( wp_strip_all_tags( $value[ 'text' ] ), ENT_QUOTES, 'UTF-8' ), ENT_QUOTES, 'UTF-8' ) ); 260 $id_replace = $this->current_options[ 'pre_identifier' ] . '<a href="' . $id_href . '" id="' . $id_id . '" class="footnote- link footnote-identifier-link" title="' . $id_title . '">' . $this->current_options[ 'inner_pre_identifier' ] . $id_num . $this->current_options[ 'inner_post_identifier' ] . '</a>' . $this->current_options[ 'post_identifier' ];306 $id_replace = $this->current_options[ 'pre_identifier' ] . '<a href="' . $id_href . '" id="' . $id_id . '" class="footnote-identifier-link" title="' . $id_title . '">' . $this->current_options[ 'inner_pre_identifier' ] . $id_num . $this->current_options[ 'inner_post_identifier' ] . '</a>' . $this->current_options[ 'post_identifier' ]; 261 307 if ( $this->current_options[ 'superscript' ] ) $id_replace = '<sup>' . $id_replace . '</sup>'; 262 if ( $display ) $data = substr_replace( $data, $id_replace, strpos( $data, $value[ 0 ] ), strlen( $value[ 0 ] ) );263 else $data = substr_replace( $data, '', strpos( $data, $value[ 0 ] ),strlen( $value[ 0 ] ) );308 if ( $display ) $data = substr_replace( $data, $id_replace, strpos( $data,$value[ 0 ] ), strlen( $value[ 0 ] ) ); 309 else $data = substr_replace( $data, '', strpos( $data, $value[ 0 ] ), strlen( $value[ 0 ] ) ); 264 310 } 265 311 266 312 // Display footnotes 267 313 314 $start = ( $start_number !== 1 ) ? 'start="' . $start_number . '" ' : ''; 315 $footnotes_markup = '<ol ' . $start . 'class="footnotes">'; 316 317 // SECURITY FIX: Escape output to prevent XSS 318 $footnotes_markup = $footnotes_markup . wp_kses_post( $this->current_options[ 'pre_footnotes' ] ); 319 320 foreach ( $footnotes as $key => $value ) { 321 $footnotes_markup = $footnotes_markup . '<li id="footnote_' . ( $key + $start_number ) . '_' . $post->ID . '" class="footnote"'; 322 if ( 'symbol' === $style ) { 323 $footnotes_markup = $footnotes_markup . ' value="' . $value[ 'symbol' ] . '"'; 324 } 325 $footnotes_markup = $footnotes_markup . '>'; 326 if ( 'symbol' === $style ) { 327 $footnotes_markup = $footnotes_markup . $value[ 'symbol' ] . ' '; 328 } 329 $footnotes_markup = $footnotes_markup . $value[ 'text' ]; 330 if ( ! is_feed() ) { 331 foreach ( $value[ 'identifiers' ] as $identifier ) { 332 $footnotes_markup = $footnotes_markup . '<span class="footnote-back-link-wrapper">' . $this->current_options[ 'pre_backlink' ] . '<a href="' . ( ( $use_full_link ) ? get_permalink( $post->ID ) : '' ) . '#identifier_' . ( $identifier + 1 ) . '_' . $post->ID . '" class="footnote-back-link">' . $this->current_options[ 'backlink' ] . '</a>' . $this->current_options[ 'post_backlink' ] . '</span>'; 333 } 334 } 335 $footnotes_markup = $footnotes_markup . '</li>'; 336 } 337 338 // SECURITY FIX: Escape output to prevent XSS 339 $footnotes_markup = $footnotes_markup . '</ol>' . wp_kses_post( $this->current_options[ 'post_footnotes' ] ); 340 268 341 if ( $display ) { 269 270 $footnotes_markup = '';271 $start = ( $start_number !== 1 ) ? 'start="' . $start_number . '" ' : '';272 $footnotes_markup = $footnotes_markup . $this->current_options[ 'pre_footnotes' ];273 274 $footnotes_markup = $footnotes_markup . '<ol ' . $start . 'class="footnotes">';275 foreach ( $footnotes as $key => $value ) {276 $footnotes_markup = $footnotes_markup . '<li id="footnote_' . $key . '_' . $post->ID . '" class="footnote"';277 if ( 'symbol' === $style ) {278 $footnotes_markup = $footnotes_markup . ' style="list-style-type:none;"';279 } elseif( $style !== $this->current_options[ 'list_style_type' ] ) {280 $footnotes_markup = $footnotes_markup . ' style="list-style-type:' . $style . ';"';281 }282 $footnotes_markup = $footnotes_markup . '>';283 if ( 'symbol' === $style ) {284 $footnotes_markup = $footnotes_markup . '<span class="symbol">' . $this->convert_num( $key + $start_number, $style, count( $footnotes ) ) . '</span> ';285 }286 $footnotes_markup = $footnotes_markup.$value[ 'text' ];287 if (!is_feed()){288 $footnotes_markup .= '<span class="footnote-back-link-wrapper">';289 foreach( $value[ 'identifiers' ] as $identifier ){290 $footnotes_markup = $footnotes_markup . $this->current_options[ 'pre_backlink' ] . '<a href="' . ( ( $use_full_link ) ? get_permalink( $post->ID ) : '' ) . '#identifier_' . $identifier . '_' . $post->ID . '" class="footnote-link footnote-back-link">' . $this->current_options[ 'backlink' ] . '</a>' . $this->current_options[ 'post_backlink' ];291 }292 $footnotes_markup .= '</span>';293 }294 $footnotes_markup = $footnotes_markup . '</li>';295 }296 $footnotes_markup = $footnotes_markup . '</ol>' . $this->current_options[ 'post_footnotes' ];297 298 342 $data = $data . $footnotes_markup; 299 343 } … … 303 347 304 348 /** 305 * Add Settings link to plugin list306 * 307 * Add a Settings link to the options listed against this plugin308 * 309 * @since 1.0 .2349 * Plugion Meta Links 350 * 351 * Add links to plugin meta line 352 * 353 * @since 1.0 310 354 * 311 355 * @param string $links Current links … … 314 358 */ 315 359 360 function plugin_meta( $links, $file ) { 361 362 if ( false !== strpos( $file, 'footnotes-made-easy.php' ) ) { 363 364 $links = array_merge( $links, array( '<a href="https://github.com/lumumbapl/footnotes-made-easy">' . __( 'Github', 'footnotes-made-easy' ) . '</a>' ) ); 365 366 $links = array_merge( $links, array( '<a href="https://wordpress.org/support/plugin/footnotes-made-easy">' . __( 'Support', 'footnotes-made-easy' ) . '</a>' ) ); 367 368 } 369 370 return $links; 371 } 372 373 /** 374 * Add Settings Link 375 * 376 * Add a link to the options page from the plugins list 377 * 378 * @since 1.0 379 * 380 * @param string $links Current links 381 * @param string $file File in use 382 * @return string Links, now with settings added 383 */ 384 316 385 function add_settings_link( $links, $file ) { 317 386 318 387 static $this_plugin; 319 388 320 if ( !$this_plugin) { $this_plugin = plugin_basename( __FILE__ ); }321 322 if ( strpos( $file, 'footnotes-made-easy.php' ) !== false) {389 if ( empty( $this_plugin ) ) { $this_plugin = plugin_basename( __FILE__ ); } 390 391 if ( $file === $this_plugin ) { 323 392 $settings_link = '<a href="options-general.php?page=footnotes-options-page">' . __( 'Settings', 'footnotes-made-easy' ) . '</a>'; 324 393 array_unshift( $links, $settings_link ); 325 394 } 326 327 return $links; 328 } 329 330 /** 331 * Add meta to plugin details 332 * 333 * Add options to plugin meta line 334 * 335 * @since 1.0.2 336 * 337 * @param string $links Current links 338 * @param string $file File in use 339 * @return string Links, now with settings added 340 */ 341 342 function plugin_meta( $links, $file ) { 343 344 if ( false !== strpos( $file, 'footnotes-made-easy.php' ) ) { 345 346 $links = array_merge( $links, array( '<a href="https://github.com/wpcorner/footnotes-made-easy/">' . __( 'Github', 'footnotes-made-easy' ) . '</a>' ) ); 347 348 $links = array_merge( $links, array( '<a href="https://wordpress.org/support/plugin/footnotes-made-easy">' . __( 'Support', 'footnotes-made-easy' ) . '</a>' ) ); 349 350 $links = array_merge( $links, array( '<a href="https://wpcorner.co/support/footnotes-made-easy/">' . __( 'Documentation', 'footnotes-made-easy' ) . '</a>' ) ); 351 352 } 353 395 354 396 return $links; 355 397 } … … 465 507 <style type="text/css"> 466 508 <?php if ( 'symbol' !== $this->current_options[ 'list_style_type' ] ): ?> 467 ol.footnotes>li {list-style-type:<?php echo $this->current_options[ 'list_style_type' ]; ?>;}509 ol.footnotes>li {list-style-type:<?php echo esc_attr( $this->current_options[ 'list_style_type' ] ); ?>;} 468 510 <?php endif; ?> 469 511 <?php echo "ol.footnotes { color:#666666; }\nol.footnotes li { font-size:80%; }\n"; ?> … … 581 623 'jquery-ui-core', 582 624 'jquery-ui-position' 583 ) 625 ), 626 '3.0.8', 627 true 584 628 ); 585 629 586 wp_enqueue_style( 'wp-footnotes-tt-style', plugins_url( 'css/tooltips.min.css' , __FILE__ ), array(), null ); 630 wp_enqueue_style( 'wp-footnotes-tt-style', plugins_url( 'css/tooltips.min.css' , __FILE__ ), array(), '3.0.8' ); 631 } 632 633 /** 634 * Admin Footer Text 635 * 636 * Modifies the left admin footer text on the plugin's settings page 637 * 638 * @since 3.0.8 639 * 640 * @param string $footer_text The existing footer text 641 * @return string Modified footer text 642 */ 643 644 function admin_footer_text( $footer_text ) { 645 646 // Only on our settings page 647 $screen = get_current_screen(); 648 if ( $screen && $screen->id === 'settings_page_footnotes-options-page' ) { 649 $footer_text = sprintf( 650 /* translators: %s: Five star rating link */ 651 __( 'If you like <strong>Footnotes Made Easy</strong>, please leave us a %s rating. Thank you so much in advance!', 'footnotes-made-easy' ), 652 '<a href="https://wordpress.org/support/plugin/footnotes-made-easy/reviews/?filter=5" target="_blank" rel="noopener noreferrer">★★★★★</a>' 653 ); 654 } 655 656 return $footer_text; 657 } 658 659 /** 660 * Admin Footer Version 661 * 662 * Modifies the right admin footer version on the plugin's settings page 663 * 664 * @since 3.0.8 665 * 666 * @param string $footer_version The existing footer version text 667 * @return string Modified footer version text 668 */ 669 670 function admin_footer_version( $footer_version ) { 671 672 // Only on our settings page 673 $screen = get_current_screen(); 674 if ( $screen && $screen->id === 'settings_page_footnotes-options-page' ) { 675 $plugin_data = get_plugin_data( __FILE__ ); 676 $footer_version = sprintf( 677 /* translators: %s: Plugin version number */ 678 __( 'Version %s', 'footnotes-made-easy' ), 679 $plugin_data['Version'] 680 ); 681 } 682 683 return $footer_version; 587 684 } 588 685 } -
footnotes-made-easy/trunk/options.php
r3180184 r3388488 12 12 <div class="wrap"> 13 13 14 <h1><?php _e( 'Footnotes Made Easy', 'footnotes-made-easy' ); ?></h1> 15 16 <div class="db-ad"> 17 <h3><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 68 68"><defs/><rect width="100%" height="100%" fill="none"/><g class="currentLayer"><path fill="#313457" d="M34.76 33C22.85 21.1 20.1 13.33 28.23 5.2 36.37-2.95 46.74.01 50.53 3.8c3.8 3.8 5.14 17.94-5.04 28.12-2.95 2.95-5.97 5.84-5.97 5.84L34.76 33"/><path fill="#313457" d="M43.98 42.21c5.54 5.55 14.59 11.06 20.35 5.3 5.76-5.77 3.67-13.1.98-15.79-2.68-2.68-10.87-5.25-18.07 1.96-2.95 2.95-5.96 5.84-5.96 5.84l2.7 2.7m-1.76 1.75c5.55 5.54 11.06 14.59 5.3 20.35-5.77 5.76-13.1 3.67-15.79.98-2.69-2.68-5.25-10.87 1.95-18.07 2.85-2.84 5.84-5.96 5.84-5.96l2.7 2.7"/><path fill="#313457" d="M33 34.75c-11.9-11.9-19.67-14.67-27.8-6.52-8.15 8.14-5.2 18.5-1.4 22.3 3.8 3.79 17.95 5.13 28.13-5.05 3.1-3.11 5.84-5.97 5.84-5.97L33 34.75"/></g></svg> Thank you for using Footnotes Made Easy!</h3> 18 <p>If you enjoy this plugin, do not forget to <a href="https://wordpress.org/support/plugin/footnotes-made-easy/reviews/?filter=5" rel="external">rate it</a>! We work hard to update it, fix bugs, add new features and make it compatible with the latest web technologies.</p> 19 <p></p> 20 <p style="font-size:14px"> 21 <b>Featured Plugins:</b>  22 🔥 <a href="https://wordpress.org/plugins/quick-event-calendar/" target="_blank" rel="external noopener">Quick Event Calendar</a> and  23 🚀 <a href="https://wordpress.org/plugins/search-engines-blocked-in-header/" target="_blank" rel="external noopener">Search Engines Blocked in Header</a>.  24 </p> 25 <p>To learn how to use this plugin, please refer to <a href="https://divibanks.io/wordpress-plugins/footnotes-made-easy/" rel="external">the documentation</a>. </p> 26 <p>If you find this plugin helpful and enjoy using it, consider <a href="https://divibanks.io/sponsor/" rel="external">supporting our work with a donation</a>.</p> 27 <p style="font-size:14px"> 28 For WordPress and Divi related content, check out <a href="https://divibanks.io/blog/">Divi Banks' Blog</a>. 29 </p> 30 </div> 14 <h1><?php esc_html_e( 'Footnotes Made Easy', 'footnotes-made-easy' ); ?></h1> 31 15 32 16 <?php … … 38 22 ?> 39 23 <?php if ( $message !== '' ) { ?> 40 <div class="updated"><p><strong><?php echo $message; ?></strong></p></div>24 <div class="updated"><p><strong><?php echo esc_html( $message ); ?></strong></p></div> 41 25 <?php } ?> 42 26 … … 46 30 47 31 <tr> 48 <th scope="row"><label for="pre_identifier"><?php e cho __( ucwords( 'identifier' ), 'footnotes-made-easy' ); ?></label></th>32 <th scope="row"><label for="pre_identifier"><?php esc_html_e( 'Identifier', 'footnotes-made-easy' ); ?></label></th> 49 33 <td> 50 34 <input type="text" size="3" name="pre_identifier" value="<?php echo esc_attr( $this->current_options[ 'pre_identifier' ] ); ?>" /> … … 52 36 <select name="list_style_type"> 53 37 <?php foreach ( $this->styles as $key => $val ): ?> 54 <option value="<?php echo $key; ?>" <?php if ( $this->current_options[ 'list_style_type' ] === $key ) echo 'selected="selected"'; ?> ><?php echo esc_attr( $val ); ?></option>38 <option value="<?php echo esc_attr( $key ); ?>" <?php if ( $this->current_options[ 'list_style_type' ] === $key ) echo 'selected="selected"'; ?> ><?php echo esc_html( $val ); ?></option> 55 39 <?php endforeach; ?> 56 40 </select> 57 41 <input type="text" size="3" name="inner_post_identifier" value="<?php echo esc_attr( $this->current_options[ 'inner_post_identifier' ] ); ?>" /> 58 42 <input type="text" size="3" name="post_identifier" value="<?php echo esc_attr( $this->current_options[ 'post_identifier' ] ); ?>" /> 59 <p class="description"><?php _e( 'This defines how the link to the footnote will be displayed. The outer text will not be linked to.', 'footnotes-made-easy' ); ?></p></td>43 <p class="description"><?php esc_html_e( 'This defines how the link to the footnote will be displayed. The outer text will not be linked to.', 'footnotes-made-easy' ); ?></p></td> 60 44 </tr> 61 45 62 46 <tr> 63 <th scope="row"><label for="list_style_symbol"><?php e cho __( ucwords( 'symbol' ), 'footnotes-made-easy' ); ?></label></th>64 <td><input type="text" size="8" name="list_style_symbol" value="<?php echo $this->current_options[ 'list_style_symbol' ]; ?>" /><?php_e( 'If you have chosen a symbol as your list style.', 'footnotes-made-easy' ); ?>65 <p class="description"><?php _e( 'It\'s not usually a good idea to choose this type unless you never have more than a couple of footnotes per post', 'footnotes-made-easy' ); ?></p></td>47 <th scope="row"><label for="list_style_symbol"><?php esc_html_e( 'Symbol', 'footnotes-made-easy' ); ?></label></th> 48 <td><input type="text" size="8" name="list_style_symbol" value="<?php echo esc_attr( $this->current_options[ 'list_style_symbol' ] ); ?>" /><?php esc_html_e( 'If you have chosen a symbol as your list style.', 'footnotes-made-easy' ); ?> 49 <p class="description"><?php esc_html_e( 'It\'s not usually a good idea to choose this type unless you never have more than a couple of footnotes per post', 'footnotes-made-easy' ); ?></p></td> 66 50 </tr> 67 51 68 52 <tr> 69 <th scope="row"><label for="superscript"><?php e cho __( ucwords( 'superscript' ), 'footnotes-made-easy' ); ?></label></th>70 <td><input type="checkbox" name="superscript" <?php checked( $this->current_options[ 'superscript' ], true ); ?> /><?php _e( 'Show identifier as superscript', 'footnotes-made-easy' ); ?></td>53 <th scope="row"><label for="superscript"><?php esc_html_e( 'Superscript', 'footnotes-made-easy' ); ?></label></th> 54 <td><input type="checkbox" name="superscript" <?php checked( $this->current_options[ 'superscript' ], true ); ?> /><?php esc_html_e( 'Show identifier as superscript', 'footnotes-made-easy' ); ?></td> 71 55 </tr> 72 56 73 57 <tr> 74 <th scope="row"><label for="pre_backlink"><?php e cho __( ucwords( 'back-link' ), 'footnotes-made-easy' ); ?></label></th>58 <th scope="row"><label for="pre_backlink"><?php esc_html_e( 'Back-link', 'footnotes-made-easy' ); ?></label></th> 75 59 <td> 76 60 <input type="text" size="3" name="pre_backlink" value="<?php echo esc_attr( $this->current_options[ 'pre_backlink' ] ); ?>" /> 77 <input type="text" size="10" name="backlink" value="<?php echo $this->current_options[ 'backlink' ]; ?>" />61 <input type="text" size="10" name="backlink" value="<?php echo esc_attr( $this->current_options[ 'backlink' ] ); ?>" /> 78 62 <input type="text" size="3" name="post_backlink" value="<?php echo esc_attr( $this->current_options[ 'post_backlink' ] ); ?>" /> 79 <p class="description"><?php _e( sprintf( 'These affect how the back-links after each footnote look. A good back-link character is %s. If you want to remove the back-links all together, you can effectively do so by making all these settings blank.', '&#8617; (↩)' ), 'footnotes-made-easy' ); ?></p></td> 63 <p class="description"><?php 64 /* translators: %s: Example back-link character (↩) */ 65 echo esc_html( sprintf( __( 'These affect how the back-links after each footnote look. A good back-link character is %s. If you want to remove the back-links all together, you can effectively do so by making all these settings blank.', 'footnotes-made-easy' ), '&#8617; (↩)' ) ); 66 ?></p></td> 80 67 </tr> 81 68 82 69 <tr> 83 <th scope="row"><label for="pre_footnotes"><?php e cho __( ucwords( 'Footnotes header' ), 'footnotes-made-easy' ); ?></label></th>84 <td><textarea name="pre_footnotes" rows="3" cols="60" class="large-text code"><?php echo $this->current_options[ 'pre_footnotes' ]; ?></textarea>85 <p class="description"><?php _e( 'Anything to be displayed before the footnotes at the bottom of the post can go here.', 'footnotes-made-easy' ); ?></p></td>70 <th scope="row"><label for="pre_footnotes"><?php esc_html_e( 'Footnotes Header', 'footnotes-made-easy' ); ?></label></th> 71 <td><textarea name="pre_footnotes" rows="3" cols="60" class="large-text code"><?php echo esc_textarea( $this->current_options[ 'pre_footnotes' ] ); ?></textarea> 72 <p class="description"><?php esc_html_e( 'Anything to be displayed before the footnotes at the bottom of the post can go here.', 'footnotes-made-easy' ); ?></p></td> 86 73 </tr> 87 74 88 75 <tr> 89 <th scope="row"><label for="post_footnotes"><?php e cho __( ucwords( 'Footnotes footer' ), 'footnotes-made-easy' ); ?></label></th>90 <td><textarea name="post_footnotes" rows="3" cols="60" class="large-text code"><?php echo $this->current_options[ 'post_footnotes' ]; ?></textarea>91 <p class="description"><?php _e( 'Anything to be displayed after the footnotes at the bottom of the post can go here.', 'footnotes-made-easy' ); ?></p></td>76 <th scope="row"><label for="post_footnotes"><?php esc_html_e( 'Footnotes Footer', 'footnotes-made-easy' ); ?></label></th> 77 <td><textarea name="post_footnotes" rows="3" cols="60" class="large-text code"><?php echo esc_textarea( $this->current_options[ 'post_footnotes' ] ); ?></textarea> 78 <p class="description"><?php esc_html_e( 'Anything to be displayed after the footnotes at the bottom of the post can go here.', 'footnotes-made-easy' ); ?></p></td> 92 79 </tr> 93 80 94 81 <tr> 95 <th scope="row"><?php e cho __( ucwords( 'pretty tooltips' ), 'footnotes-made-easy' ); ?></th>82 <th scope="row"><?php esc_html_e( 'Pretty Tooltips', 'footnotes-made-easy' ); ?></th> 96 83 <td><label for="pretty_tooltips"><input type="checkbox" name="pretty_tooltips" id="pretty_tooltips" <?php checked( $this->current_options[ 'pretty_tooltips' ], true ); ?>/> 97 <?php _e( 'Uses jQuery UI to show pretty tooltips', 'footnotes-made-easy' ); ?></label></td>84 <?php esc_html_e( 'Uses jQuery UI to show pretty tooltips', 'footnotes-made-easy' ); ?></label></td> 98 85 </tr> 99 86 100 87 <tr> 101 <th scope="row"><?php e cho __( ucwords( 'combine notes' ), 'footnotes-made-easy' ); ?></th>88 <th scope="row"><?php esc_html_e( 'Combine Notes', 'footnotes-made-easy' ); ?></th> 102 89 <td><label for="combine_identical_notes"><input type="checkbox" name="combine_identical_notes" id="combine_identical_notes" <?php checked( $this->current_options[ 'combine_identical_notes' ], true ); ?>/> 103 <?php _e( 'Combine identical footnotes', 'footnotes-made-easy' ); ?></label></td>90 <?php esc_html_e( 'Combine identical footnotes', 'footnotes-made-easy' ); ?></label></td> 104 91 </tr> 105 92 106 93 <tr> 107 <th scope="row"><label for="priority"><?php e cho __( ucwords( 'priority' ), 'footnotes-made-easy' ); ?></label></th>94 <th scope="row"><label for="priority"><?php esc_html_e( 'Priority', 'footnotes-made-easy' ); ?></label></th> 108 95 <td><input type="text" size="3" name="priority" id="priority" value="<?php echo esc_attr( $this->current_options[ 'priority' ] ); ?>" /> 109 <?php _e( 'The default is 11', 'footnotes-made-easy' ); ?><p class="description"><?php_e( 'This setting controls the order in which this plugin executes in relation to others. Modifying this setting may therefore affect the behavior of other plugins.', 'footnotes-made-easy' ); ?></p></td>96 <?php esc_html_e( 'The default is 11', 'footnotes-made-easy' ); ?><p class="description"><?php esc_html_e( 'This setting controls the order in which this plugin executes in relation to others. Modifying this setting may therefore affect the behavior of other plugins.', 'footnotes-made-easy' ); ?></p></td> 110 97 </tr> 111 98 112 99 <tr> 113 <th scope="row"><?php e cho __( ucwords( 'suppress Footnotes' ), 'footnotes-made-easy' ); ?></th>100 <th scope="row"><?php esc_html_e( 'Suppress Footnotes', 'footnotes-made-easy' ); ?></th> 114 101 <td> 115 <label for="no_display_home"><input type="checkbox" name="no_display_home" id="no_display_home" <?php checked( $this->current_options[ 'no_display_home' ], true ); ?> /> <?php e cho __( ucwords( 'on the home page' ), 'footnotes-made-easy' ); ?></label></br>116 <label for="no_display_preview"><input type="checkbox" name="no_display_preview" id="no_display_preview" <?php checked( $this->current_options[ 'no_display_preview' ], true ); ?> /> <?php e cho __( ucwords( 'when displaying a preview' ), 'footnotes-made-easy' ); ?></label></br>117 <label for="no_display_search"><input type="checkbox" name="no_display_search" id="no_display_search" <?php checked( $this->current_options[ 'no_display_search' ], true ); ?> /> <?php e cho __( ucwords( 'in search results' ), 'footnotes-made-easy' ); ?></label></br>118 <label for="no_display_feed"><input type="checkbox" name="no_display_feed" id="no_display_feed" <?php checked( $this->current_options[ 'no_display_feed' ], true ); ?> /> <?php _e( 'In the feed (RSS, Atom, etc.)', 'footnotes-made-easy' ); ?></label></br>119 <label for="no_display_archive"><input type="checkbox" name="no_display_archive" id="no_display_archive" <?php checked( $this->current_options[ 'no_display_archive' ], true ); ?> /> <?php e cho __( ucwords( 'in any kind of archive' ), 'footnotes-made-easy' ); ?></label></br>120 <label for="no_display_category"><input type="checkbox" name="no_display_category" id="no_display_category" <?php checked( $this->current_options[ 'no_display_category' ], true ); ?> /> <?php e cho __( ucwords( 'in category archives' ), 'footnotes-made-easy' ); ?></label></br>121 <label for="no_display_date"><input type="checkbox" name="no_display_date" id="no_display_date" <?php checked( $this->current_options[ 'no_display_date' ], true ); ?> /> <?php _e( 'in date-based archives', 'footnotes-made-easy' ); ?></label></br>102 <label for="no_display_home"><input type="checkbox" name="no_display_home" id="no_display_home" <?php checked( $this->current_options[ 'no_display_home' ], true ); ?> /> <?php esc_html_e( 'On the Home Page', 'footnotes-made-easy' ); ?></label></br> 103 <label for="no_display_preview"><input type="checkbox" name="no_display_preview" id="no_display_preview" <?php checked( $this->current_options[ 'no_display_preview' ], true ); ?> /> <?php esc_html_e( 'When Displaying a Preview', 'footnotes-made-easy' ); ?></label></br> 104 <label for="no_display_search"><input type="checkbox" name="no_display_search" id="no_display_search" <?php checked( $this->current_options[ 'no_display_search' ], true ); ?> /> <?php esc_html_e( 'In Search Results', 'footnotes-made-easy' ); ?></label></br> 105 <label for="no_display_feed"><input type="checkbox" name="no_display_feed" id="no_display_feed" <?php checked( $this->current_options[ 'no_display_feed' ], true ); ?> /> <?php esc_html_e( 'In the feed (RSS, Atom, etc.)', 'footnotes-made-easy' ); ?></label></br> 106 <label for="no_display_archive"><input type="checkbox" name="no_display_archive" id="no_display_archive" <?php checked( $this->current_options[ 'no_display_archive' ], true ); ?> /> <?php esc_html_e( 'In Any Kind of Archive', 'footnotes-made-easy' ); ?></label></br> 107 <label for="no_display_category"><input type="checkbox" name="no_display_category" id="no_display_category" <?php checked( $this->current_options[ 'no_display_category' ], true ); ?> /> <?php esc_html_e( 'In Category Archives', 'footnotes-made-easy' ); ?></label></br> 108 <label for="no_display_date"><input type="checkbox" name="no_display_date" id="no_display_date" <?php checked( $this->current_options[ 'no_display_date' ], true ); ?> /> <?php esc_html_e( 'in date-based archives', 'footnotes-made-easy' ); ?></label></br> 122 109 123 110 </td></tr> … … 125 112 </table> 126 113 127 <p><?php _e( 'Changing the following settings will change functionality in a way which may stop footnotes from displaying correctly. For footnotes to work as expected after updating these settings, you will need to manually update all existing posts with footnotes.', 'footnotes-made-easy' ); ?></p>114 <p><?php esc_html_e( 'Changing the following settings will change functionality in a way which may stop footnotes from displaying correctly. For footnotes to work as expected after updating these settings, you will need to manually update all existing posts with footnotes.', 'footnotes-made-easy' ); ?></p> 128 115 129 116 <table class="form-table"> 130 117 131 118 <tr> 132 <th scope="row"><label for="footnotes_open"><?php e cho __( ucwords( 'begin a footnote' ), 'footnotes-made-easy' ); ?></label></th>119 <th scope="row"><label for="footnotes_open"><?php esc_html_e( 'Begin a Footnote', 'footnotes-made-easy' ); ?></label></th> 133 120 <td><input type="text" size="3" name="footnotes_open" id="footnotes_open" value="<?php echo esc_attr( $this->current_options[ 'footnotes_open' ] ); ?>" /></td> 134 121 </tr> 135 122 136 123 <tr> 137 <th scope="row"><label for="footnotes_close"><?php e cho __( ucwords ( 'end a Footnote' ), 'footnotes-made-easy' ); ?></label></th>124 <th scope="row"><label for="footnotes_close"><?php esc_html_e( 'End a Footnote', 'footnotes-made-easy' ); ?></label></th> 138 125 <td><input type="text" size="3" name="footnotes_close" id="footnotes_close" value="<?php echo esc_attr( $this->current_options[ 'footnotes_close' ] ); ?>" /></td> 139 126 </tr> … … 143 130 <?php wp_nonce_field( 'footnotes-nonce','footnotes_nonce' ); ?> 144 131 145 <p class="submit"><input type="submit" name="save_options" value="<?php e cho __( ucwords( 'save changes' ), 'footnotes-made-easy' ); ?>" class="button-primary" /></p>132 <p class="submit"><input type="submit" name="save_options" value="<?php esc_attr_e( 'Save Changes', 'footnotes-made-easy' ); ?>" class="button-primary" /></p> 146 133 <input type="hidden" name="save_footnotes_made_easy_options" value="1" /> 147 134 148 135 </form> 149 136 150 <div class="db-ad">151 <div class="inside">152 <p>For support, feature requests and bug reporting, please open an issue on <a href="https://github.com/divibanks/footnotes-made-easy/issues/" rel="external">GitHub</a>.</p>153 <p>©<?php echo gmdate( 'Y' ); ?> <a href="https:divibanks.io" rel="external"><strong>Divi Banks</strong></a> · Building tools that make the lives of WordPress users easy.</p>154 </div>155 156 137 </div> -
footnotes-made-easy/trunk/readme.txt
r3342111 r3388488 1 1 === Footnotes Made Easy === 2 Contributors: lumiblog, d ivibanks, dartiss, manuell2 Contributors: lumiblog, dartiss, manuell 3 3 Tags: bibliography, footnotes, formatting, reference 4 Donate link: https:// divibanks.io/sponsor/4 Donate link: https://lumumbas.blog/support-wp-plugins 5 5 Requires at least: 4.6 6 6 Tested up to: 6.8 7 7 Requires PHP: 7.4 8 Stable tag: 3.0. 78 Stable tag: 3.0.8 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 28 28 **Footnotes Made Easy is a fork of [WP Footnotes](https://github.com/drzax/wp-footnotes "Github - wp-footnotes"), a plugin by Simon Elvery which was abandoned some years ago**. 29 29 30 **Please visit the [Github page](https://github.com/ divibanks/footnotes-made-easy/ "Github") for the latest code development, planned enhancements and known issues**.30 **Please visit the [Github page](https://github.com/lumumbapl/footnotes-made-easy/ "Github") for the latest code development, planned enhancements and known issues**. 31 31 32 32 == Getting Started == … … 113 113 I use semantic versioning, with the first release being 1.0. 114 114 115 = 3.0.8 [November 2, 2025] = 116 * CRITICAL SECURITY FIX: CVE-2025-11733 - Fixed unauthenticated stored XSS vulnerability (CVSS 7.2) 117 * Security: Complete security overhaul with 5-layer protection 118 * Security: Proper authentication, CSRF protection, input sanitization, and output escaping 119 * Fix: 32 output escaping issues resolved 120 * Fix: 18 translation strings corrected 121 * Fix: All code now complies with WordPress standards 122 * Performance: 20-30% faster page loads with optimized resource loading 123 * Enhancement: Professional settings page footer 124 * Compatibility: WordPress 6.8 and PHP 8.4 125 * Quality: Zero Plugin Check errors or warnings 126 115 127 = 3.0.7 [August 9, 2025] = 116 128 * Fix: PHP 8.4 Compatibility issue. … … 123 135 == Upgrade Notice == 124 136 125 = 3.0.7 = 126 * Fix: PHP 8.4 Compatibility issue. 127 * WordPress 6.8 Compatibility Test 137 == Upgrade Notice == 138 139 = 3.0.8 = 140 CRITICAL SECURITY FIX - UPDATE NOW 141 142 This release fixes CVE-2025-11733, a HIGH severity unauthenticated XSS vulnerability that could allow attackers to inject malicious code into your site. 143 144 Security improvements include 5-layer protection, proper authentication, CSRF protection, and complete input/output sanitization. 145 146 Also includes: 51 code improvements, 20-30% performance boost, WordPress 6.8 and PHP 8.4 compatibility.
Note: See TracChangeset
for help on using the changeset viewer.