Changeset 3416708
- Timestamp:
- 12/10/2025 07:16:59 PM (3 months ago)
- File:
-
- 1 edited
-
limit-post-add-on/trunk/limit-post.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
limit-post-add-on/trunk/limit-post.php
r3412544 r3416708 4 4 Plugin URI: https://doc4design.com/limit-post-add-on/ 5 5 Description: Limits the displayed text length with both the_content_limit and get_the_content_limit 6 Version: 2. 06 Version: 2.1 7 7 Requires at least: 2.7 8 8 Author: Doc4, Alfonso Sanchez-Paus Diaz, Julian Simon de Castro … … 15 15 /****************************************************************************** 16 16 17 Copyright 2008 - 202 6Doc4 : info@doc4design.com17 Copyright 2008 - 2024 Doc4 : info@doc4design.com 18 18 19 19 This program is free software; you can redistribute it and/or … … 38 38 * Output limited content (HTML allowed). 39 39 */ 40 function l imit_post_add_on_the_content_limit( $max_char, $more_link_text = '(more...)', $stripteaser = 0, $more_file = '' ) {40 function lpao_the_content( $max_char, $more_link_text = '(more...)', $stripteaser = 0, $more_file = '' ) { 41 41 42 42 // Get the content … … 51 51 $p = isset( $_GET['p'] ) ? sanitize_text_field( wp_unslash( $_GET['p'] ) ) : ''; 52 52 $nonce = isset( $_GET['_wpnonce'] ) ? sanitize_text_field( wp_unslash( $_GET['_wpnonce'] ) ) : ''; 53 $nonce_valid = ( ! empty( $nonce ) && wp_verify_nonce( $nonce, 'l imit_post_add_on_content' ) );53 $nonce_valid = ( ! empty( $nonce ) && wp_verify_nonce( $nonce, 'lpao_content' ) ); 54 54 55 55 // Show full content if ?p= is set and nonce is valid … … 75 75 } 76 76 77 77 78 /** 78 79 * Output limited content (plain text only — stripped of HTML tags). 79 80 */ 80 function l imit_post_add_on_get_the_content_limit( $max_char, $more_link_text = '(more...)', $stripteaser = 0, $more_file = '' ) {81 function lpao_get_the_content( $max_char, $more_link_text = '(more...)', $stripteaser = 0, $more_file = '' ) { 81 82 82 83 // Get the content … … 92 93 $p = isset( $_GET['p'] ) ? sanitize_text_field( wp_unslash( $_GET['p'] ) ) : ''; 93 94 $nonce = isset( $_GET['_wpnonce'] ) ? sanitize_text_field( wp_unslash( $_GET['_wpnonce'] ) ) : ''; 94 $nonce_valid = ( ! empty( $nonce ) && wp_verify_nonce( $nonce, 'l imit_post_add_on_content' ) );95 $nonce_valid = ( ! empty( $nonce ) && wp_verify_nonce( $nonce, 'lpao_content' ) ); 95 96 96 97 // Show full content if ?p= is set and nonce is valid … … 115 116 } 116 117 } 118 117 119 ?>
Note: See TracChangeset
for help on using the changeset viewer.