Plugin Directory

Changeset 3123473


Ignore:
Timestamp:
07/23/2024 02:39:54 AM (20 months ago)
Author:
n7studios
Message:

Update to version 1.7.3 from GitHub

Location:
page-generator
Files:
2 added
12 edited
1 copied

Legend:

Unmodified
Added
Removed
  • page-generator/tags/1.7.3/_modules/dashboard/js/min/tinymce-modal-min.js

    r2947190 r3123473  
    1 if(jQuery(document).ready((function($){$("body").on("click","#wpzinc-tinymce-modal div.mce-cancel button, .wpzinc-backbone-modal .media-frame-toolbar .media-toolbar button.cancel",(function(t){"undefined"==typeof tinyMCE||!tinyMCE.activeEditor||tinyMCE.activeEditor.isHidden()?(wpZincModal.close(),void 0!==wpZincModal&&wpZincModal.content(new wpZincModalContent)):tinymce.activeEditor.windowManager.close()})),$("body").on("click","#wpzinc-tinymce-modal div.mce-insert button, .wpzinc-backbone-modal .media-frame-toolbar .media-toolbar button.insert",(function(t){t.preventDefault();var e=$("form.wpzinc-tinymce-popup"),n="["+$('input[name="shortcode"]',$(e)).val(),i="1"==$('input[name="close_shortcode"]',$(e)).val();switch($("input, select, textarea",$(e)).each((function(t){if(void 0===$(this).data("shortcode"))return!0;if(!$(this).val())return!0;if(0==$(this).val().length)return!0;var e=$(this).data("shortcode"),i="0"!=$(this).data("trim"),o=$(this).val();if(!e.length)return!0;e.search("}")>-1&&e.search("{")>-1&&(e=e.replace(/{|}/gi,(function(t){return""})),e=$(e,$(this).parent().parent()).val()),void 0!==$(this).data("shortcode-prepend")&&(e=$(this).data("shortcode-prepend")+e),Array.isArray(o)&&(o=o.join(",")),i&&(o=o.trim()),n+=" "+e.trim()+'="'+o+'"'})),n+="]",i&&(n+="[/"+$('input[name="shortcode"]',$(e)).val()+"]"),$('input[name="editor_type"]',$(e)).val()){case"tinymce":"undefined"!=typeof tinyMCE&&tinyMCE.activeEditor&&!tinyMCE.activeEditor.isHidden()&&(tinyMCE.activeEditor.execCommand("mceReplaceContent",!1,n),tinyMCE.activeEditor.windowManager.close());break;case"quicktags":QTags.insertContent(n),wpZincModal.close(),void 0!==wpZincModal&&wpZincModal.content(new wpZincModalContent);break}}))})),"undefined"!=typeof wp&&void 0!==wp.media){var wpZincModal=new wp.media.view.Modal({controller:{trigger:function(){}},className:"wpzinc-backbone-modal"}),wpZincModalContent=wp.Backbone.View.extend({template:wp.template("wpzinc-modal")});wpZincModal.content(new wpZincModalContent)}
     1if(jQuery(document).ready((function($){$("body").on("click","#wpzinc-tinymce-modal div.mce-cancel button, .wpzinc-backbone-modal .media-frame-toolbar .media-toolbar button.cancel",(function(e){"undefined"==typeof tinyMCE||!tinyMCE.activeEditor||tinyMCE.activeEditor.isHidden()?(wpZincModal.close(),void 0!==wpZincModal&&wpZincModal.content(new wpZincModalContent)):tinymce.activeEditor.windowManager.close()})),$("body").on("click","#wpzinc-tinymce-modal div.mce-insert button, .wpzinc-backbone-modal .media-frame-toolbar .media-toolbar button.insert",(function(e){e.preventDefault();var t=$("form.wpzinc-tinymce-popup"),n="["+$('input[name="shortcode"]',$(t)).val(),i="1"==$('input[name="close_shortcode"]',$(t)).val();$("input, select, textarea",$(t)).each((function(e){if(void 0===$(this).data("shortcode"))return!0;if(!$(this).val())return!0;if(0==$(this).val().length)return!0;var t=$(this).data("shortcode"),i="0"!=$(this).data("trim"),o=$(this).val();if(!t.length)return!0;t.search("}")>-1&&t.search("{")>-1&&(t=t.replace(/{|}/gi,(function(e){return""})),t=$(t,$(this).parent().parent()).val()),void 0!==$(this).data("shortcode-prepend")&&(t=$(this).data("shortcode-prepend")+t),Array.isArray(o)&&(o=o.join(",")),i&&(o=o.trim()),n+=" "+t.trim()+'="'+o+'"'})),n+="]",i&&(n+="[/"+$('input[name="shortcode"]',$(t)).val()+"]");let o=$('input[name="editor_type"]',$(t)).val();switch(o){case"tinymce":"undefined"!=typeof tinyMCE&&tinyMCE.activeEditor&&!tinyMCE.activeEditor.isHidden()&&(tinyMCE.activeEditor.execCommand("mceReplaceContent",!1,n),tinyMCE.activeEditor.windowManager.close());break;case"quicktags":QTags.insertContent(n),wpZincModal.close(),void 0!==wpZincModal&&wpZincModal.content(new wpZincModalContent);break;default:$(o).val(n),wpZincModal.close(),void 0!==wpZincModal&&wpZincModal.content(new wpZincModalContent);break}}))})),"undefined"!=typeof wp&&void 0!==wp.media){var wpZincModal=new wp.media.view.Modal({controller:{trigger:function(){}},className:"wpzinc-backbone-modal"}),wpZincModalContent=wp.Backbone.View.extend({template:wp.template("wpzinc-modal")});wpZincModal.content(new wpZincModalContent)}
  • page-generator/tags/1.7.3/_modules/dashboard/js/tinymce-modal.js

    r2957435 r3123473  
    128128
    129129                // Depending on the editor type, insert the shortcode.
    130                 switch ( $( 'input[name="editor_type"]', $( form ) ).val() ) {
     130                let editor_type = $( 'input[name="editor_type"]', $( form ) ).val();
     131                switch ( editor_type ) {
    131132                    case 'tinymce':
    132133                        // Sanity check that a Visual editor exists and is active.
     
    143144                        // Insert into editor.
    144145                        QTags.insertContent( shortcode );
     146
     147                        // Close modal.
     148                        wpZincModal.close();
     149
     150                        // Reset the modal content.
     151                        // If we don't do this, switching from Text to Visual Editor for the same shortcode results
     152                        // code picking up data from the QuickTags modal, not the TinyMCE one.
     153                        if ( typeof wpZincModal !== 'undefined' ) {
     154                            wpZincModal.content( new wpZincModalContent() );
     155                        }
     156                        break;
     157
     158                    default:
     159                        // Insert into selector.
     160                        $( editor_type ).val( shortcode );
    145161
    146162                        // Close modal.
  • page-generator/tags/1.7.3/includes/admin/generate.php

    r2957435 r3123473  
    344344        // Rotate Author.
    345345        if ( isset( $settings['rotateAuthors'] ) ) {
    346             $authors    = $this->base->get_class( 'common' )->get_authors();
    347             $user_index = wp_rand( 0, ( count( $authors ) - 1 ) );
     346            $author_ids = $this->base->get_class( 'common' )->get_all_user_ids();
     347            $user_index = wp_rand( 0, ( count( $author_ids ) - 1 ) );
    348348        }
    349349
     
    390390            'post_content'   => $settings['content'],
    391391            'post_status'    => ( $test_mode ? 'draft' : $settings['status'] ),
    392             'post_author'    => ( ( isset( $settings['rotateAuthors'] ) && $settings['rotateAuthors'] == 1 ) ? $authors[ $user_index ]->ID : $settings['author'] ), // phpcs:ignore Universal.Operators.StrictComparisons.LooseEqual
     392            'post_author'    => ( ( isset( $settings['rotateAuthors'] ) && $settings['rotateAuthors'] == 1 && isset( $author_ids ) && isset( $user_index ) ) ? $author_ids[ $user_index ] : $settings['author'] ), // phpcs:ignore Universal.Operators.StrictComparisons.LooseEqual
    393393            'comment_status' => ( ( isset( $settings['comments'] ) && $settings['comments'] == 1 ) ? 'open' : 'closed' ), // phpcs:ignore Universal.Operators.StrictComparisons.LooseEqual
    394394            'ping_status'    => ( ( isset( $settings['trackbacks'] ) && $settings['trackbacks'] == 1 ) ? 'open' : 'closed' ), // phpcs:ignore Universal.Operators.StrictComparisons.LooseEqual
  • page-generator/tags/1.7.3/includes/global/common.php

    r2957435 r3123473  
    6868
    6969    /**
    70      * Helper method to retrieve authors
    71      *
    72      * @since   1.1.3
     70     * Helper method to return all WordPress User IDs.
     71     *
     72     * @since   4.6.6
    7373     *
    7474     * @return  array   Authors
    7575     */
    76     public function get_authors() {
    77 
    78         // Get authors.
    79         $authors = get_users(
     76    public function get_all_user_ids() {
     77
     78        // Get all user IDs.
     79        $user_ids = get_users(
    8080            array(
    81                 'orderby' => 'nicename',
     81                'fields'  => 'ID',
     82                'orderby' => 'ID',
    8283            )
    8384        );
    8485
    8586        /**
    86          * Defines available authors for the Author dropdown on the Generate Content screen.
    87          *
    88          * @since   1.1.3
    89          *
    90          * @param   array   $authors    Authors.
    91          */
    92         $authors = apply_filters( 'page_generator_pro_common_get_authors', $authors );
    93 
    94         // Return filtered results.
    95         return $authors;
     87         * Defines available user IDs.
     88         *
     89         * @since   4.6.6
     90         *
     91         * @param   array   $user_ids    User IDs.
     92         */
     93        $user_ids = apply_filters( 'page_generator_pro_common_get_all_user_ids', $user_ids );
     94
     95        // Return filtered results.
     96        return $user_ids;
    9697
    9798    }
  • page-generator/tags/1.7.3/page-generator.php

    r2984434 r3123473  
    88 * Plugin Name: Page Generator
    99 * Plugin URI: http://www.wpzinc.com/plugins/page-generator-pro
    10  * Version: 1.7.2
     10 * Version: 1.7.3
    1111 * Author: WP Zinc
    1212 * Author URI: http://www.wpzinc.com
     
    2525
    2626// Define Plugin version and build date.
    27 define( 'PAGE_GENERATOR_PLUGIN_VERSION', '1.7.2' );
    28 define( 'PAGE_GENERATOR_PLUGIN_BUILD_DATE', '2023-10-26 18:00:00' );
     27define( 'PAGE_GENERATOR_PLUGIN_VERSION', '1.7.3' );
     28define( 'PAGE_GENERATOR_PLUGIN_BUILD_DATE', '2024-07-22 18:00:00' );
    2929
    3030// Define Plugin paths.
  • page-generator/tags/1.7.3/readme.txt

    r2984434 r3123473  
    44Tags: mass page generator, landing pages, multiple page generator
    55Requires at least: 5.0
    6 Tested up to: 6.3.2
     6Tested up to: 6.6
    77Requires PHP: 7.4
    8 Stable tag: 1.7.2
     8Stable tag: 1.7.3
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    9696
    9797== Changelog ==
     98
     99= 1.7.3 (2024-07-22) =
     100* Fix: Generate: Content: Improve performance when `Rotate Authors` option is enabled.
    98101
    99102= 1.7.2 (2023-10-26) =
  • page-generator/trunk/_modules/dashboard/js/min/tinymce-modal-min.js

    r2947190 r3123473  
    1 if(jQuery(document).ready((function($){$("body").on("click","#wpzinc-tinymce-modal div.mce-cancel button, .wpzinc-backbone-modal .media-frame-toolbar .media-toolbar button.cancel",(function(t){"undefined"==typeof tinyMCE||!tinyMCE.activeEditor||tinyMCE.activeEditor.isHidden()?(wpZincModal.close(),void 0!==wpZincModal&&wpZincModal.content(new wpZincModalContent)):tinymce.activeEditor.windowManager.close()})),$("body").on("click","#wpzinc-tinymce-modal div.mce-insert button, .wpzinc-backbone-modal .media-frame-toolbar .media-toolbar button.insert",(function(t){t.preventDefault();var e=$("form.wpzinc-tinymce-popup"),n="["+$('input[name="shortcode"]',$(e)).val(),i="1"==$('input[name="close_shortcode"]',$(e)).val();switch($("input, select, textarea",$(e)).each((function(t){if(void 0===$(this).data("shortcode"))return!0;if(!$(this).val())return!0;if(0==$(this).val().length)return!0;var e=$(this).data("shortcode"),i="0"!=$(this).data("trim"),o=$(this).val();if(!e.length)return!0;e.search("}")>-1&&e.search("{")>-1&&(e=e.replace(/{|}/gi,(function(t){return""})),e=$(e,$(this).parent().parent()).val()),void 0!==$(this).data("shortcode-prepend")&&(e=$(this).data("shortcode-prepend")+e),Array.isArray(o)&&(o=o.join(",")),i&&(o=o.trim()),n+=" "+e.trim()+'="'+o+'"'})),n+="]",i&&(n+="[/"+$('input[name="shortcode"]',$(e)).val()+"]"),$('input[name="editor_type"]',$(e)).val()){case"tinymce":"undefined"!=typeof tinyMCE&&tinyMCE.activeEditor&&!tinyMCE.activeEditor.isHidden()&&(tinyMCE.activeEditor.execCommand("mceReplaceContent",!1,n),tinyMCE.activeEditor.windowManager.close());break;case"quicktags":QTags.insertContent(n),wpZincModal.close(),void 0!==wpZincModal&&wpZincModal.content(new wpZincModalContent);break}}))})),"undefined"!=typeof wp&&void 0!==wp.media){var wpZincModal=new wp.media.view.Modal({controller:{trigger:function(){}},className:"wpzinc-backbone-modal"}),wpZincModalContent=wp.Backbone.View.extend({template:wp.template("wpzinc-modal")});wpZincModal.content(new wpZincModalContent)}
     1if(jQuery(document).ready((function($){$("body").on("click","#wpzinc-tinymce-modal div.mce-cancel button, .wpzinc-backbone-modal .media-frame-toolbar .media-toolbar button.cancel",(function(e){"undefined"==typeof tinyMCE||!tinyMCE.activeEditor||tinyMCE.activeEditor.isHidden()?(wpZincModal.close(),void 0!==wpZincModal&&wpZincModal.content(new wpZincModalContent)):tinymce.activeEditor.windowManager.close()})),$("body").on("click","#wpzinc-tinymce-modal div.mce-insert button, .wpzinc-backbone-modal .media-frame-toolbar .media-toolbar button.insert",(function(e){e.preventDefault();var t=$("form.wpzinc-tinymce-popup"),n="["+$('input[name="shortcode"]',$(t)).val(),i="1"==$('input[name="close_shortcode"]',$(t)).val();$("input, select, textarea",$(t)).each((function(e){if(void 0===$(this).data("shortcode"))return!0;if(!$(this).val())return!0;if(0==$(this).val().length)return!0;var t=$(this).data("shortcode"),i="0"!=$(this).data("trim"),o=$(this).val();if(!t.length)return!0;t.search("}")>-1&&t.search("{")>-1&&(t=t.replace(/{|}/gi,(function(e){return""})),t=$(t,$(this).parent().parent()).val()),void 0!==$(this).data("shortcode-prepend")&&(t=$(this).data("shortcode-prepend")+t),Array.isArray(o)&&(o=o.join(",")),i&&(o=o.trim()),n+=" "+t.trim()+'="'+o+'"'})),n+="]",i&&(n+="[/"+$('input[name="shortcode"]',$(t)).val()+"]");let o=$('input[name="editor_type"]',$(t)).val();switch(o){case"tinymce":"undefined"!=typeof tinyMCE&&tinyMCE.activeEditor&&!tinyMCE.activeEditor.isHidden()&&(tinyMCE.activeEditor.execCommand("mceReplaceContent",!1,n),tinyMCE.activeEditor.windowManager.close());break;case"quicktags":QTags.insertContent(n),wpZincModal.close(),void 0!==wpZincModal&&wpZincModal.content(new wpZincModalContent);break;default:$(o).val(n),wpZincModal.close(),void 0!==wpZincModal&&wpZincModal.content(new wpZincModalContent);break}}))})),"undefined"!=typeof wp&&void 0!==wp.media){var wpZincModal=new wp.media.view.Modal({controller:{trigger:function(){}},className:"wpzinc-backbone-modal"}),wpZincModalContent=wp.Backbone.View.extend({template:wp.template("wpzinc-modal")});wpZincModal.content(new wpZincModalContent)}
  • page-generator/trunk/_modules/dashboard/js/tinymce-modal.js

    r2957435 r3123473  
    128128
    129129                // Depending on the editor type, insert the shortcode.
    130                 switch ( $( 'input[name="editor_type"]', $( form ) ).val() ) {
     130                let editor_type = $( 'input[name="editor_type"]', $( form ) ).val();
     131                switch ( editor_type ) {
    131132                    case 'tinymce':
    132133                        // Sanity check that a Visual editor exists and is active.
     
    143144                        // Insert into editor.
    144145                        QTags.insertContent( shortcode );
     146
     147                        // Close modal.
     148                        wpZincModal.close();
     149
     150                        // Reset the modal content.
     151                        // If we don't do this, switching from Text to Visual Editor for the same shortcode results
     152                        // code picking up data from the QuickTags modal, not the TinyMCE one.
     153                        if ( typeof wpZincModal !== 'undefined' ) {
     154                            wpZincModal.content( new wpZincModalContent() );
     155                        }
     156                        break;
     157
     158                    default:
     159                        // Insert into selector.
     160                        $( editor_type ).val( shortcode );
    145161
    146162                        // Close modal.
  • page-generator/trunk/includes/admin/generate.php

    r2957435 r3123473  
    344344        // Rotate Author.
    345345        if ( isset( $settings['rotateAuthors'] ) ) {
    346             $authors    = $this->base->get_class( 'common' )->get_authors();
    347             $user_index = wp_rand( 0, ( count( $authors ) - 1 ) );
     346            $author_ids = $this->base->get_class( 'common' )->get_all_user_ids();
     347            $user_index = wp_rand( 0, ( count( $author_ids ) - 1 ) );
    348348        }
    349349
     
    390390            'post_content'   => $settings['content'],
    391391            'post_status'    => ( $test_mode ? 'draft' : $settings['status'] ),
    392             'post_author'    => ( ( isset( $settings['rotateAuthors'] ) && $settings['rotateAuthors'] == 1 ) ? $authors[ $user_index ]->ID : $settings['author'] ), // phpcs:ignore Universal.Operators.StrictComparisons.LooseEqual
     392            'post_author'    => ( ( isset( $settings['rotateAuthors'] ) && $settings['rotateAuthors'] == 1 && isset( $author_ids ) && isset( $user_index ) ) ? $author_ids[ $user_index ] : $settings['author'] ), // phpcs:ignore Universal.Operators.StrictComparisons.LooseEqual
    393393            'comment_status' => ( ( isset( $settings['comments'] ) && $settings['comments'] == 1 ) ? 'open' : 'closed' ), // phpcs:ignore Universal.Operators.StrictComparisons.LooseEqual
    394394            'ping_status'    => ( ( isset( $settings['trackbacks'] ) && $settings['trackbacks'] == 1 ) ? 'open' : 'closed' ), // phpcs:ignore Universal.Operators.StrictComparisons.LooseEqual
  • page-generator/trunk/includes/global/common.php

    r2957435 r3123473  
    6868
    6969    /**
    70      * Helper method to retrieve authors
    71      *
    72      * @since   1.1.3
     70     * Helper method to return all WordPress User IDs.
     71     *
     72     * @since   4.6.6
    7373     *
    7474     * @return  array   Authors
    7575     */
    76     public function get_authors() {
    77 
    78         // Get authors.
    79         $authors = get_users(
     76    public function get_all_user_ids() {
     77
     78        // Get all user IDs.
     79        $user_ids = get_users(
    8080            array(
    81                 'orderby' => 'nicename',
     81                'fields'  => 'ID',
     82                'orderby' => 'ID',
    8283            )
    8384        );
    8485
    8586        /**
    86          * Defines available authors for the Author dropdown on the Generate Content screen.
    87          *
    88          * @since   1.1.3
    89          *
    90          * @param   array   $authors    Authors.
    91          */
    92         $authors = apply_filters( 'page_generator_pro_common_get_authors', $authors );
    93 
    94         // Return filtered results.
    95         return $authors;
     87         * Defines available user IDs.
     88         *
     89         * @since   4.6.6
     90         *
     91         * @param   array   $user_ids    User IDs.
     92         */
     93        $user_ids = apply_filters( 'page_generator_pro_common_get_all_user_ids', $user_ids );
     94
     95        // Return filtered results.
     96        return $user_ids;
    9697
    9798    }
  • page-generator/trunk/page-generator.php

    r2984434 r3123473  
    88 * Plugin Name: Page Generator
    99 * Plugin URI: http://www.wpzinc.com/plugins/page-generator-pro
    10  * Version: 1.7.2
     10 * Version: 1.7.3
    1111 * Author: WP Zinc
    1212 * Author URI: http://www.wpzinc.com
     
    2525
    2626// Define Plugin version and build date.
    27 define( 'PAGE_GENERATOR_PLUGIN_VERSION', '1.7.2' );
    28 define( 'PAGE_GENERATOR_PLUGIN_BUILD_DATE', '2023-10-26 18:00:00' );
     27define( 'PAGE_GENERATOR_PLUGIN_VERSION', '1.7.3' );
     28define( 'PAGE_GENERATOR_PLUGIN_BUILD_DATE', '2024-07-22 18:00:00' );
    2929
    3030// Define Plugin paths.
  • page-generator/trunk/readme.txt

    r2984434 r3123473  
    44Tags: mass page generator, landing pages, multiple page generator
    55Requires at least: 5.0
    6 Tested up to: 6.3.2
     6Tested up to: 6.6
    77Requires PHP: 7.4
    8 Stable tag: 1.7.2
     8Stable tag: 1.7.3
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    9696
    9797== Changelog ==
     98
     99= 1.7.3 (2024-07-22) =
     100* Fix: Generate: Content: Improve performance when `Rotate Authors` option is enabled.
    98101
    99102= 1.7.2 (2023-10-26) =
Note: See TracChangeset for help on using the changeset viewer.