Changeset 1919099
- Timestamp:
- 08/03/2018 12:04:15 AM (7 years ago)
- Location:
- wpsitesynccontent
- Files:
-
- 49 added
- 8 edited
-
tags/1.4 (added)
-
tags/1.4/.htaccess (added)
-
tags/1.4/assets (added)
-
tags/1.4/assets/css (added)
-
tags/1.4/assets/css/sync-admin.css (added)
-
tags/1.4/assets/imgs (added)
-
tags/1.4/assets/imgs/ajax-loader.gif (added)
-
tags/1.4/assets/imgs/wpsitesync-logo-blue.png (added)
-
tags/1.4/assets/imgs/wpsitesync-logo.svg (added)
-
tags/1.4/assets/js (added)
-
tags/1.4/assets/js/settings.js (added)
-
tags/1.4/assets/js/sync.js (added)
-
tags/1.4/classes (added)
-
tags/1.4/classes/admin.php (added)
-
tags/1.4/classes/ajax.php (added)
-
tags/1.4/classes/apicontroller.php (added)
-
tags/1.4/classes/apiheaders.php (added)
-
tags/1.4/classes/apimodel.php (added)
-
tags/1.4/classes/apirequest.php (added)
-
tags/1.4/classes/apiresponse.php (added)
-
tags/1.4/classes/attachmodel.php (added)
-
tags/1.4/classes/auth.php (added)
-
tags/1.4/classes/debug.php (added)
-
tags/1.4/classes/extensionmodel.php (added)
-
tags/1.4/classes/extensionsettings.php (added)
-
tags/1.4/classes/input.php (added)
-
tags/1.4/classes/licensesettings.php (added)
-
tags/1.4/classes/licensing.php (added)
-
tags/1.4/classes/logmodel.php (added)
-
tags/1.4/classes/mediamodel.php (added)
-
tags/1.4/classes/model.php (added)
-
tags/1.4/classes/options.php (added)
-
tags/1.4/classes/postmodel.php (added)
-
tags/1.4/classes/serialize.php (added)
-
tags/1.4/classes/settings.php (added)
-
tags/1.4/classes/sourcesmodel.php (added)
-
tags/1.4/classes/view.php (added)
-
tags/1.4/index.php (added)
-
tags/1.4/install (added)
-
tags/1.4/install/activate.php (added)
-
tags/1.4/install/deactivate.php (added)
-
tags/1.4/install/pluginupdater.php (added)
-
tags/1.4/languages (added)
-
tags/1.4/languages/placeholder.txt (added)
-
tags/1.4/readme.txt (added)
-
tags/1.4/views (added)
-
tags/1.4/views/content_details.php (added)
-
tags/1.4/views/syncextensions.php (added)
-
tags/1.4/wpsitesynccontent.php (added)
-
trunk/classes/ajax.php (modified) (1 diff)
-
trunk/classes/apimodel.php (modified) (2 diffs)
-
trunk/classes/apirequest.php (modified) (8 diffs)
-
trunk/classes/model.php (modified) (2 diffs)
-
trunk/classes/options.php (modified) (8 diffs)
-
trunk/classes/settings.php (modified) (20 diffs)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/wpsitesynccontent.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wpsitesynccontent/trunk/classes/ajax.php
r1907374 r1919099 9 9 { 10 10 // add user data on a high priority - in case other add-ons want to change/modify it 11 // add_filter('spectrom_sync_api_request', array( &$this, 'add_user_info'), 1, 3);11 // add_filter('spectrom_sync_api_request', array($this, 'add_user_info'), 1, 3); 12 12 } 13 13 -
wpsitesynccontent/trunk/classes/apimodel.php
r1907374 r1919099 214 214 rocket_define_donotasync_css_constant( true ); 215 215 } 216 // unhook f(x) Private Site 217 if (function_exists('fx_private_site_plugins_loaded')) 218 add_action('wp_loaded', array($this, 'unhook_fx_private_site')); 216 219 217 220 //die('inside ' . __METHOD__. '():' . __LINE__ . ' set=' . var_export($settings, TRUE)); … … 266 269 return $value; 267 270 } */ 271 public function unhook_fx_private_site() 272 { 273 SyncDebug::log(__METHOD__.'():' . __LINE__ . ' unhook "fx_private_site_plugins_loaded()" function'); 274 error_log(__METHOD__.'():' . __LINE__ . ' unhook "fx_private_site_plugins_loaded()" function'); 275 remove_action('template_redirect', 'fx_private_site_please_log_in', 0); 276 } 268 277 } 269 278 -
wpsitesynccontent/trunk/classes/apirequest.php
r1907374 r1919099 367 367 private function _add_queue($action, $data) 368 368 { 369 SyncDebug::log(__METHOD__.'() adding "' . $action . '" to queue with ' . var_export($data, TRUE));369 SyncDebug::log(__METHOD__.'() adding "' . $action . '" to queue'); // with ' . var_export($data, TRUE)); 370 370 $this->_queue[] = array('action' => $action, 'data' => $data); 371 371 } … … 727 727 // sometimes the insert media into post doesn't add a space...this will hopefully fix that 728 728 $content = str_replace('alt="', ' alt="', $content); 729 if (empty($content)) 730 return TRUE;729 // if (empty($content)) // need to continue even with empty content. otherwise featured image doesn't get processed 730 // return TRUE; 731 731 732 732 // TODO: add try..catch … … 744 744 $this->_sent_images = array(); // list of images already sent. Used by _send_image() to not send the same image twice 745 745 746 // TODO: use PHP_URL_HOST parameter 747 $url = parse_url(get_bloginfo('url')); 748 $this->_source_domain = $url['host']; 746 // set source domain; used to detect media elements to be added to push queue 747 $this->set_source_domain(site_url('url')); 749 748 750 749 // get all known children of the post … … 844 843 845 844 // handle the featured image 846 if ( ''!== $post_thumbnail_id) {847 SyncDebug::log(__METHOD__.'():' . __LINE__ . ' featured image: ');845 if (0 !== $post_thumbnail_id) { 846 SyncDebug::log(__METHOD__.'():' . __LINE__ . ' featured image: ' . $post_thumbnail_id); 848 847 $img = wp_get_attachment_image_src($post_thumbnail_id, 'full'); 849 848 if (FALSE === $img) SyncDebug::log(__METHOD__.'():' . __LINE__ . ' wp_get_attachment_image_src() failed'); … … 855 854 $att_post = get_post($post_thumbnail_id); 856 855 if (NULL !== $att_post) { 857 SyncDebug::log(__METHOD__.'():' . __LINE__ . ' post guid: ' . $att_post->guid );856 SyncDebug::log(__METHOD__.'():' . __LINE__ . ' post guid: ' . $att_post->guid . ' type=' . $att_post->post_type); 858 857 $img[0] = $att_post->guid; 859 858 } … … 1006 1005 SyncDebug::log(__METHOD__.'() post_id=' . $post_id . ' path=' . $file_path . ' featured=' . ($featured ? 'TRUE' : 'FALSE') . ' attach_id=' . $attach_id, TRUE); 1007 1006 1008 if (!file_exists($file_path)) 1009 SyncDebug::log(__METHOD__.'():' . __LINE__ . ' file "' . $file_path . '" not found'); 1007 if (!file_exists($file_path) && FALSE !== strpos($file_path, '%')) { 1008 // TODO: fix url encoding in file path bb#11 1009 } 1010 1011 if (!file_exists($file_path)) { 1012 // no image - no need to send update_media API request #167 1013 SyncDebug::log(__METHOD__.'():' . __LINE__ . ' file "' . $file_path . '" not found'); 1014 return; 1015 } 1010 1016 $attach_post = get_post($attach_id, OBJECT); 1011 1017 $attach_alt = get_post_meta($attach_id, '_wp_attachment_image_alt', TRUE); … … 1031 1037 // allow extensions to include data in upload_media operations 1032 1038 $post_fields = apply_filters('spectrom_sync_upload_media_fields', $post_fields); 1033 SyncDebug::log(__METHOD__.'():' . __LINE__ . ' image post fields: ' . var_export($post_fields, TRUE)); 1039 SyncDebug::log(__METHOD__.'():' . __LINE__ . ' image post ' . $post_fields['img_path'] . $post_fields['img_name']); 1040 //var_export($post_fields, TRUE)); 1034 1041 1035 1042 //$post_fields['content-len'] = strlen($post_fields['contents']); … … 1055 1062 { 1056 1063 SyncDebug::log(__METHOD__.'():' . __LINE__ . ' path=' . $file_path); 1064 1065 // adjust file path if running within multisite #167 1066 if (is_multisite()) { 1067 $to_dir = '/wp-content/blogs.dir/' . get_current_blog_id . '/'; 1068 $file_path = str_replace('/wp-content/files/', $to_dir, $file_path); 1069 SyncDebug::log(__METHOD__.'():' . __LINE__ . ' adjusted multisite file path to ' . $file_path); 1070 } 1071 1072 // TODO: rework to use CURLFile class and @filename specifier (for PHP < 5.5) to save memory on large files #165 1057 1073 1058 1074 // first, try file_get_contents() -
wpsitesynccontent/trunk/classes/model.php
r1907374 r1919099 121 121 $site_key = SyncOptions::get('site_key'); 122 122 123 $ where = '';123 $join = $where = ''; 124 124 if (NULL !== $type) { 125 125 $type = sanitize_key($type); … … 127 127 } 128 128 129 $join = $where = '';130 129 if ($assoc) { 131 130 $join = " LEFT JOIN `{$wpdb->posts}` ON `{$wpdb->posts}`.`ID`=`target_content_id` "; 132 $where = " AND `{$wpdb->posts}`.`ID` IS NOT NULL ";131 $where .= " AND `{$wpdb->posts}`.`ID` IS NOT NULL "; 133 132 } 134 133 $query = "SELECT * -
wpsitesynccontent/trunk/classes/options.php
r1907374 r1919099 10 10 private static $_dirty = FALSE; 11 11 12 private static $_constraints = array( 13 'match_mode' => array('title', 'slug', 'id'), 14 'min_role' => array('author', 'editor', 'administrator'), 15 'roles' => '|author|editor|administrator|', 16 ); 17 const ROLE_DELIMITER = '|'; 18 12 19 /* 13 20 * Options are: … … 21 28 * 'strict' = 1 for strict mode; otherwise 0 22 29 * 'salt' = salt value used for authentication 23 * 'min_role' = minimum role allowed to perform SYNC operations24 30 * 'remove' = remove settings/tables on plugin deactivation 25 31 * 'match_mode' = method for matching content on Target: 'title', 'slug', 'id' 26 32 * 'min_role' = minimum role required to be able to perform Sync operations #122 33 * 'roles' = Roles allowed to perform Sync operations 27 34 */ 28 35 … … 32 39 private static function _load_options() 33 40 { 34 if (NULL === self::$_options) 35 self::$_options = get_option(self::OPTION_NAME, array()); 41 if (NULL !== self::$_options) 42 return; 43 self::$_options = get_option(self::OPTION_NAME, array()); 44 SyncDebug::log(__METHOD__.'():' . __LINE__ . ' options=' . var_export(self::$_options, TRUE)); 45 if (FALSE === self::$_options) 46 self::$_options = array(); 36 47 37 48 // perform fixup / cleanup on option values...migrating from previous configuration settings … … 45 56 'strict' => '1', 46 57 'salt' => '', 47 'min_role' => '',48 58 'remove' => '0', 49 59 'match_mode' => 'title', 50 60 'min_role' => 'author', 61 'roles' => '|author|editor|administrator|', 51 62 ); 52 63 53 64 self::$_options = array_merge($defaults, self::$_options); 65 SyncDebug::log(__METHOD__.'():' . __LINE__ . ' options=' . var_export(self::$_options, TRUE)); 66 67 // adjust settings for roles if missing (newly added setting not configured; use defaults) #166 68 if (empty(self::$_options['roles']) || empty(self::$_options['min_role'])) { 69 switch (self::$_options['min_role']) { 70 case 'author': 71 default: 72 self::$_options['roles'] = '|author|editor|administrator|'; 73 break; 74 case 'editor': 75 self::$_options['rolse'] = '|editor|administrator|'; 76 break; 77 case 'admin': 78 self::$_options['roles'] = '|administrator|'; 79 break; 80 } 81 SyncDebug::log(__METHOD__.'():' . __LINE__ . ' roles are empty; setting to: ' . self::$_options['roles']); 82 } 54 83 } 55 84 … … 103 132 104 133 /** 134 * Returns an array describing known good values for each setting name 135 * @return type 136 */ 137 public static function get_constraints() 138 { 139 return self::$_constraints; 140 } 141 142 /** 105 143 * Checks to see if the site has a valid authentication to a Target site 106 144 * @return boolean TRUE if site is authorized; otherwise FALSE … … 120 158 public static function has_cap() 121 159 { 122 $min_role = self::get('min_role'); 160 $min_role = self::get('min_role', 'author'); 161 $roles = self::get('roles', ''); 162 if (empty($roles)) { 163 // if the roles are empty, adjust setting based on default roles from v1.4 164 SyncDebug::log(__METHOD__.'():' . __LINE__ . ' roles are empty; min_role=' . var_export($min_role, TRUE)); 165 switch ($min_role) { 166 case 'administrator': 167 default: 168 $roles = '|administrator|'; 169 break; 170 case 'editor': 171 $roles = '|editor|administrator|'; 172 break; 173 case 'author': 174 $roles = '|author|editor|administrator|'; 175 break; 176 } 177 } 123 178 $current_user = wp_get_current_user(); 124 179 // check to see if current user's Role is in list of allowed roles #166 180 SyncDebug::log(__METHOD__.'():' . __LINE__ . ' roles=' . var_export($roles, TRUE)); 181 foreach ($current_user->roles as $role) 182 if (FALSE !== strpos($roles, self::ROLE_DELIMITER . $role . self::ROLE_DELIMITER)) { 183 SyncDebug::log(__METHOD__.'():' . __LINE__ . ' found matching role "' . $role . '"'); 184 return TRUE; 185 } 186 return FALSE; 187 ##### 125 188 switch ($min_role) { 126 189 case 'administrator': … … 141 204 142 205 /** 143 * Updates the local copy of the option data 206 * Updates the local copy of the option data. Will not update properties that are not already in option array. 144 207 * @param string $name The name of the Sync option to update 145 208 * @param mixed $value The value to store with the name … … 149 212 self::_load_options(); 150 213 151 self::$_options[$name] = $value; 152 self::$_dirty = TRUE; 214 // don't allow setting unknown property names 215 if (isset(self::$_options[$name])) { 216 if (isset(self::$_constraints[$name]) && !in_array($value, self::$_constraints)) { 217 // current value is not a known good value for this property; abort 218 return; 219 } 220 self::$_options[$name] = $value; 221 self::$_dirty = TRUE; 222 } 153 223 } 154 224 -
wpsitesynccontent/trunk/classes/settings.php
r1907374 r1919099 19 19 { 20 20 add_action('admin_menu', array($this, 'add_configuration_page')); 21 add_action(' admin_init', array($this, 'settings_api_init'));21 add_action('current_screen'/*'admin_init'*/, array($this, 'settings_api_init')); 22 22 add_action('load-settings_page_sync', array($this, 'contextual_help')); 23 23 … … 61 61 'manage_options', // capability 62 62 self::SETTINGS_PAGE, // menu slug 63 array( &$this, 'settings_page') // callback63 array($this, 'settings_page') // callback 64 64 ); 65 65 return $slug; … … 72 72 { 73 73 //SyncDebug::log(__METHOD__.'() tab=' . $this->_tab); 74 add_filter('admin_footer_text', array( &$this, 'footer_content'));74 add_filter('admin_footer_text', array($this, 'footer_content')); 75 75 // add_action('spectrom_page', array(&$this, 'show_settings_page')); 76 76 // do_action('spectrom_page'); … … 167 167 public function settings_api_init() 168 168 { 169 // don't bother initializing if not on the WPSiteSync settings page 170 // $screen = get_current_screen(); 171 //SyncDebug::log(__METHOD__.'():' . __LINE__ . ' screen=' . var_export($screen, TRUE)); 172 // if (NULL !== $screen && 'settings_page_sync' !== $screen->id) 173 // return; 174 169 175 $this->_tab = $this->get('tab', 'general'); 170 176 //SyncDebug::log(__METHOD__.'() tab=' . $this->_tab); … … 223 229 'sync_options_group', // option group, used for settings_fields() 224 230 SyncOptions::OPTION_NAME, // option name, used as key in database 225 array( &$this, 'validate_settings') // validation callback231 array($this, 'validate_settings') // validation callback 226 232 ); 227 233 … … 245 251 'host', // field id 246 252 __('Host Name of Target:', 'wpsitesynccontent'),// title 247 array( &$this, 'render_input_field'),// callback253 array($this, 'render_input_field'), // callback 248 254 self::SETTINGS_PAGE, // page 249 255 $section_id, // section id … … 253 259 'placeholder' => empty($data['host']) ? 'http://' : '', 254 260 'size' => '50', 255 'description' => __('http://example.com - This is the URL that your Content will be Pushed to. ', 'wpsitesynccontent'),261 'description' => __('http://example.com - This is the URL that your Content will be Pushed to. If WordPress is installed in a subdirectory, include the subdirectory.', 'wpsitesynccontent'), 256 262 ) 257 263 ); … … 260 266 'username', // field id 261 267 __('Username on Target:', 'wpsitesynccontent'), // title 262 array( &$this, 'render_input_field'),// callback268 array($this, 'render_input_field'), // callback 263 269 self::SETTINGS_PAGE, // page 264 270 $section_id, // section id … … 281 287 'password', // field id 282 288 __('Password on Target:', 'wpsitesynccontent'), // title 283 array( &$this, 'render_password_field'), // callback289 array($this, 'render_password_field'), // callback 284 290 self::SETTINGS_PAGE, // page 285 291 $section_id, // section … … 306 312 'strict', // field id 307 313 __('Strict Mode:', 'wpsitesynccontent'), // title 308 array( &$this, 'render_radio_field'),// callback314 array($this, 'render_radio_field'), // callback 309 315 self::SETTINGS_PAGE, // page 310 316 $section_id, // section id … … 333 339 'match_mode', // field id 334 340 __('Content Match Mode:', 'wpsitesynccontent'), // title 335 array($this, 'render_select_field'), // callback336 self::SETTINGS_PAGE, // page337 $section_id, // section id338 array( // args341 array($this, 'render_select_field'), // callback 342 self::SETTINGS_PAGE, // page 343 $section_id, // section id 344 array( // args 339 345 'name' => 'match_mode', 340 346 'value' => $match_mode, … … 351 357 $min_role = isset($data['min_role']) ? $data['min_role'] : 'author'; 352 358 switch ($min_role) { 359 case 'author': $default_role = '|author|editor|administrator|'; 353 360 default: 354 case 'author': $desc = __('Author - User needs to have Author permissions (Author, Editor, Admin).', 'wpsitesynccontent'); 355 break; 356 case 'editor': $desc = __('Editor - User needs to have Editor permissions (Editor, Admin).', 'wpsitesynccontent'); 357 break; 358 case 'administrator': $desc = __('Admin - User needs to have Admin permissions (Admins only).', 'wpsitesynccontent'); 359 break; 360 } 361 break; 362 case 'editor': $default_role = '|editor|administrator|'; 363 break; 364 case 'admin': $default_role = '|administrator|'; 365 break; 366 } 367 // if not present, default roles based on v1.4 settings values #169 368 $roles = isset($data['roles']) ? $data['roles'] : $default_role; 361 369 362 370 add_settings_field( 363 ' min_role', // field id364 __(' Minimum Roleto use WPSiteSync:', 'wpsitesynccontent'), // title365 array($this, 'render_ select_field'),// callback371 'roles', // field id 372 __('Roles Allowed to use WPSiteSync:', 'wpsitesynccontent'), // title 373 array($this, 'render_roles_field'), // callback 366 374 self::SETTINGS_PAGE, // page 367 375 $section_id, // section id 368 376 array( // args 369 'name' => ' min_role',370 'value' => $ min_role,371 'options' => array(377 'name' => 'roles', 378 'value' => $roles, 379 /* 'options' => array( 372 380 'author' => __('Authors, Editors and Admins', 'wpsitesynccontent'), 373 381 'editor' => __('Editor and Admins', 'wpsitesynccontent'), 374 382 'administrator' => __('Admins Only', 'wpsitesynccontent'), 375 ), 376 'description' => $desc,383 ), */ 384 'description' => __('Select the Roles you wish to have access to the WPSiteSync User Interface. Only these Roles will be allowed to perform Syncing operations.', 'wpsitesynccontent'), 377 385 ) 378 386 ); … … 381 389 'salt', // field id 382 390 __('Authentication Salt:', 'wpsitesynccontent'),// title 383 array( &$this, 'render_input_field'),// callback391 array($this, 'render_input_field'), // callback 384 392 self::SETTINGS_PAGE, // page 385 393 $section_id, // section id … … 396 404 'min_role', // field id 397 405 __('Minimum Role allowed to Sync content:', 'wpsitesynccontent'), // title 398 array( &$this, 'render_select_field'), // callback406 array($this, 'render_select_field'), // callback 399 407 self::SETTINGS_PAGE, // page 400 408 $section_id, // section id … … 412 420 'remove', // field id 413 421 __('Optionally remove Settings and Tables on plugin uninstall:', 'wpsitesynccontent'), // title 414 array( &$this, 'render_radio_field'),// callback422 array($this, 'render_radio_field'), // callback 415 423 self::SETTINGS_PAGE, // page 416 424 $section_id, // section id … … 465 473 if (!empty($args['description'])) 466 474 echo '<p><em>', esc_html($args['description']), '</em></p>'; 475 } 476 477 /** 478 * Renders a list of checkboxes for Role selection 479 * @param array $args Array of arguments, containser name and options data 480 */ 481 public function render_roles_field($args) 482 { 483 // display list of available Roles #166 484 $roles = array_reverse(get_editable_roles()); 485 $allowed_roles = $args['value']; 486 foreach ($roles as $role => $caps) { 487 if (isset($caps['capabilities']['edit_posts']) && $caps['capabilities']['edit_posts']) { 488 $checked = (FALSE === strpos($allowed_roles, SyncOptions::ROLE_DELIMITER . $role . SyncOptions::ROLE_DELIMITER)) ? '' : ' checked="checked" '; 489 $disabled = ''; 490 if ('administrator' === $role) { 491 $disabled = ' disabled="disabled" '; 492 $checked = ' checked="checked" '; 493 } 494 printf('<input type="checkbox" name="spectrom_sync_settings[%s][%s]" %s %s /> %s<br/>', 495 $args['name'], $role, $checked, $disabled, $caps['name']); 496 } 497 } 498 if (!empty($args['description'])) 499 echo '<p>', esc_html($args['description']), '</p>'; 500 // echo '<pre>', var_export($roles, TRUE), '</pre>'; 467 501 } 468 502 … … 544 578 public function validate_settings($values) 545 579 { 546 //SyncDebug::log(__METHOD__.'() tab=' . $this->_tab); 580 SyncDebug::log(__METHOD__.'() tab=' . $this->_tab); 581 SyncDebug::log(__METHOD__.'():' . __LINE__ . ' values=' . var_export($values, TRUE)); 547 582 if (!current_user_can('manage_options')) 548 583 return array(); … … 558 593 $re_auth = FALSE; 559 594 595 // if no setting found for roles; default to admins only #169 596 if (!isset($values['roles'])) 597 $values['roles'] = array('administrator' => 'on'); 598 560 599 foreach ($values as $key => $value) { 561 //SyncDebug::log(" key={$key} value=[{$value}]");600 SyncDebug::log(" key={$key} value=[" . var_export($value, TRUE) . ']'); 562 601 if (empty($values[$key]) && 'password' === $key) { 563 602 // ignore this so that passwords are not required on every settings update 564 603 } else { 565 if ('password' !== $key )604 if ('password' !== $key && !is_array($value)) 566 605 $value = trim($value); // strip any whitespaces on non-password fields #73 567 606 if ('host' === $key) { … … 594 633 $out[$key] = $settings['username']; 595 634 } 635 } else if ('roles' === $key) { 636 SyncDebug::log(__METHOD__.'():' . __LINE__ . ' POST=' . var_export($_POST, TRUE)); 637 $roles = array(); 638 SyncDebug::log(__METHOD__.'():' . __LINE__ . ' value=' . var_export($value, TRUE)); 639 foreach ($value as $role => $on) { 640 $roles[] = $role; 641 } 642 if (!in_array('administrator', $roles)) 643 $roles[] = 'administrator'; // always force administrator access 644 $out[$key] = SyncOptions::ROLE_DELIMITER . implode(SyncOptions::ROLE_DELIMITER, $roles) . SyncOptions::ROLE_DELIMITER; 645 SyncDebug::log(__METHOD__.'():' . __LINE__ . ' roles: ' . $out[$key]); 596 646 } else if (0 === strlen(trim($value))) { 597 647 if (!$missing_error) { … … 721 771 '<p>' . __('<strong>Strict Mode</strong>: Select if WordPress and WPSiteSync for Content should be the same versions on the Source and the Target.', 'wpsitesynccontent') . '</p>' . 722 772 '<p>' . __('<strong>Match Mode</strong>: How WPSiteSync should match posts on the Target. You can select "Post Title" (default), or "Post Slug" to match Content by Title or Slug.', 'wpsitesynccontent') . '</p>' . 723 '<p>' . __('<strong> Minimum Role</strong>: The Minimum User Role required in order to use the features of WPSiteSync. Selecting Author means that Authors, Editors and Admins can use WPSiteSync. Selecting Editor means Editors and Admins can use WPSiteSync. Selecting Admin means that only Admins can use WPSiteSync.', 'wpsitesynccontent') . '</p>'773 '<p>' . __('<strong>Roles</strong>: The Roles that will be allowed to perform Syncing operations. Only Roles with the "edit_posts" capability will be shown. The "Administrator" Role is always allowed to perform operations.', 'wpsitesynccontent') . '</p>' 724 774 // '<p>' . __('<strong>Authentication Salt:</strong>: Enter a salt to use when Content is sent to current site or leave blank.', 'wpsitesynccontent') . '</p>' . 725 775 // '<p>' . __('<strong>Minimum Role allowed to SYNC Content</strong>: Select minimum role of user who can Sync Content to current site.', 'wpsitesynccontent') . '</p>' -
wpsitesynccontent/trunk/readme.txt
r1907374 r1919099 112 112 113 113 == Changelog == 114 = 1.4.1 - Aug 2, 2018 = 115 * enhancement: updated configuration of allowed Roles for WPSiteSync UI. Can now allow custom Roles. (Thanks Randy K.) 116 * enhancement: disable redirect by f(x) Private Site plugin on WPSiteSync API endpoint. 117 * enhancement: detect and recover from missing file attachments (Thanks Matt B.) 118 * enhancement: adjust file path when working with attachments on MultiSite installs. 119 114 120 = 1.4 - Jul 10, 2018 = 115 121 * fix: fix conversion of url to file path when Pushing media content (Thanks Jocelyn M.) -
wpsitesynccontent/trunk/wpsitesynccontent.php
r1907374 r1919099 6 6 Author: WPSiteSync 7 7 Author URI: http://wpsitesync.com 8 Version: 1.4 8 Version: 1.4.1 9 9 Text Domain: wpsitesynccontent 10 10 Domain path: /language … … 25 25 class WPSiteSyncContent 26 26 { 27 const PLUGIN_VERSION = '1.4 ';27 const PLUGIN_VERSION = '1.4.1'; 28 28 const PLUGIN_NAME = 'WPSiteSyncContent'; 29 29 … … 51 51 add_action('wp_ajax_spectrom_sync', array($this, 'check_ajax_query')); 52 52 53 add_action('plugins_loaded', array($this, 'plugins_loaded') );53 add_action('plugins_loaded', array($this, 'plugins_loaded'), 1); 54 54 55 55 // the following are needed during add-on updates to fix problem with long file names on Windows … … 203 203 public static function check_updates() 204 204 { 205 // TODO: optimize by doing checks only once every 8 hours 206 205 207 // load updater class 206 208 if (!class_exists('EDD_SL_Plugin_Updater_Sync', FALSE)) {
Note: See TracChangeset
for help on using the changeset viewer.