Changeset 1855335
- Timestamp:
- 04/09/2018 05:44:41 PM (8 years ago)
- Location:
- multisite-post-duplicator
- Files:
-
- 44 added
- 5 edited
-
tags/1.7.5 (added)
-
tags/1.7.5/README.md (added)
-
tags/1.7.5/addons (added)
-
tags/1.7.5/addons/bulkaction-mpd-addon.php (added)
-
tags/1.7.5/addons/restrictSites-mpd-addon.php (added)
-
tags/1.7.5/addons/roleAccess-mpd-addon.php (added)
-
tags/1.7.5/css (added)
-
tags/1.7.5/css/font-awesome.min.css (added)
-
tags/1.7.5/css/fonts (added)
-
tags/1.7.5/css/fonts/FontAwesome.otf (added)
-
tags/1.7.5/css/fonts/fontawesome-webfont.eot (added)
-
tags/1.7.5/css/fonts/fontawesome-webfont.svg (added)
-
tags/1.7.5/css/fonts/fontawesome-webfont.ttf (added)
-
tags/1.7.5/css/fonts/fontawesome-webfont.woff (added)
-
tags/1.7.5/css/fonts/fontawesome-webfont.woff2 (added)
-
tags/1.7.5/css/mpd-mb.css (added)
-
tags/1.7.5/css/mpd.css (added)
-
tags/1.7.5/css/select2-spinner.gif (added)
-
tags/1.7.5/css/select2.min.css (added)
-
tags/1.7.5/css/select2.png (added)
-
tags/1.7.5/css/select2x2.png (added)
-
tags/1.7.5/css/ti-ta-toggle.css (added)
-
tags/1.7.5/images (added)
-
tags/1.7.5/images/smile.png (added)
-
tags/1.7.5/images/tick.png (added)
-
tags/1.7.5/inc (added)
-
tags/1.7.5/inc/acf-functions.php (added)
-
tags/1.7.5/inc/admin-ui.php (added)
-
tags/1.7.5/inc/considerations.php (added)
-
tags/1.7.5/inc/core.php (added)
-
tags/1.7.5/inc/load-scripts.php (added)
-
tags/1.7.5/inc/media.php (added)
-
tags/1.7.5/inc/mpd-functions.php (added)
-
tags/1.7.5/inc/persist.php (added)
-
tags/1.7.5/inc/postform_ui.php (added)
-
tags/1.7.5/inc/settings-ui.php (added)
-
tags/1.7.5/js (added)
-
tags/1.7.5/js/admin-datatable-init.js (added)
-
tags/1.7.5/js/admin-scripts.js (added)
-
tags/1.7.5/js/admin-settings.js (added)
-
tags/1.7.5/js/admin.js (added)
-
tags/1.7.5/js/select2.min.js (added)
-
tags/1.7.5/mpd.php (added)
-
tags/1.7.5/readme.txt (added)
-
trunk/README.md (modified) (9 diffs)
-
trunk/addons/restrictSites-mpd-addon.php (modified) (7 diffs)
-
trunk/inc/acf-functions.php (modified) (3 diffs)
-
trunk/mpd.php (modified) (1 diff)
-
trunk/readme.txt (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
multisite-post-duplicator/trunk/README.md
r1763939 r1855335 35 35 * Batch Duplication 36 36 * Metabox control within Post/page edit screen 37 * Activity Log. View information on all du lications performed within your network37 * Activity Log. View information on all duplications performed within your network 38 38 39 39 * Settings … … 76 76 = What about Multisites on Subdomain Configurations? = 77 77 78 Unfortunately we don't support sub domain configu ations at this time. You may use it to some extent, but a lot of this plugins features may produce unexpected results. Our plan is to introduce support for this in the near futute.78 Unfortunately we don't support sub domain configurations at this time. You may use it to some extent, but a lot of this plugins features may produce unexpected results. Our plan is to introduce support for this in the near future. 79 79 80 80 == Screenshots == … … 87 87 == Changelog == 88 88 89 = 1.7.6 = 90 * ACF fields registered via php are now copied (thanks WillyMichel) 91 * Clone fields containing media now correctly copied (thanks WillyMichel) 92 * Fixed issue with multiple ACF gallery fields on a single post (thanks WillyMichel) 93 * Added settings option to make master site terms and term_taxonomy tables global for persistent category id. This way posts that are fed to site and sub-site pages by category ID will always generate based on master site posts. (thanks SpeechlessWick) 94 89 95 = 1.7.5 = 90 * Perm link stucture now behaves as expected when copying post to the same site96 * Permalink structure now behaves as expected when copying post to the same site 91 97 * Publish date now persists on linked posts if requested (thanks again Iskren Ivov Chernev) 92 98 … … 103 109 = 1.7.1 = 104 110 * NEW: Now supports Media Post type. Copy single or batched files to different sites on your network! 105 * Improved and more compat able method of copying images to the destination sites. (no more put_file_contents()!!)111 * Improved and more compatible method of copying images to the destination sites. (no more put_file_contents()!!) 106 112 * Bug Fixes 107 113 … … 134 140 * Fixed: Issue with default 'post status' setting giving php notice in debug mode 135 141 * Fixed: Issue with multiple duplicate messages showing the same details. 136 * Fixed: Setting producing undesired behaviour for tags and taxonomies in some s enarios.142 * Fixed: Setting producing undesired behaviour for tags and taxonomies in some scenarios. 137 143 * Improved filters used to build the metabox markup 138 144 … … 144 150 145 151 = 1.5.3 = 146 * Fixed php warnings experienced in some s enarios.152 * Fixed php warnings experienced in some scenarios. 147 153 148 154 = 1.5.2 = 149 * Fixed php warnings experienced in some s enarios.155 * Fixed php warnings experienced in some scenarios. 150 156 151 157 = 1.5.1 = … … 162 168 * NEW: Signposting for instances where user's 'Advanced Custom Fields Field Groups' don't exist in the destination site. 163 169 * Improved performance of taxonomy duplication on linked posts. 164 * Fixed issue where taxonomy terms would not copy in some s enarios.170 * Fixed issue where taxonomy terms would not copy in some scenarios. 165 171 * Removed some PHP warnings if running in debug mode. 166 172 … … 192 198 * Fixed issue where networks with more than 100 sites would have some sites not listed in thier controls (for installs > 4.6) 193 199 * Fixed issue where other plugin's meta data (that are using the 'save_post' action) might be missed during the duplication 194 * General performan ace improvements200 * General performance improvements 195 201 196 202 = 1.1 = … … 226 232 227 233 = 0.9.5 = 228 * Subdomain warning message can now be dis smissed. Also has improved signposting.234 * Subdomain warning message can now be dismissed. Also has improved signposting. 229 235 230 236 = 0.9.4 = -
multisite-post-duplicator/trunk/addons/restrictSites-mpd-addon.php
r1604003 r1855335 18 18 mpd_settings_field('restrict_option_setting', '<i class="fa fa-user-times" aria-hidden="true"></i> ' . __( 'Restrict MPD to certain sites', 'multisite-post-duplicator' ), 'restrict_option_setting_render'); 19 19 mpd_settings_field('restrict_some_option_setting', '<i class="fa fa-user-plus" aria-hidden="true"></i> ' . __( 'Restrict MPD on some sites', 'multisite-post-duplicator' ), 'restrict_some_option_setting_render'); 20 mpd_settings_field('master_site_setting', '<i class="fa fa-bank" aria-hidden="true"></i> ' . __( 'Select a Master Site', 'multisite-post-duplicator' ), 'master_site_settings_render'); 21 20 mpd_settings_field('master_site_setting', '<i class="fa fa-bank" aria-hidden="true"></i> ' . __( 'Select a Master Site', 'multisite-post-duplicator' ), 'master_site_settings_render'); 21 mpd_settings_field('mdp_global_categories_taxonomies', 22 '<i class="fa fa-globe" aria-hidden="true"></i> ' . __( 'Make post categories and taxonomies global?', 'multisite-post-duplicator' ), 23 'mdp_global_categories_taxonomies_render' 24 ); 25 22 26 } 23 27 … … 156 160 157 161 /** 162 * 163 * Create the UI for the Global Category and Taxonomy Setting 164 * 165 * @since 1.7 166 * @return null 167 * 168 */ 169 function mdp_global_categories_taxonomies_render( ) { 170 171 $options = get_option( 'mdp_settings' ); ?> 172 173 <div class="checkbox checkbox-slider--b-flat global-terms"> 174 175 <label> 176 <input type='checkbox' name='mdp_settings[mdp_global_categories_taxonomies]' <?php mpd_checked_lookup($options, 'mdp_global_categories_taxonomies', 'global') ;?> value='global'> 177 <span> 178 <?php mpd_information_icon('This plugin will make all sub-sites reference the master sites TERMS and TERM TAXONOMY tables. This allows for category IDs to be consistent across all sub-sites when posts are duplicated from the master site. When a post is duplicated from the master site with this setting checked, it can be referenced universally by the same category ID. This comes in handy if you are feeding posts to areas of your site/ sub-sites by category ID. You can turn off this activity by un-checking the box.'); ?> 179 </span> 180 </label> 181 </div> 182 <?php 183 184 } 185 186 /** 158 187 * @ignore 159 188 */ … … 168 197 169 198 var masterSiteLvl = jQuery(".mpd-master-site").parent().parent(); 199 var gTerms = jQuery(".global-terms").parent().parent(); 170 200 var restrictSomeLvl = jQuery(".restrict-some-checkbox").parent().parent(); 171 201 var rcb = jQuery('.restrict-some-checkbox:not(:checked)'); … … 173 203 masterSiteLvl.hide(); 174 204 restrictSomeLvl.hide(); 205 gTerms.hide(); 175 206 176 207 if(rcb.length == 1){ … … 186 217 if(jQuery('#mpd_restrict_set_master').is(':checked') ){ 187 218 masterSiteLvl.show(); 219 gTerms.show(); 188 220 } 189 221 if(jQuery('#mpd_restrict_some').is(':checked') ){ … … 195 227 if (jQuery(this).val() == 'master') { 196 228 masterSiteLvl.show('fast'); 229 gTerms.show('fast'); 197 230 }else{ 198 231 masterSiteLvl.hide('fast'); 232 gTerms.hide('fast'); 199 233 }; 200 234 … … 281 315 282 316 add_filter( 'mpd_is_active', 'mpd_is_site_active'); 317 318 add_action( 'init', 'change_tax_terms_table', 0 ); 319 320 add_action( 'switch_blog', 'change_tax_terms_table', 0 ); 321 322 function change_tax_terms_table(){ 323 324 $options = get_option( 'mdp_settings' ); 325 $master_id = $options['master_site_setting']; 326 327 if((isset($options['mdp_global_categories_taxonomies']) || !$options) && apply_filters('mdp_global_categories_taxonomies', true) ){ 328 329 global $wpdb; 330 331 $wpdb->terms = $wpdb->get_blog_prefix($master_id) . 'terms'; 332 333 $wpdb->term_taxonomy = $wpdb->get_blog_prefix($master_id) . 'term_taxonomy'; 334 335 } 336 337 } -
multisite-post-duplicator/trunk/inc/acf-functions.php
r1699157 r1855335 34 34 if(isset($meta_values["_" . $key])){ 35 35 36 global $wpdb; 37 38 $acf_field_key = $meta_values["_" . $key][0]; 39 $tablename = mpd_get_tablename($wpdb->blogid); 40 $query = $wpdb->prepare(" 41 SELECT post_content 42 FROM $tablename 43 WHERE post_name = '%s' 44 AND post_type = 'acf-field'", $acf_field_key 45 ); 46 47 //Get the posssible ACF controller post for this image 48 $result = $wpdb->get_row($query); 36 $acf_field_key = $meta_values["_" . $key][0]; 37 38 if(strlen($acf_field_key) > 20) { 39 $multi_keys = explode( 'field_', $acf_field_key ); 40 $acf_field_key = "field_".end($multi_keys); 41 } 42 43 //Get the posssible ACF controller post for this image 44 $result = get_field_object($acf_field_key); 49 45 50 46 if($result){ … … 54 50 } 55 51 56 $acf_control = unserialize($result->post_content);52 $acf_control = $result; 57 53 $acf_type = $acf_control['type']; 58 54 … … 250 246 if($acf_gallerys){ 251 247 252 $attach_ids = array();253 254 248 foreach ($acf_gallerys as $gallery_key => $acf_gallery) { 249 250 $attach_ids = array(); 255 251 256 252 if(isset($acf_gallery['image_ids']) && $acf_gallery['image_ids'] !=''){ -
multisite-post-duplicator/trunk/mpd.php
r1763939 r1855335 5 5 Plugin URI: http://www.wpmaz.uk 6 6 Description: Duplicate/Copy/Clone any individual page, post or custom post type from one site on your multisite network to another. 7 Version: 1.7. 57 Version: 1.7.6 8 8 Author: Mario Jaconelli 9 9 Author URI: http://www.wpmaz.uk -
multisite-post-duplicator/trunk/readme.txt
r1763939 r1855335 35 35 * Batch Duplication 36 36 * Metabox control within Post/page edit screen 37 * Activity Log. View information on all du lications performed within your network37 * Activity Log. View information on all duplications performed within your network 38 38 39 39 * Settings … … 76 76 = What about Multisites on Subdomain Configurations? = 77 77 78 Unfortunately we don't support sub domain configu ations at this time. You may use it to some extent, but a lot of this plugins features may produce unexpected results. Our plan is to introduce support for this in the near futute.78 Unfortunately we don't support sub domain configurations at this time. You may use it to some extent, but a lot of this plugins features may produce unexpected results. Our plan is to introduce support for this in the near future. 79 79 80 80 == Screenshots == … … 87 87 == Changelog == 88 88 89 = 1.7.6 = 90 * ACF fields registered via php are now copied (thanks WillyMichel) 91 * Clone fields containing media now correctly copied (thanks WillyMichel) 92 * Fixed issue with multiple ACF gallery fields on a single post (thanks WillyMichel) 93 * Added settings option to make master site terms and term_taxonomy tables global for persistent category id. This way posts that are fed to site and sub-site pages by category ID will always generate based on master site posts. (thanks SpeechlessWick) 94 89 95 = 1.7.5 = 90 * Perm link stucture now behaves as expected when copying post to the same site96 * Permalink structure now behaves as expected when copying post to the same site 91 97 * Publish date now persists on linked posts if requested (thanks again Iskren Ivov Chernev) 92 98 … … 103 109 = 1.7.1 = 104 110 * NEW: Now supports Media Post type. Copy single or batched files to different sites on your network! 105 * Improved and more compat able method of copying images to the destination sites. (no more put_file_contents()!!)111 * Improved and more compatible method of copying images to the destination sites. (no more put_file_contents()!!) 106 112 * Bug Fixes 107 113 … … 134 140 * Fixed: Issue with default 'post status' setting giving php notice in debug mode 135 141 * Fixed: Issue with multiple duplicate messages showing the same details. 136 * Fixed: Setting producing undesired behaviour for tags and taxonomies in some s enarios.142 * Fixed: Setting producing undesired behaviour for tags and taxonomies in some scenarios. 137 143 * Improved filters used to build the metabox markup 138 144 … … 144 150 145 151 = 1.5.3 = 146 * Fixed php warnings experienced in some s enarios.152 * Fixed php warnings experienced in some scenarios. 147 153 148 154 = 1.5.2 = 149 * Fixed php warnings experienced in some s enarios.155 * Fixed php warnings experienced in some scenarios. 150 156 151 157 = 1.5.1 = … … 157 163 * Improved performance 158 164 * Improved access for developers with the addition of several new hooks. 159 * Removed signposting added in previous release. Rethinking a better approach160 165 161 166 = 1.4 = … … 163 168 * NEW: Signposting for instances where user's 'Advanced Custom Fields Field Groups' don't exist in the destination site. 164 169 * Improved performance of taxonomy duplication on linked posts. 165 * Fixed issue where taxonomy terms would not copy in some s enarios.170 * Fixed issue where taxonomy terms would not copy in some scenarios. 166 171 * Removed some PHP warnings if running in debug mode. 167 172 … … 177 182 178 183 = 1.2 = 179 * NEW: When using the batch duplication tool if a parent and child are in the duplicate batch then the relationship will be maintained in the desitination site 184 * NEW: When using the batch duplication tool if a parent and child are in the duplicate batch then the relationship will be maintained in the desitination site. 180 185 * UI Improvements 181 186 * Corrected some typos … … 193 198 * Fixed issue where networks with more than 100 sites would have some sites not listed in thier controls (for installs > 4.6) 194 199 * Fixed issue where other plugin's meta data (that are using the 'save_post' action) might be missed during the duplication 195 * General performan ace improvements200 * General performance improvements 196 201 197 202 = 1.1 = … … 227 232 228 233 = 0.9.5 = 229 * Subdomain warning message can now be dis smissed. Also has improved signposting.234 * Subdomain warning message can now be dismissed. Also has improved signposting. 230 235 231 236 = 0.9.4 = … … 239 244 * NEW: Support for WordPress' new WP_Site_Query (get_sites()) class. 240 245 * Fixed issue with featured images not copying over for some users (thanks joedev91). 241 * Fixed issue with unwanted duplicatedpost meta upon duplication process (thanks joedev91).246 * Fixed issue with unwanted post meta upon duplication process (thanks joedev91). 242 247 243 248 = 0.9.2 =
Note: See TracChangeset
for help on using the changeset viewer.