Plugin Directory

Changeset 3405134


Ignore:
Timestamp:
11/28/2025 12:08:38 PM (4 months ago)
Author:
GamerZ
Message:

Deploying wp-showhide from GitHub

Location:
wp-showhide/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wp-showhide/trunk/readme.txt

    r2949751 r3405134  
    11# WP-ShowHide
    22Contributors: GamerZ 
    3 Donate link: http://lesterchan.net/site/donation/ 
     3Donate link: https://lesterchan.net/site/donation/ 
    44Tags: show, hide, content, visibility, press release, toggle 
    55Requires at least: 3.0 
    6 Tested up to: 6.3 
    7 Stable tag: trunk 
     6Tested up to: 6.8 
     7Stable tag: 1.06 
    88
    99Allows you to embed content within your blog post via WordPress ShortCode API and toggling the visibility of the content via a link.
     
    5858
    5959## Changelog
     60### Version 1.06
     61* FIXED: esc_html() for more text to prevent XSS
     62
    6063### Version 1.05
    6164* FIXED: esc_attr type attributes to prevent XSS
  • wp-showhide/trunk/wp-showhide.php

    r2845414 r3405134  
    44Plugin URI: https://lesterchan.net/portfolio/programming/php/
    55Description: Allows you to embed content within your blog post via WordPress ShortCode API and toggling the visibility of the content via a link. By default the content is hidden and user will have to click on the "Show Content" link to toggle it. Similar to what Engadget is doing for their press releases. Example usage: <code>[showhide type="pressrelease"]Press Release goes in here.[/showhide]</code>
    6 Version: 1.05
     6Version: 1.06
    77Author: Lester 'GaMerZ' Chan
    88Author URI: https://lesterchan.net
     
    1212*/
    1313
    14 /*  Copyright 2023  Lester Chan  (email : lesterchan@gmail.com)
     14/*  Copyright 2025  Lester Chan  (email : lesterchan@gmail.com)
    1515
    1616    This program is free software; you can redistribute it and/or modify
     
    7474
    7575    // Format HTML Output
    76     $output  = '<div id="' . esc_attr( $attributes['type'] ) . '-link-' . $post_id . '" class="sh-link ' . esc_attr( $attributes['type'] ) . '-link ' . $hidden_class .'"><a href="#" onclick="showhide_toggle(\'' . esc_js( $attributes['type'] ) . '\', ' . $post_id . ', \'' . esc_js( $more_text ) . '\', \'' . esc_js( $less_text ) . '\'); return false;" aria-expanded="' . $hidden_aria_expanded .'"><span id="' . esc_attr( $attributes['type'] ) . '-toggle-' . $post_id . '">' . $more_text . '</span></a></div>';
     76    $output  = '<div id="' . esc_attr( $attributes['type'] ) . '-link-' . $post_id . '" class="sh-link ' . esc_attr( $attributes['type'] ) . '-link ' . $hidden_class .'"><a href="#" onclick="showhide_toggle(\'' . esc_js( $attributes['type'] ) . '\', ' . $post_id . ', \'' . esc_js( $more_text ) . '\', \'' . esc_js( $less_text ) . '\'); return false;" aria-expanded="' . $hidden_aria_expanded .'"><span id="' . esc_attr( $attributes['type'] ) . '-toggle-' . $post_id . '">' . esc_html( $more_text ). '</span></a></div>';
    7777    $output .= '<div id="' . esc_attr( $attributes['type'] ) . '-content-' . $post_id . '" class="sh-content ' . esc_attr( $attributes['type'] ) . '-content ' . $hidden_class . '" style="' . $hidden_css . '">' . do_shortcode( $content ) . '</div>';
    7878
Note: See TracChangeset for help on using the changeset viewer.