Plugin Directory

Changeset 3416708


Ignore:
Timestamp:
12/10/2025 07:16:59 PM (3 months ago)
Author:
doc4
Message:

Updating to 2.1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • limit-post-add-on/trunk/limit-post.php

    r3412544 r3416708  
    44Plugin URI: https://doc4design.com/limit-post-add-on/
    55Description: Limits the displayed text length with both the_content_limit and get_the_content_limit
    6 Version: 2.0
     6Version: 2.1
    77Requires at least: 2.7
    88Author: Doc4, Alfonso Sanchez-Paus Diaz, Julian Simon de Castro
     
    1515/******************************************************************************
    1616
    17 Copyright 2008 - 2026  Doc4 : info@doc4design.com
     17Copyright 2008 - 2024  Doc4 : info@doc4design.com
    1818
    1919This program is free software; you can redistribute it and/or
     
    3838 * Output limited content (HTML allowed).
    3939 */
    40 function limit_post_add_on_the_content_limit( $max_char, $more_link_text = '(more...)', $stripteaser = 0, $more_file = '' ) {
     40function lpao_the_content( $max_char, $more_link_text = '(more...)', $stripteaser = 0, $more_file = '' ) {
    4141
    4242    // Get the content
     
    5151    $p = isset( $_GET['p'] ) ? sanitize_text_field( wp_unslash( $_GET['p'] ) ) : '';
    5252    $nonce = isset( $_GET['_wpnonce'] ) ? sanitize_text_field( wp_unslash( $_GET['_wpnonce'] ) ) : '';
    53     $nonce_valid = ( ! empty( $nonce ) && wp_verify_nonce( $nonce, 'limit_post_add_on_content' ) );
     53    $nonce_valid = ( ! empty( $nonce ) && wp_verify_nonce( $nonce, 'lpao_content' ) );
    5454
    5555    // Show full content if ?p= is set and nonce is valid
     
    7575}
    7676
     77
    7778/**
    7879 * Output limited content (plain text only — stripped of HTML tags).
    7980 */
    80 function limit_post_add_on_get_the_content_limit( $max_char, $more_link_text = '(more...)', $stripteaser = 0, $more_file = '' ) {
     81function lpao_get_the_content( $max_char, $more_link_text = '(more...)', $stripteaser = 0, $more_file = '' ) {
    8182
    8283    // Get the content
     
    9293    $p = isset( $_GET['p'] ) ? sanitize_text_field( wp_unslash( $_GET['p'] ) ) : '';
    9394    $nonce = isset( $_GET['_wpnonce'] ) ? sanitize_text_field( wp_unslash( $_GET['_wpnonce'] ) ) : '';
    94     $nonce_valid = ( ! empty( $nonce ) && wp_verify_nonce( $nonce, 'limit_post_add_on_content' ) );
     95    $nonce_valid = ( ! empty( $nonce ) && wp_verify_nonce( $nonce, 'lpao_content' ) );
    9596
    9697    // Show full content if ?p= is set and nonce is valid
     
    115116    }
    116117}
     118
    117119?>
Note: See TracChangeset for help on using the changeset viewer.