Plugin Directory

Changeset 2531377


Ignore:
Timestamp:
05/13/2021 06:49:30 PM (5 years ago)
Author:
DaganLev
Message:

Maintenance Version Release

Location:
bulk-page-creator
Files:
6 added
2 edited

Legend:

Unmodified
Added
Removed
  • bulk-page-creator/trunk/bulk-page-creator.php

    r1993084 r2531377  
    44Plugin URI: https://solid-code.co.uk/
    55Description: Allows you to create multiple pages in a batch/bulk manner saving time when initially setting up your WordPress site.
    6 Version: 1.1.1
     6Version: 1.1.2
    77Author: Dagan Lev
    88Author URI: https://solid-code.co.uk
     
    7878                        $pcontent = '';
    7979                        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']));
    8181                        }
    8282                       
     83                        //sanitize type
     84                        $posttype = 'publish';
     85                        if(isset($_POST['posttype']) && preg_match('#^(draft|publish)$#', $_POST['posttype'])){
     86                            $posttype = $_POST['posttype'];
     87                        }
     88
    8389                        $params = array(
    8490                            'post_type' => 'page',
    85                             'post_status' => $_POST['posttype'],
     91                            'post_status' => $posttype,
    8692                            '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])),
    8995                            'post_content' => $pcontent);
    9096                       
     
    146152            </table>
    147153           
    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">
    149155                <textarea id="sc-pages" name="sc-pages" style="display:none;"></textarea>
    150156                <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  
    33Tags: Solid Code, Dagan Lev, Bulk Page Creator, batch action, add pages, add posts
    44Requires at least: 3.1
    5 Tested up to: 5.0.0
     5Tested up to: 5.7.2
    66Stable tag: trunk
    77
     
    5656Maintenance Version Release
    5757
     58= 1.1.2 =
     59Maintenance Version Release
     60
    5861== Screenshots ==
    5962
Note: See TracChangeset for help on using the changeset viewer.