Plugin Directory

Changeset 3291023


Ignore:
Timestamp:
05/10/2025 08:39:24 PM (9 months ago)
Author:
sapayth
Message:

release version 2.0.0

Location:
bulk-page-maker-light
Files:
59 added
4 deleted
21 edited

Legend:

Unmodified
Added
Removed
  • bulk-page-maker-light/trunk/assets/js/bpm-main.js

    r2557773 r3291023  
    66    var postType = document.getElementById('cmb_post_type').value;
    77    var pageCmb = document.getElementById('page_id');
    8     if(postType == 'post') {       
     8    if (postType == 'post') {
    99        pageCmb.setAttribute('disabled', true);
    1010        pageCmb.selectedIndex = 0;
  • bulk-page-maker-light/trunk/bulk-page-maker-light.php

    r2576225 r3291023  
    33Plugin Name: Bulk Page Maker Light
    44Description: A Light plugin to generate bulk WordPress Pages or Posts
    5 Version: 1.3.0
     5Version: 2.0.0
    66Author: Sapayth H.
    77Author URI: http://sapayth.com
    88License: GPLv2 or later
    9 Requires at least: 5.4
     9Requires at least: 5.6
    1010Requires PHP: 5.6
    11 Text Domain: sh-bpm-light
     11Text Domain: bpm-light
    1212*/
    1313
     
    3737*/
    3838final class Bulk_Page_Maker {
    39    
    40     const VERSION = '1.3.0';
    41    
     39
     40    const VERSION = '2.0.0';
     41
    4242    /*
    4343    * class constructor
     
    4545    private function __construct() {
    4646        $this->define_constants();
    47        
     47
    4848        register_activation_hook( __FILE__, [ $this, 'activate'] );
    4949        register_deactivation_hook( __FILE__, [ $this, 'deactivate'] );
     
    5151        add_action( 'init', [$this, 'init_plugin'] );
    5252    }
    53    
     53
    5454    /*
    5555    * initializes a singleton instance
     
    5757    public static function init() {
    5858        static $instance = false;
    59        
     59
    6060        if( ! $instance ) {
    6161            $instance = new self();
    6262        }
    63        
    64         return $instance;       
     63
     64        return $instance;
    6565    }
    6666
    6767    /**
    6868     * constants
    69      */   
     69     */
    7070    public function define_constants() {
    7171        $this->define( 'BPM_VERSION', self::VERSION );
     
    7373        $this->define( 'BPM_PATH', __DIR__ );
    7474        $this->define( 'BPM_URL', plugins_url('', BPM_FILE) );
    75         $this->define( 'BPM_ASSETS', BPM_URL . '/assets' );       
     75        $this->define( 'BPM_ASSETS', BPM_URL . '/assets' );
    7676    }
    7777
     
    9494    public function init_plugin() {
    9595        new Bulk\Page\Maker\Assets();
    96        
     96
     97        new Bulk\Page\Maker\Api();
     98
    9799        if( is_admin() ) {
    98100            new Bulk\Page\Maker\Admin();
     
    102104    /**
    103105     * Do stuff upon plugin activation
    104      */   
     106     */
    105107    public function activate() {
    106108        $installer = new Bulk\Page\Maker\Installer();
     
    110112    /**
    111113     * Do stuff upon plugin deactivation
    112      */   
     114     */
    113115    public function deactivate() {
    114116        $transient_posts = 'bpmaker_all_pages';
  • bulk-page-maker-light/trunk/includes/Admin.php

    r2557773 r3291023  
    1919    }
    2020
     21    /**
     22     * dispatch actions
     23     * @param  object $bulkpage
     24     * @return  void
     25     */
    2126    public function dispatch_actions( $bulkpage ) {
    2227        add_action( 'admin_init', [ $bulkpage, 'form_handler' ] );
    2328        add_action( 'admin_post_bpm-delete-action', [ $bulkpage, 'delete_page' ] );
     29       
     30        // Add AJAX handler for React form submission
     31        add_action( 'wp_ajax_bpm_create_bulk_pages', [ $bulkpage, 'ajax_create_bulk_pages' ] );
    2432    }
    2533}
  • bulk-page-maker-light/trunk/includes/Admin/Bulk_Page.php

    r2557773 r3291023  
    1515     */
    1616    public function plugin_page() {
    17        
     17
    1818        $action = isset( $_GET['action'] ) ? sanitize_key( $_GET['action'] ) : 'list';
    1919
    2020        switch ( $action ) {
    2121            case 'new':
    22                 wp_enqueue_script( 'bpm-script' );
    2322                $template = __DIR__ . '/views/bulk-page-new.php';
    2423                break;
    25            
     24
    2625            default:
    2726                $template = __DIR__ . '/views/bulk-page-list.php';
     
    5857
    5958        if( empty( $_POST['txt_pages_list'] ) ) {
    60             $this->errors['page_names'] = __( 'Please provide at least one page/post name', 'sh-bpm-light' );
     59            $this->errors['page_names'] = __( 'Please provide at least one page/post name', 'bpm-light' );
    6160        } else {
    6261            $pages = sanitize_textarea_field( $_POST['txt_pages_list'] );
     
    118117
    119118        $redirected_to = admin_url( 'admin.php?page=bulk-page-maker&inserted=true', 'admin' );
    120        
     119
    121120        wp_redirect( $redirected_to );
    122121        exit;
     
    141140
    142141        wp_redirect( $redirected_to );
    143        
     142
    144143        exit;
    145144    }
     145
     146    /**
     147     * Process AJAX request from React app
     148     *
     149     * @return void
     150     */
     151    public function ajax_create_bulk_pages() {
     152        // Verify nonce
     153        if (!check_ajax_referer('wp_rest', 'nonce', false)) {
     154            wp_send_json_error([
     155                'message' => __('Security check failed. Please refresh the page and try again.', 'bpm-light')
     156            ]);
     157            return;
     158        }
     159
     160        // Check user capabilities
     161        if (!current_user_can('publish_pages')) {
     162            wp_send_json_error([
     163                'message' => __('You do not have permission to create pages.', 'bpm-light')
     164            ]);
     165            return;
     166        }
     167
     168        // Get the form data
     169        $pages_list = isset($_POST['pages_list']) ? sanitize_text_field($_POST['pages_list']) : '';
     170        $page_content = isset($_POST['page_content']) ? wp_kses_post($_POST['page_content']) : '';
     171        $post_type = isset($_POST['post_type']) ? sanitize_text_field($_POST['post_type']) : 'page';
     172        $page_status = isset($_POST['page_status']) ? sanitize_text_field($_POST['page_status']) : 'publish';
     173        $comment_status = isset($_POST['comment_status']) ? sanitize_text_field($_POST['comment_status']) : 'closed';
     174
     175        // Validate pages list
     176        if (empty($pages_list)) {
     177            wp_send_json_error([
     178                'message' => __('Please enter a list of pages/posts.', 'bpm-light')
     179            ]);
     180            return;
     181        }
     182
     183        // Validate post type
     184        if (!in_array($post_type, ['page', 'post'])) {
     185            wp_send_json_error([
     186                'message' => __('Invalid post type.', 'bpm-light')
     187            ]);
     188            return;
     189        }
     190
     191        // Validate post status
     192        if (!in_array($page_status, ['publish', 'draft', 'pending'])) {
     193            wp_send_json_error([
     194                'message' => __('Invalid post status.', 'bpm-light')
     195            ]);
     196            return;
     197        }
     198
     199        // Validate comment status
     200        if (!in_array($comment_status, ['open', 'closed'])) {
     201            wp_send_json_error([
     202                'message' => __('Invalid comment status.', 'bpm-light')
     203            ]);
     204            return;
     205        }
     206
     207        // Process the pages
     208        $page_names = explode(',', $pages_list);
     209        $page_names = array_map('trim', $page_names);
     210        $page_names = array_filter($page_names); // Remove empty items
     211
     212        if (empty($page_names)) {
     213            wp_send_json_error([
     214                'message' => __('Please enter valid page names.', 'bpm-light')
     215            ]);
     216            return;
     217        }
     218
     219        $created_pages = [];
     220        $failed_pages = [];
     221
     222        foreach ($page_names as $page_name) {
     223            $page_args = [
     224                'post_type' => $post_type,
     225                'post_title' => $page_name,
     226                'post_content' => $page_content,
     227                'post_status' => $page_status,
     228                'comment_status' => $comment_status,
     229            ];
     230
     231            $page_id = wp_insert_post($page_args);
     232
     233            if (!is_wp_error($page_id) && $page_id > 0) {
     234                $created_pages[] = $page_name;
     235            } else {
     236                $failed_pages[] = $page_name;
     237            }
     238        }
     239
     240        // Update transient for all pages
     241        delete_transient('bpmaker_all_pages');
     242        delete_transient('bpmaker_pages_count');
     243
     244        // Send response
     245        if (count($created_pages) > 0) {
     246            wp_send_json_success([
     247                'message' => sprintf(
     248                    __('%d %s created successfully: %s', 'bpm-light'),
     249                    count($created_pages),
     250                    $post_type === 'page' ? 'pages' : 'posts',
     251                    implode(', ', $created_pages)
     252                ),
     253                'created' => $created_pages,
     254                'failed' => $failed_pages,
     255                'clear_form' => count($failed_pages) === 0, // Clear form if all succeeded
     256            ]);
     257        } else {
     258            wp_send_json_error([
     259                'message' => __('Failed to create pages/posts. Please try again.', 'bpm-light'),
     260                'failed' => $failed_pages,
     261            ]);
     262        }
     263
     264        exit;
     265    }
    146266}
  • bulk-page-maker-light/trunk/includes/Admin/Menu.php

    r2557773 r3291023  
    2323        $capability  = 'manage_options';
    2424       
    25         add_menu_page( __( 'Bulk Page Maker', 'sh-bpm-light' ), __( 'Bulk Page Maker', 'sh-bpm-light' ), $capability, $parent_slug, [ $this->bulkpage, 'plugin_page' ], 'dashicons-images-alt' );
    26         add_submenu_page( $parent_slug, __( 'All Pages', 'sh-bpm-light' ), __( 'Add New Pages', 'sh-bpm-light' ), $capability, $parent_slug, [ $this->bulkpage, 'plugin_page' ] );
     25        add_menu_page( __( 'Bulk Page Maker', 'bpm-light' ), __( 'Bulk Page Maker', 'bpm-light' ), $capability, $parent_slug, [ $this->bulkpage, 'plugin_page' ], 'dashicons-images-alt' );
     26        add_submenu_page( $parent_slug, __( 'All Pages', 'bpm-light' ), __( 'Add New Pages', 'bpm-light' ), $capability, $parent_slug, [ $this->bulkpage, 'plugin_page' ] );
    2727    }
    2828}
  • bulk-page-maker-light/trunk/includes/Admin/Pages_List.php

    r2565100 r3291023  
    8282    function get_sortable_columns() {
    8383        $sortable_columns = [
    84             'post_date'  => [ 'created_at', true ],
     84            'post_date'  => [ 'date', true ],
    8585            'post_type'  => [ 'post_type', true ],
    8686            'post_title' => [ 'post_title', true ]
     
    114114        ];
    115115
    116 
    117116        if ( isset( $_REQUEST['orderby'] ) && isset( $_REQUEST['order'] ) ) {
    118             $allowed_keys = [ 'post_title', 'post_type', 'date', 'asc', 'desc' ];
     117            $allowed_keys = ['orderby', 'order'];
    119118            $orderby      = sanitize_key( $_REQUEST['orderby'] );
    120119            $order        = sanitize_key( $_REQUEST['order'] );
    121120
    122             if( in_array( $orderby, $allowed_keys ) ) {
     121            if( in_array($orderby, $allowed_keys, true) ) {
    123122                $args['orderby'] = $orderby;
    124123            }
    125124
    126             if( in_array( $order, $allowed_keys ) ) {
    127                 $args['order'] = $order;
     125            if( in_array($order, $allowed_keys, true) ) {
     126                $args['order']  = $order;
    128127            }
    129128        }
    130129
    131130        $this->items = bpmaker_get_pages( $args );
    132 
    133131        $this->set_pagination_args( [
    134132            'total_items' => bpmaker_get_pages_count(),
  • bulk-page-maker-light/trunk/includes/Admin/views/bulk-page-list.php

    r2557773 r3291023  
    44    </h1>
    55    <a href="<?php echo esc_url( admin_url('admin.php?page=bulk-page-maker&action=new') ); ?>" class="page-title-action">
    6         <?php _e( 'Add New', 'bulk-page-maker' ); ?>           
     6        <?php _e( 'Add New', 'bulk-page-maker' ); ?>
    77    </a>
    88</ul>
  • bulk-page-maker-light/trunk/includes/Admin/views/bulk-page-new.php

    r2557773 r3291023  
    1 <div class="wrap">
    2   <h1 class="wp-heading-inline"><?php _e( 'New Pages', 'sh-bpm-light' ); ?></h1>
    3   <div class="form-area">
    4     <form id="createForm" method="post" class="">
    5       <table class="form-table">
    6         <tbody>
    7           <tr class="row<?php echo isset($this->errors['map_name']) ? ' form-invalid' : '' ?>">
    8             <th>
    9               <?php _e( 'List of Pages/Posts', 'sh-bpm-light' ); ?><br><?php _e( '(Comma Separated)', 'sh-bpm-light' ); ?> <b>(*)</b>
    10             </th>
    11             <td>
    12               <textarea id="txt_pages_list" name="txt_pages_list" class="regular-text"></textarea>
     1<!-- React App Container -->
     2<div id="bpm-create-new" class="bpm-pr-[20px] bpm-h-100vh">
     3    <noscript>
     4        <strong>
     5            <?php esc_html_e( "We're sorry but this page doesn't work properly without JavaScript. Please enable it to continue.", 'wp-user-frontend' ); ?>
     6        </strong>
     7    </noscript>
    138
    14               <?php if( isset( $this->errors['page_names'] )) { ?>
    15               <br>
    16               <span style="color: #B30000"><?php echo $this->errors['page_names']; ?></span>
    17               <?php } ?>
    18 
    19               <p class="description">
    20                 <?php _e( 'eg. Page1, Page2, page3, PAGE4, PAge5', 'sh-bpm-light' ); ?>
    21               </p>
    22             </td>
    23           </tr>
    24           <tr class="row<?php echo isset($this->errors['page_contents']) ? ' form-invalid' : '' ?>">
    25             <th>
    26               <?php _e( 'Page/Post content', 'sh-bpm-light' ); ?>
    27             </th>
    28             <td>
    29 
    30               <?php if( isset( $this->errors['page_content'] )) { ?>
    31               <br><span style="color: #B30000"><?php echo $this->errors['page_content']; ?></span>
    32 
    33               <?php
    34                 }
    35 
    36                 $pages_content = filter_input( INPUT_POST, 'cmb_page_content', FILTER_SANITIZE_STRING );
    37                 $content       = ( isset( $pages_content ) ? htmlspecialchars_decode( $pages_content ) : '' );
    38                 $settings      = [
    39                   'textarea_name' => 'cmb_page_content',
    40                   'editor_class'  => 'requiredField',
    41                   'textarea_rows' => '6',
    42                   'media_buttons' => true,
    43                   'tinymce'       => true,
    44                 ];
    45                 wp_editor( $content, 'cmb_page_content', $settings );
    46               ?>
    47               <p class="description">
    48 
    49               <?php
    50                 _e( 'eg. It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.', 'sh-bpm-light' );
    51               ?>
    52              
    53               </p>
    54             </td>
    55           </tr>
    56           <tr class="type_tr">
    57             <th>
    58               <?php _e( 'Type', 'sh-bpm-light' ); ?>
    59             </th>
    60             <td>
    61               <select id="cmb_post_type" name="cmb_post_type" class="regular-text">
    62                 <option value="page">Page</option>
    63                 <option value="post">Post</option>
    64               </select>
    65             </td>
    66           </tr>
    67           <tr class="page_status_tr">
    68             <th><?php _e( 'Pages/Posts Status', 'sh-bpm-light' ); ?></th>
    69             <td>
    70               <select id="cmb_page_status" name="cmb_page_status" class="regular-text">
    71                 <option value="publish">Publish</option>
    72                 <option value="pending">Pending</option>
    73                 <option value="draft">Draft</option>
    74               </select>
    75             </td>
    76           </tr>
    77           <tr class="comment_status_tr">
    78             <th>Pages/Posts Comment Status</th>
    79             <td>
    80               <select id="cmb_comment_status" name="cmb_comment_status" class="regular-text">
    81                 <option value="closed">Closed</option>
    82                 <option value="open">Open</option>
    83               </select>
    84             </td>
    85           </tr>
    86           <tr class="parent_page_id_tr" class="regular-text">
    87             <th>Parent Page</th>
    88             <td>
    89 
    90               <?php
    91                 $args = [
    92                   'show_option_none' => 'No Parent',
    93                 ];
    94                 wp_dropdown_pages( $args );
    95               ?>
    96 
    97             </td>
    98           </tr>
    99         </tbody>
    100       </table>
    101 
    102       <?php wp_nonce_field('bpm-nonce'); ?>
    103       <?php submit_button( __('Add Pages', 'sh-bpm-light'), 'primary', 'btn_add_pages' ); ?>
    104 
    105     </form>
    106   </div>
     9    <h2><?php esc_html_e( 'Loading', 'bpm-light' ); ?>...</h2>
    10710</div>
  • bulk-page-maker-light/trunk/includes/Assets.php

    r2557773 r3291023  
    77 *
    88 * @package default
    9  * @author 
     9 * @author
    1010 **/
    1111class Assets {
     
    1515     *
    1616     * @return void
    17      * @author 
     17     * @author
    1818     **/
    1919    public function __construct() {
     
    2525     * @return void
    2626     */
    27     function enqueue_bpm_assets() {
    28         wp_register_script( 'bpm-script', BPM_ASSETS . '/js/bpm-main.js', false, filemtime( BPM_PATH . '/assets/js/bpm-main.js' ), true );
     27    function enqueue_bpm_assets($hook) {
     28        // Only load React scripts on our plugin page
     29        $screen = get_current_screen();
     30        if ( $screen && strpos( $screen->id, 'bulk-page-maker' ) !== false ) {
     31            // Enqueue the compiled React script
     32            if ( file_exists( BPM_PATH . '/build/index.asset.php' ) ) {
     33                $dependencies = require_once BPM_PATH . '/build/index.asset.php';
     34
     35                wp_enqueue_script(
     36                    'bpm-react-app',
     37                    BPM_URL . '/build/index.js',
     38                    $dependencies['dependencies'],
     39                    $dependencies['version'],
     40                    true
     41                );
     42
     43                wp_enqueue_style(
     44                    'bpm-react-styles',
     45                    BPM_URL . '/build/index.css',
     46                    [],
     47                    filemtime( BPM_PATH . '/build/index.css' )
     48                );
     49
     50                // Add data to be available in React
     51                wp_localize_script(
     52                    'bpm-react-app',
     53                    'bpmData',
     54                    [
     55                        'nonce'         => wp_create_nonce( 'wp_rest' ),
     56                        'ajaxUrl'       => admin_url( 'admin-ajax.php' ),
     57                        'restUrl'       => esc_url_raw( rest_url() ),
     58                        'pluginName'    => 'Bulk Page Maker Light',
     59                        'pluginVersion' => BPM_VERSION,
     60                    ]
     61                );
     62            }
     63        }
    2964    }
    3065}
  • bulk-page-maker-light/trunk/includes/functions.php

    r2576225 r3291023  
    88function bpmaker_insert_pages_info( $args = [] ) {
    99    global $wpdb;
     10
     11    $transient_posts = 'bpmaker_all_pages';
     12    $transient_count = 'bpmaker_pages_count';
    1013
    1114    $defaults = [
     
    2932    }
    3033
     34    // delete releated transient
     35    if ( false !== get_transient( $transient_count ) ) {
     36        delete_transient( $transient_count );
     37    }
     38
     39    // delete releated transient
     40    if ( false !== get_transient( $transient_posts ) ) {
     41        delete_transient( $transient_posts );
     42    }
     43
    3144    return $wpdb->insert_id;
    3245}
     
    3952function bpmaker_get_pages( $args = [] ) {
    4053    global $wpdb;
     54    $transient = 'bpmaker_all_pages';
    4155
    4256    $defaults = [
     
    5872    );
    5973
    60     $items = $wpdb->get_results( $sql );
     74    // store pages in a transient
     75    if ( false === ( $items = get_transient( $transient ) ) ) {
     76        $items = $wpdb->get_results( $sql );
     77        set_transient( $transient, $items, MONTH_IN_SECONDS );
     78    }
    6179
    6280    return $items;
     
    6987function bpmaker_get_pages_count() {
    7088    global $wpdb;
     89    $transient = 'bpmaker_pages_count';
    7190
    72     $count = (int) $wpdb->get_var( "SELECT count(id) FROM {$wpdb->prefix}bpm_pages" );
     91    if ( false === ( $count = get_transient( $transient ) ) ) {
     92        $count = (int) $wpdb->get_var( "SELECT count(id) FROM {$wpdb->prefix}bpm_pages" );
     93        set_transient( $transient, $count, MONTH_IN_SECONDS );
     94    }
    7395
    7496    return $count;
     
    95117function bpmaker_delete_page( $post_id ) {
    96118    global $wpdb;
     119    $transient_posts = 'bpmaker_all_pages';
     120    $transient_count = 'bpmaker_pages_count';
     121
     122    // delete releated transient
     123    if ( false !== get_transient( $transient_count ) ) {
     124        delete_transient( $transient_count );
     125    }
     126
     127    // delete releated transient
     128    if ( false !== get_transient( $transient_posts ) ) {
     129        delete_transient( $transient_posts );
     130    }
    97131
    98132    // delete from posts table
  • bulk-page-maker-light/trunk/readme.txt

    r2557773 r3291023  
    22Contributors: sapayth
    33Donate link:
    4 Tags: page, pages, bulk, bulk page, bulk post, page generator, post generator, multiple post generator, multiple page generator
     4Tags: bulk post creation, WordPress page generator, create multiple posts, bulk post generator, post, posts, bulk, post generator, multiple post generator, multiple page generator
    55Requires at least: 5.6
    6 Tested up to: 5.7
    7 Stable tag: 5.1
    8 Requires PHP: 5.6
     6Tested up to: 6.8
     7Stable tag: 2.0.0
     8Requires PHP: 7.4
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
    1111
    12 Bulk Page Maker is a light plugin to make multiple pages or posts on a single click.
     12Bulk Page Maker Light – Instantly create unlimited WordPress pages or posts in one click! Save hours and supercharge your site-building workflow.
    1313
    1414== Description ==
    1515
    16 Bulk Page Maker is a light plugin for WordPress pages and posts creation. You can make a thousands of pages or posts by a single click with Bulk Page maker. Activate and enjoy Bulk Page Maker with:
    17 - Type selection option (Page or Post)
    18 - Status selection option (Publish, Pending, Draft etc.)
    19 - Comment status (Open or Closed)
    20 - Select parent page
     16**Bulk Page Maker Light** is the fastest way to create hundreds or thousands of WordPress pages or posts in seconds. Perfect for agencies, site builders, bloggers, and anyone who needs to generate content at scale. No more repetitive manual work—just enter your titles, choose your options, and let Bulk Page Maker Light do the rest!
     17
     18**Key Features:**
     19- 🚀 **Unlimited bulk page or post creation** – Generate as many pages or posts as you need, instantly.
     20- 📝 **Flexible content types** – Choose between Pages or Posts.
     21- 📅 **Status selection** – Set to Publish, Pending or more.
     22- 💬 **Comment status control** – Open or close comments on creation.
     23- 🏷️ **Parent page selection** – Organize your content with parent/child hierarchy.
     24- ⚡ **Lightning-fast and lightweight** – Minimal impact on your site's performance.
     25- 🛡️ **Safe and secure** – Built to WordPress coding standards for maximum compatibility.
     26
     27**Why Choose Bulk Page Maker Light?**
     28- Save hours of manual work
     29- Perfect for launching new sites, SEO projects, or content migrations
     30- No coding required – simple, intuitive interface
     31
     32**Get started in seconds and experience the easiest way to bulk create WordPress pages or posts!**
    2133
    2234== Installation ==
     
    2436= Minimum Requirements =
    2537
    26 * PHP 7.0 or higher is recommended
    27 * MySQL 5.1 or higher is recommended
     38* PHP 7.4 or higher
     39* MySQL 5.1 or higher
    2840
    2941= Automatic installation =
    3042
    31 Automatic installation is the easiest option -- WordPress will handles the file transfer, and you won’t need to leave your web browser. To do an automatic install of Bulk Page Maker, log in to your WordPress dashboard, navigate to the Plugins menu, and click “Add New.”
    32  
    33 In the search field type “Bulk Page Maker”, then click “Search Plugins.” Once you’ve the plugin, you can install it by Clicking “Install Now” and WordPress will take it from there.
     431. Log in to your WordPress dashboard.
     442. Go to Plugins > Add New.
     453. Search for "Bulk Page Maker Light".
     464. Click "Install Now" and then "Activate".
    3447
    3548= Manual installation =
    3649
    37 Manual installation method requires downloading the Bulk Page Maker plugin and uploading it to your web server via your favorite FTP application. The WordPress codex contains [instructions on how to do this here](https://wordpress.org/support/article/managing-plugins/#manual-plugin-installation).
     501. Download the Bulk Page Maker Light plugin.
     512. Upload the plugin folder to your `/wp-content/plugins/` directory via FTP.
     523. Activate the plugin through the Plugins menu in WordPress.
    3853
    3954= Updating =
    4055
    41 Automatic updates should work smoothly, I still recommend you back up your site.
     56Automatic updates are supported. Always back up your site before updating.
     57
     58== Frequently Asked Questions ==
     59
     60= Is there a limit to how many pages or posts I can create? =
     61No! You can create as many as you need, limited only by your server resources.
     62
     63= Does this plugin work with custom post types? =
     64Currently, Bulk Page Maker Light supports Pages and Posts. Support for custom post types is coming soon!
     65
     66= Will this slow down my website? =
     67No, Bulk Page Maker Light is optimized for performance and built to WordPress standards.
    4268
    4369== Screenshots ==
    4470
    45 1. Light and User Friendly UI screenshot-1.jpg
    46 2. Post Type screenshot-2.jpg
    47 3. Page/Post status screenshot-3.jpg
    48 4. Page/Post commengitn status screenshot-4.jpg
     711. Instantly add pages or posts in bulk – screenshot-1.png
     722. Flexible options for custom content – screenshot-2.png
    4973
     74== Changelog ==
     75
     76= 2.0.0 =
     77* Revamped public release.
     78
     79== Upgrade Notice ==
     80
     81= 2.0.0 =
     82First release of Bulk Page Maker Light. Enjoy bulk page and post creation!
  • bulk-page-maker-light/trunk/vendor/autoload.php

    r2279238 r3291023  
    33// autoload.php @generated by Composer
    44
     5if (PHP_VERSION_ID < 50600) {
     6    if (!headers_sent()) {
     7        header('HTTP/1.1 500 Internal Server Error');
     8    }
     9    $err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
     10    if (!ini_get('display_errors')) {
     11        if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
     12            fwrite(STDERR, $err);
     13        } elseif (!headers_sent()) {
     14            echo $err;
     15        }
     16    }
     17    trigger_error(
     18        $err,
     19        E_USER_ERROR
     20    );
     21}
     22
    523require_once __DIR__ . '/composer/autoload_real.php';
    624
    7 return ComposerAutoloaderInit399471fa877346621c4fe8120f0b7096::getLoader();
     25return ComposerAutoloaderInitbdf5c980198440bb0bcef7a745b454de::getLoader();
  • bulk-page-maker-light/trunk/vendor/composer/ClassLoader.php

    r2279238 r3291023  
    3838 * @author Fabien Potencier <[email protected]>
    3939 * @author Jordi Boggiano <[email protected]>
    40  * @see    http://www.php-fig.org/psr/psr-0/
    41  * @see    http://www.php-fig.org/psr/psr-4/
     40 * @see    https://www.php-fig.org/psr/psr-0/
     41 * @see    https://www.php-fig.org/psr/psr-4/
    4242 */
    4343class ClassLoader
    4444{
     45    /** @var \Closure(string):void */
     46    private static $includeFile;
     47
     48    /** @var string|null */
     49    private $vendorDir;
     50
    4551    // PSR-4
     52    /**
     53     * @var array<string, array<string, int>>
     54     */
    4655    private $prefixLengthsPsr4 = array();
     56    /**
     57     * @var array<string, list<string>>
     58     */
    4759    private $prefixDirsPsr4 = array();
     60    /**
     61     * @var list<string>
     62     */
    4863    private $fallbackDirsPsr4 = array();
    4964
    5065    // PSR-0
     66    /**
     67     * List of PSR-0 prefixes
     68     *
     69     * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2')))
     70     *
     71     * @var array<string, array<string, list<string>>>
     72     */
    5173    private $prefixesPsr0 = array();
     74    /**
     75     * @var list<string>
     76     */
    5277    private $fallbackDirsPsr0 = array();
    5378
     79    /** @var bool */
    5480    private $useIncludePath = false;
     81
     82    /**
     83     * @var array<string, string>
     84     */
    5585    private $classMap = array();
     86
     87    /** @var bool */
    5688    private $classMapAuthoritative = false;
     89
     90    /**
     91     * @var array<string, bool>
     92     */
    5793    private $missingClasses = array();
     94
     95    /** @var string|null */
    5896    private $apcuPrefix;
    5997
     98    /**
     99     * @var array<string, self>
     100     */
     101    private static $registeredLoaders = array();
     102
     103    /**
     104     * @param string|null $vendorDir
     105     */
     106    public function __construct($vendorDir = null)
     107    {
     108        $this->vendorDir = $vendorDir;
     109        self::initializeIncludeClosure();
     110    }
     111
     112    /**
     113     * @return array<string, list<string>>
     114     */
    60115    public function getPrefixes()
    61116    {
    62117        if (!empty($this->prefixesPsr0)) {
    63             return call_user_func_array('array_merge', $this->prefixesPsr0);
     118            return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
    64119        }
    65120
     
    67122    }
    68123
     124    /**
     125     * @return array<string, list<string>>
     126     */
    69127    public function getPrefixesPsr4()
    70128    {
     
    72130    }
    73131
     132    /**
     133     * @return list<string>
     134     */
    74135    public function getFallbackDirs()
    75136    {
     
    77138    }
    78139
     140    /**
     141     * @return list<string>
     142     */
    79143    public function getFallbackDirsPsr4()
    80144    {
     
    82146    }
    83147
     148    /**
     149     * @return array<string, string> Array of classname => path
     150     */
    84151    public function getClassMap()
    85152    {
     
    88155
    89156    /**
    90      * @param array $classMap Class to filename map
     157     * @param array<string, string> $classMap Class to filename map
     158     *
     159     * @return void
    91160     */
    92161    public function addClassMap(array $classMap)
     
    103172     * appending or prepending to the ones previously set for this prefix.
    104173     *
    105      * @param string       $prefix  The prefix
    106      * @param array|string $paths   The PSR-0 root directories
    107      * @param bool         $prepend Whether to prepend the directories
     174     * @param string              $prefix  The prefix
     175     * @param list<string>|string $paths   The PSR-0 root directories
     176     * @param bool                $prepend Whether to prepend the directories
     177     *
     178     * @return void
    108179     */
    109180    public function add($prefix, $paths, $prepend = false)
    110181    {
     182        $paths = (array) $paths;
    111183        if (!$prefix) {
    112184            if ($prepend) {
    113185                $this->fallbackDirsPsr0 = array_merge(
    114                     (array) $paths,
     186                    $paths,
    115187                    $this->fallbackDirsPsr0
    116188                );
     
    118190                $this->fallbackDirsPsr0 = array_merge(
    119191                    $this->fallbackDirsPsr0,
    120                     (array) $paths
     192                    $paths
    121193                );
    122194            }
     
    127199        $first = $prefix[0];
    128200        if (!isset($this->prefixesPsr0[$first][$prefix])) {
    129             $this->prefixesPsr0[$first][$prefix] = (array) $paths;
     201            $this->prefixesPsr0[$first][$prefix] = $paths;
    130202
    131203            return;
     
    133205        if ($prepend) {
    134206            $this->prefixesPsr0[$first][$prefix] = array_merge(
    135                 (array) $paths,
     207                $paths,
    136208                $this->prefixesPsr0[$first][$prefix]
    137209            );
     
    139211            $this->prefixesPsr0[$first][$prefix] = array_merge(
    140212                $this->prefixesPsr0[$first][$prefix],
    141                 (array) $paths
     213                $paths
    142214            );
    143215        }
     
    148220     * appending or prepending to the ones previously set for this namespace.
    149221     *
    150      * @param string       $prefix  The prefix/namespace, with trailing '\\'
    151      * @param array|string $paths   The PSR-4 base directories
    152      * @param bool         $prepend Whether to prepend the directories
     222     * @param string              $prefix  The prefix/namespace, with trailing '\\'
     223     * @param list<string>|string $paths   The PSR-4 base directories
     224     * @param bool                $prepend Whether to prepend the directories
    153225     *
    154226     * @throws \InvalidArgumentException
     227     *
     228     * @return void
    155229     */
    156230    public function addPsr4($prefix, $paths, $prepend = false)
    157231    {
     232        $paths = (array) $paths;
    158233        if (!$prefix) {
    159234            // Register directories for the root namespace.
    160235            if ($prepend) {
    161236                $this->fallbackDirsPsr4 = array_merge(
    162                     (array) $paths,
     237                    $paths,
    163238                    $this->fallbackDirsPsr4
    164239                );
     
    166241                $this->fallbackDirsPsr4 = array_merge(
    167242                    $this->fallbackDirsPsr4,
    168                     (array) $paths
     243                    $paths
    169244                );
    170245            }
     
    176251            }
    177252            $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
    178             $this->prefixDirsPsr4[$prefix] = (array) $paths;
     253            $this->prefixDirsPsr4[$prefix] = $paths;
    179254        } elseif ($prepend) {
    180255            // Prepend directories for an already registered namespace.
    181256            $this->prefixDirsPsr4[$prefix] = array_merge(
    182                 (array) $paths,
     257                $paths,
    183258                $this->prefixDirsPsr4[$prefix]
    184259            );
     
    187262            $this->prefixDirsPsr4[$prefix] = array_merge(
    188263                $this->prefixDirsPsr4[$prefix],
    189                 (array) $paths
     264                $paths
    190265            );
    191266        }
     
    196271     * replacing any others previously set for this prefix.
    197272     *
    198      * @param string       $prefix The prefix
    199      * @param array|string $paths  The PSR-0 base directories
     273     * @param string              $prefix The prefix
     274     * @param list<string>|string $paths  The PSR-0 base directories
     275     *
     276     * @return void
    200277     */
    201278    public function set($prefix, $paths)
     
    212289     * replacing any others previously set for this namespace.
    213290     *
    214      * @param string       $prefix The prefix/namespace, with trailing '\\'
    215      * @param array|string $paths  The PSR-4 base directories
     291     * @param string              $prefix The prefix/namespace, with trailing '\\'
     292     * @param list<string>|string $paths  The PSR-4 base directories
    216293     *
    217294     * @throws \InvalidArgumentException
     295     *
     296     * @return void
    218297     */
    219298    public function setPsr4($prefix, $paths)
     
    235314     *
    236315     * @param bool $useIncludePath
     316     *
     317     * @return void
    237318     */
    238319    public function setUseIncludePath($useIncludePath)
     
    257338     *
    258339     * @param bool $classMapAuthoritative
     340     *
     341     * @return void
    259342     */
    260343    public function setClassMapAuthoritative($classMapAuthoritative)
     
    277360     *
    278361     * @param string|null $apcuPrefix
     362     *
     363     * @return void
    279364     */
    280365    public function setApcuPrefix($apcuPrefix)
     
    297382     *
    298383     * @param bool $prepend Whether to prepend the autoloader or not
     384     *
     385     * @return void
    299386     */
    300387    public function register($prepend = false)
    301388    {
    302389        spl_autoload_register(array($this, 'loadClass'), true, $prepend);
     390
     391        if (null === $this->vendorDir) {
     392            return;
     393        }
     394
     395        if ($prepend) {
     396            self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
     397        } else {
     398            unset(self::$registeredLoaders[$this->vendorDir]);
     399            self::$registeredLoaders[$this->vendorDir] = $this;
     400        }
    303401    }
    304402
    305403    /**
    306404     * Unregisters this instance as an autoloader.
     405     *
     406     * @return void
    307407     */
    308408    public function unregister()
    309409    {
    310410        spl_autoload_unregister(array($this, 'loadClass'));
     411
     412        if (null !== $this->vendorDir) {
     413            unset(self::$registeredLoaders[$this->vendorDir]);
     414        }
    311415    }
    312416
     
    315419     *
    316420     * @param  string    $class The name of the class
    317      * @return bool|null True if loaded, null otherwise
     421     * @return true|null True if loaded, null otherwise
    318422     */
    319423    public function loadClass($class)
    320424    {
    321425        if ($file = $this->findFile($class)) {
    322             includeFile($file);
     426            $includeFile = self::$includeFile;
     427            $includeFile($file);
    323428
    324429            return true;
    325430        }
     431
     432        return null;
    326433    }
    327434
     
    368475    }
    369476
     477    /**
     478     * Returns the currently registered loaders keyed by their corresponding vendor directories.
     479     *
     480     * @return array<string, self>
     481     */
     482    public static function getRegisteredLoaders()
     483    {
     484        return self::$registeredLoaders;
     485    }
     486
     487    /**
     488     * @param  string       $class
     489     * @param  string       $ext
     490     * @return string|false
     491     */
    370492    private function findFileWithExtension($class, $ext)
    371493    {
     
    433555        return false;
    434556    }
     557
     558    /**
     559     * @return void
     560     */
     561    private static function initializeIncludeClosure()
     562    {
     563        if (self::$includeFile !== null) {
     564            return;
     565        }
     566
     567        /**
     568         * Scope isolated include.
     569         *
     570         * Prevents access to $this/self from included files.
     571         *
     572         * @param  string $file
     573         * @return void
     574         */
     575        self::$includeFile = \Closure::bind(static function($file) {
     576            include $file;
     577        }, null, null);
     578    }
    435579}
    436 
    437 /**
    438  * Scope isolated include.
    439  *
    440  * Prevents access to $this/self from included files.
    441  */
    442 function includeFile($file)
    443 {
    444     include $file;
    445 }
  • bulk-page-maker-light/trunk/vendor/composer/autoload_classmap.php

    r2279238 r3291023  
    33// autoload_classmap.php @generated by Composer
    44
    5 $vendorDir = dirname(dirname(__FILE__));
     5$vendorDir = dirname(__DIR__);
    66$baseDir = dirname($vendorDir);
    77
    88return array(
     9    'Bulk\\Page\\Maker\\Admin' => $baseDir . '/includes/Admin.php',
     10    'Bulk\\Page\\Maker\\Admin\\Bulk_Page' => $baseDir . '/includes/Admin/Bulk_Page.php',
     11    'Bulk\\Page\\Maker\\Admin\\Menu' => $baseDir . '/includes/Admin/Menu.php',
     12    'Bulk\\Page\\Maker\\Admin\\Pages_List' => $baseDir . '/includes/Admin/Pages_List.php',
     13    'Bulk\\Page\\Maker\\Assets' => $baseDir . '/includes/Assets.php',
     14    'Bulk\\Page\\Maker\\Installer' => $baseDir . '/includes/Installer.php',
     15    'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
    916);
  • bulk-page-maker-light/trunk/vendor/composer/autoload_files.php

    r2279238 r3291023  
    33// autoload_files.php @generated by Composer
    44
    5 $vendorDir = dirname(dirname(__FILE__));
     5$vendorDir = dirname(__DIR__);
    66$baseDir = dirname($vendorDir);
    77
  • bulk-page-maker-light/trunk/vendor/composer/autoload_namespaces.php

    r2279238 r3291023  
    33// autoload_namespaces.php @generated by Composer
    44
    5 $vendorDir = dirname(dirname(__FILE__));
     5$vendorDir = dirname(__DIR__);
    66$baseDir = dirname($vendorDir);
    77
  • bulk-page-maker-light/trunk/vendor/composer/autoload_psr4.php

    r2279238 r3291023  
    33// autoload_psr4.php @generated by Composer
    44
    5 $vendorDir = dirname(dirname(__FILE__));
     5$vendorDir = dirname(__DIR__);
    66$baseDir = dirname($vendorDir);
    77
  • bulk-page-maker-light/trunk/vendor/composer/autoload_real.php

    r2279238 r3291023  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInit399471fa877346621c4fe8120f0b7096
     5class ComposerAutoloaderInitbdf5c980198440bb0bcef7a745b454de
    66{
    77    private static $loader;
     
    2323        }
    2424
    25         spl_autoload_register(array('ComposerAutoloaderInit399471fa877346621c4fe8120f0b7096', 'loadClassLoader'), true, true);
    26         self::$loader = $loader = new \Composer\Autoload\ClassLoader();
    27         spl_autoload_unregister(array('ComposerAutoloaderInit399471fa877346621c4fe8120f0b7096', 'loadClassLoader'));
     25        spl_autoload_register(array('ComposerAutoloaderInitbdf5c980198440bb0bcef7a745b454de', 'loadClassLoader'), true, true);
     26        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
     27        spl_autoload_unregister(array('ComposerAutoloaderInitbdf5c980198440bb0bcef7a745b454de', 'loadClassLoader'));
    2828
    29         $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
    30         if ($useStaticLoader) {
    31             require_once __DIR__ . '/autoload_static.php';
    32 
    33             call_user_func(\Composer\Autoload\ComposerStaticInit399471fa877346621c4fe8120f0b7096::getInitializer($loader));
    34         } else {
    35             $map = require __DIR__ . '/autoload_namespaces.php';
    36             foreach ($map as $namespace => $path) {
    37                 $loader->set($namespace, $path);
    38             }
    39 
    40             $map = require __DIR__ . '/autoload_psr4.php';
    41             foreach ($map as $namespace => $path) {
    42                 $loader->setPsr4($namespace, $path);
    43             }
    44 
    45             $classMap = require __DIR__ . '/autoload_classmap.php';
    46             if ($classMap) {
    47                 $loader->addClassMap($classMap);
    48             }
    49         }
     29        require __DIR__ . '/autoload_static.php';
     30        call_user_func(\Composer\Autoload\ComposerStaticInitbdf5c980198440bb0bcef7a745b454de::getInitializer($loader));
    5031
    5132        $loader->register(true);
    5233
    53         if ($useStaticLoader) {
    54             $includeFiles = Composer\Autoload\ComposerStaticInit399471fa877346621c4fe8120f0b7096::$files;
    55         } else {
    56             $includeFiles = require __DIR__ . '/autoload_files.php';
    57         }
    58         foreach ($includeFiles as $fileIdentifier => $file) {
    59             composerRequire399471fa877346621c4fe8120f0b7096($fileIdentifier, $file);
     34        $filesToLoad = \Composer\Autoload\ComposerStaticInitbdf5c980198440bb0bcef7a745b454de::$files;
     35        $requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
     36            if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
     37                $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
     38
     39                require $file;
     40            }
     41        }, null, null);
     42        foreach ($filesToLoad as $fileIdentifier => $file) {
     43            $requireFile($fileIdentifier, $file);
    6044        }
    6145
     
    6347    }
    6448}
    65 
    66 function composerRequire399471fa877346621c4fe8120f0b7096($fileIdentifier, $file)
    67 {
    68     if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
    69         require $file;
    70 
    71         $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
    72     }
    73 }
  • bulk-page-maker-light/trunk/vendor/composer/autoload_static.php

    r2279238 r3291023  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInit399471fa877346621c4fe8120f0b7096
     7class ComposerStaticInitbdf5c980198440bb0bcef7a745b454de
    88{
    99    public static $files = array (
     
    2525    );
    2626
     27    public static $classMap = array (
     28        'Bulk\\Page\\Maker\\Admin' => __DIR__ . '/../..' . '/includes/Admin.php',
     29        'Bulk\\Page\\Maker\\Admin\\Bulk_Page' => __DIR__ . '/../..' . '/includes/Admin/Bulk_Page.php',
     30        'Bulk\\Page\\Maker\\Admin\\Menu' => __DIR__ . '/../..' . '/includes/Admin/Menu.php',
     31        'Bulk\\Page\\Maker\\Admin\\Pages_List' => __DIR__ . '/../..' . '/includes/Admin/Pages_List.php',
     32        'Bulk\\Page\\Maker\\Assets' => __DIR__ . '/../..' . '/includes/Assets.php',
     33        'Bulk\\Page\\Maker\\Installer' => __DIR__ . '/../..' . '/includes/Installer.php',
     34        'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
     35    );
     36
    2737    public static function getInitializer(ClassLoader $loader)
    2838    {
    2939        return \Closure::bind(function () use ($loader) {
    30             $loader->prefixLengthsPsr4 = ComposerStaticInit399471fa877346621c4fe8120f0b7096::$prefixLengthsPsr4;
    31             $loader->prefixDirsPsr4 = ComposerStaticInit399471fa877346621c4fe8120f0b7096::$prefixDirsPsr4;
     40            $loader->prefixLengthsPsr4 = ComposerStaticInitbdf5c980198440bb0bcef7a745b454de::$prefixLengthsPsr4;
     41            $loader->prefixDirsPsr4 = ComposerStaticInitbdf5c980198440bb0bcef7a745b454de::$prefixDirsPsr4;
     42            $loader->classMap = ComposerStaticInitbdf5c980198440bb0bcef7a745b454de::$classMap;
    3243
    3344        }, null, ClassLoader::class);
  • bulk-page-maker-light/trunk/vendor/composer/installed.json

    r2279238 r3291023  
    1 []
     1{
     2    "packages": [],
     3    "dev": true,
     4    "dev-package-names": []
     5}
Note: See TracChangeset for help on using the changeset viewer.