Changeset 3123473
- Timestamp:
- 07/23/2024 02:39:54 AM (20 months ago)
- Location:
- page-generator
- Files:
-
- 2 added
- 12 edited
- 1 copied
-
tags/1.7.3 (copied) (copied from page-generator/trunk)
-
tags/1.7.3/_modules/dashboard/feather/bluesky.svg (added)
-
tags/1.7.3/_modules/dashboard/js/min/tinymce-modal-min.js (modified) (1 diff)
-
tags/1.7.3/_modules/dashboard/js/tinymce-modal.js (modified) (2 diffs)
-
tags/1.7.3/includes/admin/generate.php (modified) (2 diffs)
-
tags/1.7.3/includes/global/common.php (modified) (1 diff)
-
tags/1.7.3/page-generator.php (modified) (2 diffs)
-
tags/1.7.3/readme.txt (modified) (2 diffs)
-
trunk/_modules/dashboard/feather/bluesky.svg (added)
-
trunk/_modules/dashboard/js/min/tinymce-modal-min.js (modified) (1 diff)
-
trunk/_modules/dashboard/js/tinymce-modal.js (modified) (2 diffs)
-
trunk/includes/admin/generate.php (modified) (2 diffs)
-
trunk/includes/global/common.php (modified) (1 diff)
-
trunk/page-generator.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
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)}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(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 128 128 129 129 // 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 ) { 131 132 case 'tinymce': 132 133 // Sanity check that a Visual editor exists and is active. … … 143 144 // Insert into editor. 144 145 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 ); 145 161 146 162 // Close modal. -
page-generator/tags/1.7.3/includes/admin/generate.php
r2957435 r3123473 344 344 // Rotate Author. 345 345 if ( isset( $settings['rotateAuthors'] ) ) { 346 $author s = $this->base->get_class( 'common' )->get_authors();347 $user_index = wp_rand( 0, ( count( $author s ) - 1 ) );346 $author_ids = $this->base->get_class( 'common' )->get_all_user_ids(); 347 $user_index = wp_rand( 0, ( count( $author_ids ) - 1 ) ); 348 348 } 349 349 … … 390 390 'post_content' => $settings['content'], 391 391 '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.LooseEqual392 '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 393 393 'comment_status' => ( ( isset( $settings['comments'] ) && $settings['comments'] == 1 ) ? 'open' : 'closed' ), // phpcs:ignore Universal.Operators.StrictComparisons.LooseEqual 394 394 '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 68 68 69 69 /** 70 * Helper method to ret rieve authors71 * 72 * @since 1.1.370 * Helper method to return all WordPress User IDs. 71 * 72 * @since 4.6.6 73 73 * 74 74 * @return array Authors 75 75 */ 76 public function get_a uthors() {77 78 // Get a uthors.79 $ authors = get_users(76 public function get_all_user_ids() { 77 78 // Get all user IDs. 79 $user_ids = get_users( 80 80 array( 81 'orderby' => 'nicename', 81 'fields' => 'ID', 82 'orderby' => 'ID', 82 83 ) 83 84 ); 84 85 85 86 /** 86 * Defines available authors for the Author dropdown on the Generate Content screen.87 * 88 * @since 1.1.389 * 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; 96 97 97 98 } -
page-generator/tags/1.7.3/page-generator.php
r2984434 r3123473 8 8 * Plugin Name: Page Generator 9 9 * Plugin URI: http://www.wpzinc.com/plugins/page-generator-pro 10 * Version: 1.7. 210 * Version: 1.7.3 11 11 * Author: WP Zinc 12 12 * Author URI: http://www.wpzinc.com … … 25 25 26 26 // Define Plugin version and build date. 27 define( 'PAGE_GENERATOR_PLUGIN_VERSION', '1.7. 2' );28 define( 'PAGE_GENERATOR_PLUGIN_BUILD_DATE', '202 3-10-2618:00:00' );27 define( 'PAGE_GENERATOR_PLUGIN_VERSION', '1.7.3' ); 28 define( 'PAGE_GENERATOR_PLUGIN_BUILD_DATE', '2024-07-22 18:00:00' ); 29 29 30 30 // Define Plugin paths. -
page-generator/tags/1.7.3/readme.txt
r2984434 r3123473 4 4 Tags: mass page generator, landing pages, multiple page generator 5 5 Requires at least: 5.0 6 Tested up to: 6. 3.26 Tested up to: 6.6 7 7 Requires PHP: 7.4 8 Stable tag: 1.7. 28 Stable tag: 1.7.3 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 96 96 97 97 == Changelog == 98 99 = 1.7.3 (2024-07-22) = 100 * Fix: Generate: Content: Improve performance when `Rotate Authors` option is enabled. 98 101 99 102 = 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)}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(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 128 128 129 129 // 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 ) { 131 132 case 'tinymce': 132 133 // Sanity check that a Visual editor exists and is active. … … 143 144 // Insert into editor. 144 145 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 ); 145 161 146 162 // Close modal. -
page-generator/trunk/includes/admin/generate.php
r2957435 r3123473 344 344 // Rotate Author. 345 345 if ( isset( $settings['rotateAuthors'] ) ) { 346 $author s = $this->base->get_class( 'common' )->get_authors();347 $user_index = wp_rand( 0, ( count( $author s ) - 1 ) );346 $author_ids = $this->base->get_class( 'common' )->get_all_user_ids(); 347 $user_index = wp_rand( 0, ( count( $author_ids ) - 1 ) ); 348 348 } 349 349 … … 390 390 'post_content' => $settings['content'], 391 391 '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.LooseEqual392 '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 393 393 'comment_status' => ( ( isset( $settings['comments'] ) && $settings['comments'] == 1 ) ? 'open' : 'closed' ), // phpcs:ignore Universal.Operators.StrictComparisons.LooseEqual 394 394 '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 68 68 69 69 /** 70 * Helper method to ret rieve authors71 * 72 * @since 1.1.370 * Helper method to return all WordPress User IDs. 71 * 72 * @since 4.6.6 73 73 * 74 74 * @return array Authors 75 75 */ 76 public function get_a uthors() {77 78 // Get a uthors.79 $ authors = get_users(76 public function get_all_user_ids() { 77 78 // Get all user IDs. 79 $user_ids = get_users( 80 80 array( 81 'orderby' => 'nicename', 81 'fields' => 'ID', 82 'orderby' => 'ID', 82 83 ) 83 84 ); 84 85 85 86 /** 86 * Defines available authors for the Author dropdown on the Generate Content screen.87 * 88 * @since 1.1.389 * 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; 96 97 97 98 } -
page-generator/trunk/page-generator.php
r2984434 r3123473 8 8 * Plugin Name: Page Generator 9 9 * Plugin URI: http://www.wpzinc.com/plugins/page-generator-pro 10 * Version: 1.7. 210 * Version: 1.7.3 11 11 * Author: WP Zinc 12 12 * Author URI: http://www.wpzinc.com … … 25 25 26 26 // Define Plugin version and build date. 27 define( 'PAGE_GENERATOR_PLUGIN_VERSION', '1.7. 2' );28 define( 'PAGE_GENERATOR_PLUGIN_BUILD_DATE', '202 3-10-2618:00:00' );27 define( 'PAGE_GENERATOR_PLUGIN_VERSION', '1.7.3' ); 28 define( 'PAGE_GENERATOR_PLUGIN_BUILD_DATE', '2024-07-22 18:00:00' ); 29 29 30 30 // Define Plugin paths. -
page-generator/trunk/readme.txt
r2984434 r3123473 4 4 Tags: mass page generator, landing pages, multiple page generator 5 5 Requires at least: 5.0 6 Tested up to: 6. 3.26 Tested up to: 6.6 7 7 Requires PHP: 7.4 8 Stable tag: 1.7. 28 Stable tag: 1.7.3 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 96 96 97 97 == Changelog == 98 99 = 1.7.3 (2024-07-22) = 100 * Fix: Generate: Content: Improve performance when `Rotate Authors` option is enabled. 98 101 99 102 = 1.7.2 (2023-10-26) =
Note: See TracChangeset
for help on using the changeset viewer.