Changeset 3270362
- Timestamp:
- 04/10/2025 11:08:50 AM (11 months ago)
- Location:
- crowdaa-sync
- Files:
-
- 4 edited
- 43 copied
-
tags/2.1.0 (copied) (copied from crowdaa-sync/trunk)
-
tags/2.1.0/CHANGELOG (copied) (copied from crowdaa-sync/trunk/CHANGELOG) (1 diff)
-
tags/2.1.0/README.txt (copied) (copied from crowdaa-sync/trunk/README.txt) (1 diff)
-
tags/2.1.0/admin/class-crowdaa-sync-add-info-api.php (copied) (copied from crowdaa-sync/trunk/admin/class-crowdaa-sync-add-info-api.php)
-
tags/2.1.0/admin/class-crowdaa-sync-add-info-wp.php (copied) (copied from crowdaa-sync/trunk/admin/class-crowdaa-sync-add-info-wp.php)
-
tags/2.1.0/admin/class-crowdaa-sync-admin-display.php (copied) (copied from crowdaa-sync/trunk/admin/class-crowdaa-sync-admin-display.php)
-
tags/2.1.0/admin/class-crowdaa-sync-admin.php (copied) (copied from crowdaa-sync/trunk/admin/class-crowdaa-sync-admin.php)
-
tags/2.1.0/admin/class-crowdaa-sync-api.php (copied) (copied from crowdaa-sync/trunk/admin/class-crowdaa-sync-api.php)
-
tags/2.1.0/admin/class-crowdaa-sync-ext-hooks.php (copied) (copied from crowdaa-sync/trunk/admin/class-crowdaa-sync-ext-hooks.php)
-
tags/2.1.0/admin/class-crowdaa-sync-rest-api.php (copied) (copied from crowdaa-sync/trunk/admin/class-crowdaa-sync-rest-api.php) (1 diff)
-
tags/2.1.0/admin/class-crowdaa-sync-wp-hooks.php (copied) (copied from crowdaa-sync/trunk/admin/class-crowdaa-sync-wp-hooks.php)
-
tags/2.1.0/admin/css/crowdaa-sync-admin.css (copied) (copied from crowdaa-sync/trunk/admin/css/crowdaa-sync-admin.css)
-
tags/2.1.0/admin/js/crowdaa-sync-admin.js (copied) (copied from crowdaa-sync/trunk/admin/js/crowdaa-sync-admin.js)
-
tags/2.1.0/admin/partials/crowdaa-sync-admin-display.php (copied) (copied from crowdaa-sync/trunk/admin/partials/crowdaa-sync-admin-display.php)
-
tags/2.1.0/crowdaa-sync.php (copied) (copied from crowdaa-sync/trunk/crowdaa-sync.php) (2 diffs)
-
tags/2.1.0/includes/class-crowdaa-sync-activator.php (copied) (copied from crowdaa-sync/trunk/includes/class-crowdaa-sync-activator.php)
-
tags/2.1.0/includes/class-crowdaa-sync-deactivator.php (copied) (copied from crowdaa-sync/trunk/includes/class-crowdaa-sync-deactivator.php)
-
tags/2.1.0/includes/class-crowdaa-sync-exception.php (copied) (copied from crowdaa-sync/trunk/includes/class-crowdaa-sync-exception.php)
-
tags/2.1.0/includes/class-crowdaa-sync-i18n.php (copied) (copied from crowdaa-sync/trunk/includes/class-crowdaa-sync-i18n.php)
-
tags/2.1.0/includes/class-crowdaa-sync-loader.php (copied) (copied from crowdaa-sync/trunk/includes/class-crowdaa-sync-loader.php)
-
tags/2.1.0/includes/class-crowdaa-sync-lock.php (copied) (copied from crowdaa-sync/trunk/includes/class-crowdaa-sync-lock.php)
-
tags/2.1.0/includes/class-crowdaa-sync-logs.php (copied) (copied from crowdaa-sync/trunk/includes/class-crowdaa-sync-logs.php)
-
tags/2.1.0/includes/class-crowdaa-sync-permissions.php (copied) (copied from crowdaa-sync/trunk/includes/class-crowdaa-sync-permissions.php)
-
tags/2.1.0/includes/class-crowdaa-sync-syncdb.php (copied) (copied from crowdaa-sync/trunk/includes/class-crowdaa-sync-syncdb.php)
-
tags/2.1.0/includes/class-crowdaa-sync-timer.php (copied) (copied from crowdaa-sync/trunk/includes/class-crowdaa-sync-timer.php)
-
tags/2.1.0/includes/class-crowdaa-sync-utils.php (copied) (copied from crowdaa-sync/trunk/includes/class-crowdaa-sync-utils.php)
-
tags/2.1.0/includes/class-crowdaa-sync-versions.php (copied) (copied from crowdaa-sync/trunk/includes/class-crowdaa-sync-versions.php)
-
tags/2.1.0/includes/class-crowdaa-sync.php (copied) (copied from crowdaa-sync/trunk/includes/class-crowdaa-sync.php)
-
tags/2.1.0/languages/crowdaa-sync-fr_FR.mo (copied) (copied from crowdaa-sync/trunk/languages/crowdaa-sync-fr_FR.mo)
-
tags/2.1.0/languages/crowdaa-sync-fr_FR.po (copied) (copied from crowdaa-sync/trunk/languages/crowdaa-sync-fr_FR.po)
-
tags/2.1.0/vendor/autoload.php (copied) (copied from crowdaa-sync/trunk/vendor/autoload.php)
-
tags/2.1.0/vendor/composer/ClassLoader.php (copied) (copied from crowdaa-sync/trunk/vendor/composer/ClassLoader.php)
-
tags/2.1.0/vendor/composer/InstalledVersions.php (copied) (copied from crowdaa-sync/trunk/vendor/composer/InstalledVersions.php)
-
tags/2.1.0/vendor/composer/LICENSE (copied) (copied from crowdaa-sync/trunk/vendor/composer/LICENSE)
-
tags/2.1.0/vendor/composer/autoload_classmap.php (copied) (copied from crowdaa-sync/trunk/vendor/composer/autoload_classmap.php)
-
tags/2.1.0/vendor/composer/autoload_files.php (copied) (copied from crowdaa-sync/trunk/vendor/composer/autoload_files.php)
-
tags/2.1.0/vendor/composer/autoload_namespaces.php (copied) (copied from crowdaa-sync/trunk/vendor/composer/autoload_namespaces.php)
-
tags/2.1.0/vendor/composer/autoload_psr4.php (copied) (copied from crowdaa-sync/trunk/vendor/composer/autoload_psr4.php)
-
tags/2.1.0/vendor/composer/autoload_real.php (copied) (copied from crowdaa-sync/trunk/vendor/composer/autoload_real.php)
-
tags/2.1.0/vendor/composer/autoload_static.php (copied) (copied from crowdaa-sync/trunk/vendor/composer/autoload_static.php)
-
tags/2.1.0/vendor/composer/installed.json (copied) (copied from crowdaa-sync/trunk/vendor/composer/installed.json)
-
tags/2.1.0/vendor/composer/installed.php (copied) (copied from crowdaa-sync/trunk/vendor/composer/installed.php)
-
tags/2.1.0/vendor/composer/platform_check.php (copied) (copied from crowdaa-sync/trunk/vendor/composer/platform_check.php)
-
trunk/CHANGELOG (modified) (1 diff)
-
trunk/README.txt (modified) (1 diff)
-
trunk/admin/class-crowdaa-sync-rest-api.php (modified) (1 diff)
-
trunk/crowdaa-sync.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
crowdaa-sync/tags/2.1.0/CHANGELOG
r3230431 r3270362 7 7 8 8 ## [Unreleased] 9 10 ## [2.1.0] - 2025-04-10 11 12 ### Changed 13 14 - Made some APIs permanently public (previous mistake) 15 16 ### Added 17 18 - New API to delete wp posts from the Crowdaa API 9 19 10 20 ## [2.0.2] - 2025-01-28 -
crowdaa-sync/tags/2.1.0/README.txt
r3230431 r3270362 6 6 Requires PHP: 7.3 7 7 Tested up to: 5.9 8 Stable tag: 2. 0.28 Stable tag: 2.1.0 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
crowdaa-sync/tags/2.1.0/admin/class-crowdaa-sync-rest-api.php
r3230431 r3270362 47 47 'permission_callback' => array($this, 'permission_allow_all_api'), 48 48 )); 49 register_rest_route($this->namespace_v1, 'session/checks', array( 50 'methods' => 'GET', 51 'callback' => array($this, 'session_checks'), 52 'permission_callback' => array($this, 'permission_allow_auth_api'), 53 )); 54 register_rest_route($this->namespace_v1, 'sync/badges/users', array( 55 'methods' => 'POST', 56 'callback' => array($this, 'sync_badges'), 57 'permission_callback' => array($this, 'permission_allow_all_api'), 58 )); 59 } 49 } 50 51 register_rest_route($this->namespace_v1, 'session/checks', array( 52 'methods' => 'GET', 53 'callback' => array($this, 'session_checks'), 54 'permission_callback' => array($this, 'permission_allow_auth_api'), 55 )); 56 register_rest_route($this->namespace_v1, 'sync/badges/users', array( 57 'methods' => 'POST', 58 'callback' => array($this, 'sync_badges'), 59 'permission_callback' => array($this, 'permission_allow_all_api'), 60 )); 61 62 register_rest_route($this->namespace_v1, 'sync/article/removed', array( 63 'methods' => 'POST', 64 'callback' => array($this, 'sync_article_removed'), 65 'permission_callback' => array($this, 'permission_allow_all_api'), 66 )); 67 } 68 69 public function sync_article_removed($request) 70 { 71 $response = array(); 72 $parameters = $request->get_json_params(); 73 $articleId = $parameters['articleId']; 74 75 $raw_wp_post = get_posts([ 76 'post_type' => 'post', 77 'post_status' => 'any', 78 'meta_key' => 'api_post_id', 79 'meta_compare' => '=', 80 'meta_value' => $articleId, 81 ]); 82 83 if (count($raw_wp_post) === 0) { 84 Crowdaa_Sync_Logs::log('Crowdaa_Sync_Rest_Api::sync_article_removed() : Article not found', $articleId); 85 return new WP_REST_Response($response, 200); 86 } 87 $raw_wp_post = $raw_wp_post[0]; 88 89 $crowdaa_sync_articles_api_to_wp_enabled = (get_option('crowdaa_sync_articles_api_to_wp_enabled', 'yes') === 'yes'); 90 if ($crowdaa_sync_articles_api_to_wp_enabled) { 91 wp_delete_post($raw_wp_post->ID); 92 } else { 93 delete_post_meta($raw_wp_post->ID, 'crowdaa_need_sync'); 94 delete_post_meta($raw_wp_post->ID, 'crowdaa_version'); 95 delete_post_meta($raw_wp_post->ID, 'crowdaa_last_api_update'); 96 delete_post_meta($raw_wp_post->ID, 'crowdaa_last_wp_update'); 97 delete_post_meta($raw_wp_post->ID, 'api_post_id'); 98 } 99 100 $response['removed'] = true; 101 return new WP_REST_Response($response, 200); 60 102 } 61 103 -
crowdaa-sync/tags/2.1.0/crowdaa-sync.php
r3230431 r3270362 14 14 * Plugin URI: 15 15 * Description: Plugin for synchronizing WordPress site and Crowdaa CMS 16 * Version: 2. 0.216 * Version: 2.1.0 17 17 * Requires at least: 5.5 18 18 * Requires PHP: 7.2 … … 34 34 * Uses SemVer - https://semver.org 35 35 */ 36 define('CROWDAA_SYNC_VERSION', '2. 0.2');36 define('CROWDAA_SYNC_VERSION', '2.1.0'); 37 37 define('CROWDAA_SYNC_PLUGIN_DIR', __DIR__); 38 38 define('CROWDAA_SYNC_PLUGIN_NAME', 'crowdaa-sync'); -
crowdaa-sync/trunk/CHANGELOG
r3230431 r3270362 7 7 8 8 ## [Unreleased] 9 10 ## [2.1.0] - 2025-04-10 11 12 ### Changed 13 14 - Made some APIs permanently public (previous mistake) 15 16 ### Added 17 18 - New API to delete wp posts from the Crowdaa API 9 19 10 20 ## [2.0.2] - 2025-01-28 -
crowdaa-sync/trunk/README.txt
r3230431 r3270362 6 6 Requires PHP: 7.3 7 7 Tested up to: 5.9 8 Stable tag: 2. 0.28 Stable tag: 2.1.0 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
crowdaa-sync/trunk/admin/class-crowdaa-sync-rest-api.php
r3230431 r3270362 47 47 'permission_callback' => array($this, 'permission_allow_all_api'), 48 48 )); 49 register_rest_route($this->namespace_v1, 'session/checks', array( 50 'methods' => 'GET', 51 'callback' => array($this, 'session_checks'), 52 'permission_callback' => array($this, 'permission_allow_auth_api'), 53 )); 54 register_rest_route($this->namespace_v1, 'sync/badges/users', array( 55 'methods' => 'POST', 56 'callback' => array($this, 'sync_badges'), 57 'permission_callback' => array($this, 'permission_allow_all_api'), 58 )); 59 } 49 } 50 51 register_rest_route($this->namespace_v1, 'session/checks', array( 52 'methods' => 'GET', 53 'callback' => array($this, 'session_checks'), 54 'permission_callback' => array($this, 'permission_allow_auth_api'), 55 )); 56 register_rest_route($this->namespace_v1, 'sync/badges/users', array( 57 'methods' => 'POST', 58 'callback' => array($this, 'sync_badges'), 59 'permission_callback' => array($this, 'permission_allow_all_api'), 60 )); 61 62 register_rest_route($this->namespace_v1, 'sync/article/removed', array( 63 'methods' => 'POST', 64 'callback' => array($this, 'sync_article_removed'), 65 'permission_callback' => array($this, 'permission_allow_all_api'), 66 )); 67 } 68 69 public function sync_article_removed($request) 70 { 71 $response = array(); 72 $parameters = $request->get_json_params(); 73 $articleId = $parameters['articleId']; 74 75 $raw_wp_post = get_posts([ 76 'post_type' => 'post', 77 'post_status' => 'any', 78 'meta_key' => 'api_post_id', 79 'meta_compare' => '=', 80 'meta_value' => $articleId, 81 ]); 82 83 if (count($raw_wp_post) === 0) { 84 Crowdaa_Sync_Logs::log('Crowdaa_Sync_Rest_Api::sync_article_removed() : Article not found', $articleId); 85 return new WP_REST_Response($response, 200); 86 } 87 $raw_wp_post = $raw_wp_post[0]; 88 89 $crowdaa_sync_articles_api_to_wp_enabled = (get_option('crowdaa_sync_articles_api_to_wp_enabled', 'yes') === 'yes'); 90 if ($crowdaa_sync_articles_api_to_wp_enabled) { 91 wp_delete_post($raw_wp_post->ID); 92 } else { 93 delete_post_meta($raw_wp_post->ID, 'crowdaa_need_sync'); 94 delete_post_meta($raw_wp_post->ID, 'crowdaa_version'); 95 delete_post_meta($raw_wp_post->ID, 'crowdaa_last_api_update'); 96 delete_post_meta($raw_wp_post->ID, 'crowdaa_last_wp_update'); 97 delete_post_meta($raw_wp_post->ID, 'api_post_id'); 98 } 99 100 $response['removed'] = true; 101 return new WP_REST_Response($response, 200); 60 102 } 61 103 -
crowdaa-sync/trunk/crowdaa-sync.php
r3230431 r3270362 14 14 * Plugin URI: 15 15 * Description: Plugin for synchronizing WordPress site and Crowdaa CMS 16 * Version: 2. 0.216 * Version: 2.1.0 17 17 * Requires at least: 5.5 18 18 * Requires PHP: 7.2 … … 34 34 * Uses SemVer - https://semver.org 35 35 */ 36 define('CROWDAA_SYNC_VERSION', '2. 0.2');36 define('CROWDAA_SYNC_VERSION', '2.1.0'); 37 37 define('CROWDAA_SYNC_PLUGIN_DIR', __DIR__); 38 38 define('CROWDAA_SYNC_PLUGIN_NAME', 'crowdaa-sync');
Note: See TracChangeset
for help on using the changeset viewer.