Plugin Directory

Changeset 1958385


Ignore:
Timestamp:
10/18/2018 12:20:06 AM (7 years ago)
Author:
hiroprot
Message:

Added support for nested shortcodes on the terms page

Location:
terms-before-download/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • terms-before-download/trunk/readme.txt

    r981678 r1958385  
    33Tags: download,terms,eula,license
    44Requires at least: 3.5
    5 Tested up to: 4.0
     5Tested up to: 4.9.8
    66Stable tag: trunk
    77License: GPL2
     
    6868== Changelog ==
    6969
     70= 1.0.1 =
     71* Added support for nested shortcodes on the terms page
     72
    7073= 1.0.0 =
    7174* Initial release
  • terms-before-download/trunk/terms-before-download.php

    r939315 r1958385  
    22/**
    33 * Plugin Name: Terms Before Download
    4  * Plugin URI: http://helgeklein.com/free-tools/terms-download/
     4 * Plugin URI: https://helgeklein.com/free-tools/terms-download/
    55 * Description: Shows a popup dialog with terms and conditions (EULA) that must be accepted before a file can be downloaded
    6  * Version: 1.0.0
     6 * Version: 1.0.1
    77 * Author: Helge Klein
    8  * Author URI: http://helgeklein.com
     8 * Author URI: https://helgeklein.com
    99 * License: GPL2
    1010 */
     
    6464      $terms_page = get_post ($terms_page_id, "OBJECT", "display");
    6565
    66    // Get the terms page content
    67    $terms_page_content = $terms_page->post_content;
     66   // Get the terms page content, allowing for nested shortcodes
     67   $terms_page_content = do_shortcode ($terms_page->post_content);
    6868   // Convert double line breaks into paragraphs, replacing \n with <br /> to the string
    6969   $terms_page_content = wpautop($terms_page_content);
Note: See TracChangeset for help on using the changeset viewer.