Changeset 2531377
- Timestamp:
- 05/13/2021 06:49:30 PM (5 years ago)
- Location:
- bulk-page-creator
- Files:
-
- 6 added
- 2 edited
-
tags/1.1.2 (added)
-
tags/1.1.2/bulk-page-creator.php (added)
-
tags/1.1.2/my-script.js (added)
-
tags/1.1.2/my-style.css (added)
-
tags/1.1.2/readme.txt (added)
-
tags/1.1.2/screenshot-1.jpg (added)
-
trunk/bulk-page-creator.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
bulk-page-creator/trunk/bulk-page-creator.php
r1993084 r2531377 4 4 Plugin URI: https://solid-code.co.uk/ 5 5 Description: Allows you to create multiple pages in a batch/bulk manner saving time when initially setting up your WordPress site. 6 Version: 1.1. 16 Version: 1.1.2 7 7 Author: Dagan Lev 8 8 Author URI: https://solid-code.co.uk … … 78 78 $pcontent = ''; 79 79 if($_POST['pcontent']=='2'){ 80 $pcontent = str_ireplace('[pagetitle]','<h1>' . htmlentities($rres[5]) . '</h1>',$_POST['sc-pages-content']);80 $pcontent = str_ireplace('[pagetitle]','<h1>' . sanitize_text_field(htmlentities($rres[5])) . '</h1>',sanitize_textarea_field($_POST['sc-pages-content'])); 81 81 } 82 82 83 //sanitize type 84 $posttype = 'publish'; 85 if(isset($_POST['posttype']) && preg_match('#^(draft|publish)$#', $_POST['posttype'])){ 86 $posttype = $_POST['posttype']; 87 } 88 83 89 $params = array( 84 90 'post_type' => 'page', 85 'post_status' => $ _POST['posttype'],91 'post_status' => $posttype, 86 92 'post_parent' => $parent, 87 'post_title' => rtrim($rres[5]),88 'page_template' => rtrim($rres[6]),93 'post_title' => sanitize_text_field(rtrim($rres[5])), 94 'page_template' => sanitize_text_field(rtrim($rres[6])), 89 95 'post_content' => $pcontent); 90 96 … … 146 152 </table> 147 153 148 <form id="sc-add-pages" name="sc-add-pages" method="post" action="?page= <?php echo $_GET['page']; ?>">154 <form id="sc-add-pages" name="sc-add-pages" method="post" action="?page=sc_bpc_page"> 149 155 <textarea id="sc-pages" name="sc-pages" style="display:none;"></textarea> 150 156 <p>When you are ready to commit your changes to the site just click the button below...</p> -
bulk-page-creator/trunk/readme.txt
r1993084 r2531377 3 3 Tags: Solid Code, Dagan Lev, Bulk Page Creator, batch action, add pages, add posts 4 4 Requires at least: 3.1 5 Tested up to: 5. 0.05 Tested up to: 5.7.2 6 6 Stable tag: trunk 7 7 … … 56 56 Maintenance Version Release 57 57 58 = 1.1.2 = 59 Maintenance Version Release 60 58 61 == Screenshots == 59 62
Note: See TracChangeset
for help on using the changeset viewer.