Changeset 3477683
- Timestamp:
- 03/09/2026 01:20:05 AM (4 weeks ago)
- Location:
- mb-rest-api
- Files:
-
- 14 edited
- 1 copied
-
tags/2.0.6 (copied) (copied from mb-rest-api/trunk)
-
tags/2.0.6/mb-rest-api.php (modified) (2 diffs)
-
tags/2.0.6/readme.txt (modified) (3 diffs)
-
tags/2.0.6/src/Post.php (modified) (1 diff)
-
tags/2.0.6/vendor/autoload.php (modified) (1 diff)
-
tags/2.0.6/vendor/composer/InstalledVersions.php (modified) (5 diffs)
-
tags/2.0.6/vendor/composer/autoload_static.php (modified) (2 diffs)
-
tags/2.0.6/vendor/composer/installed.php (modified) (2 diffs)
-
trunk/mb-rest-api.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/src/Post.php (modified) (1 diff)
-
trunk/vendor/autoload.php (modified) (1 diff)
-
trunk/vendor/composer/InstalledVersions.php (modified) (5 diffs)
-
trunk/vendor/composer/autoload_static.php (modified) (2 diffs)
-
trunk/vendor/composer/installed.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
mb-rest-api/tags/2.0.6/mb-rest-api.php
r3179748 r3477683 4 4 * Plugin URI: https://metabox.io/plugins/mb-rest-api/ 5 5 * Description: Add Meta Box custom fields to WordPress Rest API. 6 * Version: 2.0. 56 * Version: 2.0.6 7 7 * Author: MetaBox.io 8 8 * Author URI: https://metabox.io … … 10 10 * Text Domain: mb-rest-api 11 11 * Domain Path: /languages/ 12 * 13 * Copyright (C) 2010-2025 Tran Ngoc Tuan Anh. All rights reserved. 14 * 15 * This program is free software: you can redistribute it and/or modify 16 * it under the terms of the GNU General Public License as published by 17 * the Free Software Foundation, either version 2 of the License, or 18 * (at your option) any later version. 19 * 20 * This program is distributed in the hope that it will be useful, 21 * but WITHOUT ANY WARRANTY; without even the implied warranty of 22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 23 * GNU General Public License for more details. 24 * 25 * You should have received a copy of the GNU General Public License 26 * along with this program. If not, see <http://www.gnu.org/licenses/>. 12 27 */ 13 28 -
mb-rest-api/tags/2.0.6/readme.txt
r3240481 r3477683 4 4 Tags: meta box, custom fields, rest api 5 5 Requires at least: 4.1 6 Tested up to: 6. 6.27 Stable tag: 2.0. 56 Tested up to: 6.9.1 7 Stable tag: 2.0.6 8 8 Requires PHP: 7.0 9 9 License: GPLv2 or later … … 30 30 If you like this plugin, you might also like our other WordPress products: 31 31 32 - [Meta Box](https://metabox.io) - A powerful WordPress plugin for creating custom post types and custom fields.33 32 - [Slim SEO](https://wpslimseo.com) - A fast, lightweight and full-featured SEO plugin for WordPress with minimal configuration. 34 - [Slim SEO Schema](https://wpslimseo.com/products/slim-seo-schema/) - An advanced, powerful and flexible plugin to add schemas to WordPress. 35 - [Slim SEO Link Manager](https://wpslimseo.com/products/slim-seo-link-manager/) - Build internal link easier in WordPress with real-time reports. 33 - [Falcon](https://wpfalcon.pro) - A lightweight companion for making WordPress faster, cleaner, and more secure. 36 34 - [GretaThemes](https://gretathemes.com) - Free and premium WordPress themes that clean, simple and just work. 37 35 - [Auto Listings](https://wpautolistings.com) - A car sale and dealership plugin for WordPress. … … 53 51 == Changelog == 54 52 53 = 2.0.6 - 2026-03-09 = 54 - Fix updating WooCommerce products 55 55 56 = 2.0.5 - 2024-11-01 = 56 Fix direct file access57 - Fix direct file access 57 58 58 59 = 2.0.4 - 2024-08-19 = 59 Fix running PHP Codesniffer when installing & autoload the plugin's main file via Composer60 - Fix running PHP Codesniffer when installing & autoload the plugin's main file via Composer 60 61 61 62 = 2.0.3 - 2024-07-22 = -
mb-rest-api/tags/2.0.6/src/Post.php
r3110789 r3477683 6 6 class Post extends Base { 7 7 public function update( $data, $post ) { 8 if ( property_exists( $post, 'post_type' ) && 'product' === $post->post_type) {8 if ( is_object( $post ) && method_exists( $post, 'get_id' ) && ! ( $post instanceof \WP_Post ) ) { 9 9 $post_id = $post->get_id(); 10 } elseif ( $post instanceof \WP_Post ) { 11 $post_id = $post->ID; 10 12 } else { 11 $post_id = $post->ID; 13 // Fallback value 14 $post_id = isset( $post->ID ) ? $post->ID : ( isset( $post['id'] ) ? $post['id'] : 0 ); 12 15 } 13 16 -
mb-rest-api/tags/2.0.6/vendor/autoload.php
r2978013 r3477683 15 15 } 16 16 } 17 trigger_error( 18 $err, 19 E_USER_ERROR 20 ); 17 throw new RuntimeException($err); 21 18 } 22 19 -
mb-rest-api/tags/2.0.6/vendor/composer/InstalledVersions.php
r2978013 r3477683 28 28 { 29 29 /** 30 * @var string|null if set (by reflection by Composer), this should be set to the path where this class is being copied to 31 * @internal 32 */ 33 private static $selfDir = null; 34 35 /** 30 36 * @var mixed[]|null 31 37 * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null 32 38 */ 33 39 private static $installed; 40 41 /** 42 * @var bool 43 */ 44 private static $installedIsLocalDir; 34 45 35 46 /** … … 310 321 self::$installed = $data; 311 322 self::$installedByVendor = array(); 323 324 // when using reload, we disable the duplicate protection to ensure that self::$installed data is 325 // always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not, 326 // so we have to assume it does not, and that may result in duplicate data being returned when listing 327 // all installed packages for example 328 self::$installedIsLocalDir = false; 329 } 330 331 /** 332 * @return string 333 */ 334 private static function getSelfDir() 335 { 336 if (self::$selfDir === null) { 337 self::$selfDir = strtr(__DIR__, '\\', '/'); 338 } 339 340 return self::$selfDir; 312 341 } 313 342 … … 323 352 324 353 $installed = array(); 354 $copiedLocalDir = false; 325 355 326 356 if (self::$canGetVendors) { 357 $selfDir = self::getSelfDir(); 327 358 foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { 359 $vendorDir = strtr($vendorDir, '\\', '/'); 328 360 if (isset(self::$installedByVendor[$vendorDir])) { 329 361 $installed[] = self::$installedByVendor[$vendorDir]; … … 331 363 /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */ 332 364 $required = require $vendorDir.'/composer/installed.php'; 333 $installed[] = self::$installedByVendor[$vendorDir] = $required; 334 if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { 335 self::$installed = $installed[count($installed) - 1]; 365 self::$installedByVendor[$vendorDir] = $required; 366 $installed[] = $required; 367 if (self::$installed === null && $vendorDir.'/composer' === $selfDir) { 368 self::$installed = $required; 369 self::$installedIsLocalDir = true; 336 370 } 371 } 372 if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) { 373 $copiedLocalDir = true; 337 374 } 338 375 } … … 351 388 } 352 389 353 if (self::$installed !== array() ) {390 if (self::$installed !== array() && !$copiedLocalDir) { 354 391 $installed[] = self::$installed; 355 392 } -
mb-rest-api/tags/2.0.6/vendor/composer/autoload_static.php
r2978013 r3477683 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( 10 'M' => 10 'M' => 11 11 array ( 12 12 'MetaBox\\RestApi\\' => 16, … … 15 15 16 16 public static $prefixDirsPsr4 = array ( 17 'MetaBox\\RestApi\\' => 17 'MetaBox\\RestApi\\' => 18 18 array ( 19 19 0 => __DIR__ . '/../..' . '/src', -
mb-rest-api/tags/2.0.6/vendor/composer/installed.php
r3179748 r3477683 2 2 'root' => array( 3 3 'name' => 'wpmetabox/mb-rest-api', 4 'pretty_version' => '2.0. 5',5 'version' => '2.0. 5.0',6 'reference' => ' 67a67db7cd078f1994bcbb373b2777a38f1333aa',4 'pretty_version' => '2.0.6', 5 'version' => '2.0.6.0', 6 'reference' => '0fd0efb5eb49147f247bd729d76c795ea8764471', 7 7 'type' => 'wordpress-plugin', 8 8 'install_path' => __DIR__ . '/../../', … … 12 12 'versions' => array( 13 13 'wpmetabox/mb-rest-api' => array( 14 'pretty_version' => '2.0. 5',15 'version' => '2.0. 5.0',16 'reference' => ' 67a67db7cd078f1994bcbb373b2777a38f1333aa',14 'pretty_version' => '2.0.6', 15 'version' => '2.0.6.0', 16 'reference' => '0fd0efb5eb49147f247bd729d76c795ea8764471', 17 17 'type' => 'wordpress-plugin', 18 18 'install_path' => __DIR__ . '/../../', -
mb-rest-api/trunk/mb-rest-api.php
r3179748 r3477683 4 4 * Plugin URI: https://metabox.io/plugins/mb-rest-api/ 5 5 * Description: Add Meta Box custom fields to WordPress Rest API. 6 * Version: 2.0. 56 * Version: 2.0.6 7 7 * Author: MetaBox.io 8 8 * Author URI: https://metabox.io … … 10 10 * Text Domain: mb-rest-api 11 11 * Domain Path: /languages/ 12 * 13 * Copyright (C) 2010-2025 Tran Ngoc Tuan Anh. All rights reserved. 14 * 15 * This program is free software: you can redistribute it and/or modify 16 * it under the terms of the GNU General Public License as published by 17 * the Free Software Foundation, either version 2 of the License, or 18 * (at your option) any later version. 19 * 20 * This program is distributed in the hope that it will be useful, 21 * but WITHOUT ANY WARRANTY; without even the implied warranty of 22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 23 * GNU General Public License for more details. 24 * 25 * You should have received a copy of the GNU General Public License 26 * along with this program. If not, see <http://www.gnu.org/licenses/>. 12 27 */ 13 28 -
mb-rest-api/trunk/readme.txt
r3240481 r3477683 4 4 Tags: meta box, custom fields, rest api 5 5 Requires at least: 4.1 6 Tested up to: 6. 6.27 Stable tag: 2.0. 56 Tested up to: 6.9.1 7 Stable tag: 2.0.6 8 8 Requires PHP: 7.0 9 9 License: GPLv2 or later … … 30 30 If you like this plugin, you might also like our other WordPress products: 31 31 32 - [Meta Box](https://metabox.io) - A powerful WordPress plugin for creating custom post types and custom fields.33 32 - [Slim SEO](https://wpslimseo.com) - A fast, lightweight and full-featured SEO plugin for WordPress with minimal configuration. 34 - [Slim SEO Schema](https://wpslimseo.com/products/slim-seo-schema/) - An advanced, powerful and flexible plugin to add schemas to WordPress. 35 - [Slim SEO Link Manager](https://wpslimseo.com/products/slim-seo-link-manager/) - Build internal link easier in WordPress with real-time reports. 33 - [Falcon](https://wpfalcon.pro) - A lightweight companion for making WordPress faster, cleaner, and more secure. 36 34 - [GretaThemes](https://gretathemes.com) - Free and premium WordPress themes that clean, simple and just work. 37 35 - [Auto Listings](https://wpautolistings.com) - A car sale and dealership plugin for WordPress. … … 53 51 == Changelog == 54 52 53 = 2.0.6 - 2026-03-09 = 54 - Fix updating WooCommerce products 55 55 56 = 2.0.5 - 2024-11-01 = 56 Fix direct file access57 - Fix direct file access 57 58 58 59 = 2.0.4 - 2024-08-19 = 59 Fix running PHP Codesniffer when installing & autoload the plugin's main file via Composer60 - Fix running PHP Codesniffer when installing & autoload the plugin's main file via Composer 60 61 61 62 = 2.0.3 - 2024-07-22 = -
mb-rest-api/trunk/src/Post.php
r3110789 r3477683 6 6 class Post extends Base { 7 7 public function update( $data, $post ) { 8 if ( property_exists( $post, 'post_type' ) && 'product' === $post->post_type) {8 if ( is_object( $post ) && method_exists( $post, 'get_id' ) && ! ( $post instanceof \WP_Post ) ) { 9 9 $post_id = $post->get_id(); 10 } elseif ( $post instanceof \WP_Post ) { 11 $post_id = $post->ID; 10 12 } else { 11 $post_id = $post->ID; 13 // Fallback value 14 $post_id = isset( $post->ID ) ? $post->ID : ( isset( $post['id'] ) ? $post['id'] : 0 ); 12 15 } 13 16 -
mb-rest-api/trunk/vendor/autoload.php
r2978013 r3477683 15 15 } 16 16 } 17 trigger_error( 18 $err, 19 E_USER_ERROR 20 ); 17 throw new RuntimeException($err); 21 18 } 22 19 -
mb-rest-api/trunk/vendor/composer/InstalledVersions.php
r2978013 r3477683 28 28 { 29 29 /** 30 * @var string|null if set (by reflection by Composer), this should be set to the path where this class is being copied to 31 * @internal 32 */ 33 private static $selfDir = null; 34 35 /** 30 36 * @var mixed[]|null 31 37 * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null 32 38 */ 33 39 private static $installed; 40 41 /** 42 * @var bool 43 */ 44 private static $installedIsLocalDir; 34 45 35 46 /** … … 310 321 self::$installed = $data; 311 322 self::$installedByVendor = array(); 323 324 // when using reload, we disable the duplicate protection to ensure that self::$installed data is 325 // always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not, 326 // so we have to assume it does not, and that may result in duplicate data being returned when listing 327 // all installed packages for example 328 self::$installedIsLocalDir = false; 329 } 330 331 /** 332 * @return string 333 */ 334 private static function getSelfDir() 335 { 336 if (self::$selfDir === null) { 337 self::$selfDir = strtr(__DIR__, '\\', '/'); 338 } 339 340 return self::$selfDir; 312 341 } 313 342 … … 323 352 324 353 $installed = array(); 354 $copiedLocalDir = false; 325 355 326 356 if (self::$canGetVendors) { 357 $selfDir = self::getSelfDir(); 327 358 foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { 359 $vendorDir = strtr($vendorDir, '\\', '/'); 328 360 if (isset(self::$installedByVendor[$vendorDir])) { 329 361 $installed[] = self::$installedByVendor[$vendorDir]; … … 331 363 /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */ 332 364 $required = require $vendorDir.'/composer/installed.php'; 333 $installed[] = self::$installedByVendor[$vendorDir] = $required; 334 if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { 335 self::$installed = $installed[count($installed) - 1]; 365 self::$installedByVendor[$vendorDir] = $required; 366 $installed[] = $required; 367 if (self::$installed === null && $vendorDir.'/composer' === $selfDir) { 368 self::$installed = $required; 369 self::$installedIsLocalDir = true; 336 370 } 371 } 372 if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) { 373 $copiedLocalDir = true; 337 374 } 338 375 } … … 351 388 } 352 389 353 if (self::$installed !== array() ) {390 if (self::$installed !== array() && !$copiedLocalDir) { 354 391 $installed[] = self::$installed; 355 392 } -
mb-rest-api/trunk/vendor/composer/autoload_static.php
r2978013 r3477683 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( 10 'M' => 10 'M' => 11 11 array ( 12 12 'MetaBox\\RestApi\\' => 16, … … 15 15 16 16 public static $prefixDirsPsr4 = array ( 17 'MetaBox\\RestApi\\' => 17 'MetaBox\\RestApi\\' => 18 18 array ( 19 19 0 => __DIR__ . '/../..' . '/src', -
mb-rest-api/trunk/vendor/composer/installed.php
r3179748 r3477683 2 2 'root' => array( 3 3 'name' => 'wpmetabox/mb-rest-api', 4 'pretty_version' => '2.0. 5',5 'version' => '2.0. 5.0',6 'reference' => ' 67a67db7cd078f1994bcbb373b2777a38f1333aa',4 'pretty_version' => '2.0.6', 5 'version' => '2.0.6.0', 6 'reference' => '0fd0efb5eb49147f247bd729d76c795ea8764471', 7 7 'type' => 'wordpress-plugin', 8 8 'install_path' => __DIR__ . '/../../', … … 12 12 'versions' => array( 13 13 'wpmetabox/mb-rest-api' => array( 14 'pretty_version' => '2.0. 5',15 'version' => '2.0. 5.0',16 'reference' => ' 67a67db7cd078f1994bcbb373b2777a38f1333aa',14 'pretty_version' => '2.0.6', 15 'version' => '2.0.6.0', 16 'reference' => '0fd0efb5eb49147f247bd729d76c795ea8764471', 17 17 'type' => 'wordpress-plugin', 18 18 'install_path' => __DIR__ . '/../../',
Note: See TracChangeset
for help on using the changeset viewer.