Changeset 2719837
- Timestamp:
- 05/07/2022 11:17:38 AM (4 years ago)
- Location:
- dropdown-and-scrollable-text/trunk
- Files:
-
- 3 edited
-
assets/clipboard.min.js (modified) (1 diff)
-
index.php (modified) (6 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dropdown-and-scrollable-text/trunk/assets/clipboard.min.js
r2307126 r2719837 8 8 var clipboard = new ClipboardJS('.btn'); 9 9 clipboard.on('success', function(e) { 10 console.log('hi');10 document.getElementById("copy-status").style.display = "inline-block"; 11 11 document.getElementById("copy-status").innerHTML = "Shortcode Copied To Clipboard!"; 12 12 }); -
dropdown-and-scrollable-text/trunk/index.php
r2307131 r2719837 5 5 Description: Create shortcode for Dropdown Text 6 6 Author: Pedram Nasertorabi 7 Version: 2. 07 Version: 2.1 8 8 Author URI: http://webodid.com/ 9 9 */ … … 115 115 padding: 11px; 116 116 color: white; 117 display: none; 117 118 } 118 119 </style> … … 126 127 <tr> 127 128 <td> 128 <form method="post" action=" ">129 <form method="post" action="<?php echo admin_url( 'admin.php?page=DST' ); ?>"> 129 130 <select id="theme" name="theme"> 130 131 <option value="3d">3d</option> … … 161 162 </td> 162 163 <td> 163 <form method="post" action=" ">164 <form method="post" action="<?php echo admin_url( 'admin.php?page=DST' ); ?>"> 164 165 <input placeholder="Enter height px (EX : 200)" name="drop-height" required> 165 166 <textarea placeholder="Enter Text Here" name="drop-content" required></textarea> … … 174 175 <?php 175 176 if ( isset( $_POST['create-scroll-shortcode'] ) ) { ?> 176 <?php $shortcode = '[scrollabletext theme=' . $_POST['theme'] . ' height=' . $_POST['height'] . ']' . $_POST['content']. ' [/scrollabletext]'; ?>177 <?php $shortcode = '[scrollabletext theme=' . sanitize_text_field($_POST['theme'] ). ' height=' . sanitize_text_field($_POST['height']) . ']' . sanitize_text_field($_POST['content']) . ' [/scrollabletext]'; ?> 177 178 <button class="btn copybtn" data-clipboard-text="<?php echo $shortcode ?>"> 178 179 Copy to clipboard … … 180 181 <span id="copy-status"></span> 181 182 <p class="shortcode-generated"><?php echo $shortcode ?></p> 182 <input value="<?php echo $shortcode ?>" <?php echo $_POST['content']?> type="hidden" id="shortcode">183 <input value="<?php echo $shortcode ?>" <?php echo sanitize_text_field($_POST['content']) ?> type="hidden" id="shortcode"> 183 184 <?php } ?> 184 185 <?php 185 186 if ( isset( $_POST['create-dropdown-shortcode'] ) ) { ?> 186 <?php $shortcode = '[dropdowntext height=' . $_POST['drop-height'] . ']' . $_POST['drop-content']. ' [/dropdowntext]'; ?>187 <?php $shortcode = '[dropdowntext height=' . sanitize_text_field($_POST['drop-height']) . ']' . sanitize_text_field($_POST['drop-content']) . ' [/dropdowntext]'; ?> 187 188 <button class="btn" data-clipboard-text="<?php echo $shortcode ?>"> 188 189 Copy to clipboard -
dropdown-and-scrollable-text/trunk/readme.txt
r2307126 r2719837 4 4 Tags: dropdown text,scrolling text, text box 5 5 Requires at least: 3.0.1 6 Tested up to: 5. 4.17 Stable tag: 2. 06 Tested up to: 5.9.3 7 Stable tag: 2.1 8 8 Requires PHP: 5.4 9 9 License: GPLv2 or later … … 33 33 Log into WordPress and navigate to the Plugins screen.<br> 34 34 Once installed, click the Activate link. 35 36 == Changelog == 37 = 2.1 = 38 * Fix security issues 39 * fix small bug 40 = 2.0 = 41 * Add Easy shortcode generator and option panel 42 43 == Upgrade Notice == 44 = 2.1 = 45 This version fixes a security related bug. Upgrade immediately.
Note: See TracChangeset
for help on using the changeset viewer.