Plugin Directory

Changeset 3078598


Ignore:
Timestamp:
04/29/2024 10:48:45 AM (2 years ago)
Author:
opcodespace
Message:

Bulk Export Split

Location:
simple-export-import-for-acf-data/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • simple-export-import-for-acf-data/trunk/app.php

    r3049001 r3078598  
    55Plugin URI: https://www.opcodespace.com
    66Author: Opcodespace <mehedee@opcodespace.com>
    7 Version: 1.3.16
     7Version: 1.3.17
    88Text Domain: simple-export-import-for-acf-data
    99*/
     
    1313define("SEIP_VIEW_PATH", wp_normalize_path(plugin_dir_path(__FILE__) . "view/"));
    1414define("SEIP_ASSETSURL", plugins_url("assets/", __FILE__));
    15 define('SEIP_PLUGIN_VERSION', '1.3.16');
     15define('SEIP_PLUGIN_VERSION', '1.3.17');
    1616define('PAID_TEXT', '<small class="paid_text">(This is for paid user)</small>');
    1717
  • simple-export-import-for-acf-data/trunk/readme.txt

    r3049001 r3078598  
    33Tags: Export, Import, Page, Post, Custom Post Type, Advanced custom field, Field Value
    44Requires at least: 5.4.0
    5 Tested up to: 6.4.1
     5Tested up to: 6.5.2
    66Requires PHP: 7.0
    7 Stable tag: 1.3.16
     7Stable tag: 1.3.17
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    9696
    9797== Changelog ==
    98 = 1.3.15 (March 11, 2024) =
     98= 1.3.17 (April 23, 2024) =
     99* Enhancement: Splitting Bulk Export
     100
     101= 1.3.16 (March 11, 2024) =
    99102* Bug Fixed: Image/File field type error
    100103
  • simple-export-import-for-acf-data/trunk/src/SeipExport.php

    r2972362 r3078598  
    3737
    3838                $post_ids = isset($_POST['post_ids']) ? explode(',', $_POST['post_ids']) : false;
     39
     40
    3941
    4042                if(empty($post_ids)){
  • simple-export-import-for-acf-data/trunk/src/SeipFront.php

    r2970520 r3078598  
    7474            $taxonomy = sanitize_text_field($_POST['taxonomy']);
    7575            $terms = (array)($_POST['terms']);
     76            $from = isset($_POST['from']) ? (int) $_POST['from'] : 0;
     77            $to = isset($_POST['to']) ? (int) $_POST['to'] : 0;
     78
     79            $posts_per_page = -1;
     80
     81            if($from > 0 && $to > 0){
     82                $posts_per_page = $to - $from + 1;
     83            }
    7684
    7785            $args = [
    7886                'post_type' => $post_type,
    79                 'numberposts' => - 1
     87                'posts_per_page' => $posts_per_page
    8088            ];
     89
     90            if($from > 0 && $to > 0){
     91                $args['offset'] = $from - 1;
     92            }
    8193
    8294            if(!empty($terms) && !empty($taxonomy)){
     
    105117            foreach($posts as $post){
    106118                $sorted_posts[] = [
    107                   'ID' => (int)$post->ID,
     119                  'ID' => $post->ID,
    108120                  'post_name' => esc_attr($post->post_name)
    109121                ];
  • simple-export-import-for-acf-data/trunk/view/_export.php

    r2965633 r3078598  
    6969                                </td>
    7070                            </tr>
     71                            <tr  class="bulk_export_visible">
     72                                <td colspan="2"><label class="label_block">If you have large number of posts and images, you should split post to get rid of time out issue.</label></td>
     73                            </tr>
     74                            <tr class="bulk_export_visible">
     75                                <td>
     76                                    <label class="label_block">Split Post</label>
     77                                </td>
     78                                <td>
     79                                    <input type="number" name="split_post_from" id="split_post_from" placeholder="From"><br><br>
     80                                    <input type="number" name="split_post_to" id="split_post_to" placeholder="To">
     81                                </td>
     82                            </tr>
    7183                            <tr class="bulk_export_visible">
    7284                                <td>
     
    8092                                </td>
    8193                            </tr>
     94
    8295
    8396                        </table>
  • simple-export-import-for-acf-data/trunk/view/export_import.php

    r2972381 r3078598  
    174174                    terms: $('#seip_terms').val() || '',
    175175                    taxonomy: $('#seip_taxonomies').val() || '',
     176                    from: $('#split_post_from').val() || '',
     177                    to: $('#split_post_to').val() || '',
    176178                    _wpnonce: $('#seip_export_import_nonce').val()
    177179                }
     
    270272            seip_get_all_posts($(this));
    271273        })
     274
     275        $('[name="split_post_from"]').change(function () {
     276            seip_get_all_posts($(this));
     277        })
     278
     279        $('[name="split_post_to"]').change(function () {
     280            seip_get_all_posts($(this));
     281        })
    272282    })
    273283</script>
Note: See TracChangeset for help on using the changeset viewer.