Changeset 3802069
- Timestamp:
- 11/14/2026 02:18:23 PM (less than one hour ago)
- Location:
- mega-ai
- Files:
-
- 2 added
- 4 edited
- 1 copied
-
tags/2.44.0 (copied) (copied from mega-ai/trunk )
-
tags/2.44.0/custom-fields.php (added)
-
tags/2.44.0/mega.php (modified) (5 diffs)
-
tags/2.44.0/readme.txt (modified) (2 diffs)
-
trunk/custom-fields.php (added)
-
trunk/mega.php (modified) (5 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
mega-ai/tags/2.44.0/mega.php
r3801985 r3802069 3 3 Plugin Name: MEGA AI 4 4 Description: Connect your WordPress website to MEGA for automated SEO optimization and content management. 5 Version: 2.4 3.05 Version: 2.44.0 6 6 Author: MEGA 7 7 Author URI: https://gomega.ai … … 88 88 try { if (MegaModules::present('template-preview.php', 'sandbox.php', 'sandbox-helpers.php')) { require_once(__DIR__ . '/template-preview.php'); } } catch (\Throwable $e) { MegaModules::fail('template-preview.php', $e); } 89 89 try { if (MegaModules::present('page-duplicate.php', 'sandbox.php', 'sandbox-helpers.php')) { require_once(__DIR__ . '/page-duplicate.php'); } } catch (\Throwable $e) { MegaModules::fail('page-duplicate.php', $e); } 90 try { if (MegaModules::present('custom-fields.php')) { require_once(__DIR__ . '/custom-fields.php'); } } catch (\Throwable $e) { MegaModules::fail('custom-fields.php', $e); } 90 91 try { if (MegaModules::present('phone-replace.php')) { require_once(__DIR__ . '/phone-replace.php'); } } catch (\Throwable $e) { MegaModules::fail('phone-replace.php', $e); } 91 92 try { if (MegaModules::present('woocommerce-webhook.php')) { require_once(__DIR__ . '/woocommerce-webhook.php'); } } catch (\Throwable $e) { MegaModules::fail('woocommerce-webhook.php', $e); } … … 114 115 115 116 private static $namespace = 'mega'; 116 private static $version = '2.4 3.0';117 private static $version = '2.44.0'; 117 118 118 119 // Editor (widget) endpoints. … … 834 835 'permission_callback' => array($this, 'check_authenticated_permission') 835 836 ), 837 )); 838 839 // Where a page's text is stored outside its builder (v2.44.0): ACF fields, public post meta, theme mods and ACF 840 // options, read only, optional `contains` filter. See custom-fields.php. 841 \register_rest_route(self::$namespace . '/v1', '/editor/custom-fields/(?P<id>\d+)', array( 842 'methods' => \WP_REST_Server::READABLE, 843 'callback' => array($this, 'get_editor_custom_fields'), 844 'permission_callback' => array($this, 'check_authenticated_permission') 836 845 )); 837 846 … … 4220 4229 } 4221 4230 return array('tree' => $tree, 'empty' => $empty, 'info' => $info, 'filled' => $filled, 'offsets' => $offsets, 'ids' => $ids); 4231 } 4232 4233 /** 4234 * GET /mega/v1/editor/custom-fields/{id}[?contains=text] 4235 * 4236 * Read only: the post's ACF fields, public post meta, the theme's customizer values and ACF options, each with 4237 * its source and the key a write must address. See custom-fields.php. 4238 */ 4239 public function get_editor_custom_fields(\WP_REST_Request $request) { 4240 if (!MegaModules::loaded('custom-fields.php')) { 4241 return $this->editor_error('MODULE_UNAVAILABLE', 'The custom-fields module is not loaded on this site.', 503); 4242 } 4243 $contains = $request->get_param('contains'); 4244 $result = MegaCustomFields::read((int) $request['id'], is_string($contains) ? $contains : ''); 4245 return \is_wp_error($result) ? $result : new \WP_REST_Response($result); 4222 4246 } 4223 4247 -
mega-ai/tags/2.44.0/readme.txt
r3801985 r3802069 4 4 Requires at least: 4.4 5 5 Tested up to: 6.8 6 Stable tag: 2.4 3.06 Stable tag: 2.44.0 7 7 Requires PHP: 7.2 8 8 License: GPLv2 or later … … 149 149 150 150 == Changelog == 151 = 2.44.0 = 152 * Feature: a signed, read-only route lists where a page's text is stored outside its page builder: the page's ACF fields, its public custom fields, the active theme's customizer values and ACF options-page fields, each with where it lives and the key a later edit would name, and an optional search for a phrase. Values that look like credentials are never returned. Nothing is changed. 151 153 = 2.43.0 = 152 154 * Fix: guarded menu edits no longer reorder a live menu whose stored item order is not exactly 1 to N (a first item stored at 0, gaps left by a removal, values written by the older menu sync): an edit that does not move an item leaves every item where it was, and an add, reorder or restore writes the whole order. A page, category or archive link whose title is empty or the same as its target now reads back as verified. Submitted menu text can no longer carry script (it is cleaned the same way for a preview and a write), backslashes are kept, values WordPress would silently change (such as a numeric character reference) are refused, an add to a menu that already has 500 items is refused before anything is written and a menu over the limit can be cut back, a menu that has an item WordPress does not list (a link to a trashed page, a draft item) is refused before any write, a custom link can no longer be edited to an empty title or address, text an edit did not name is left exactly as stored even on a site whose save filters would strip it (icon markup in a menu title, for example), and a restore is refused on a menu that is already over the limit. -
mega-ai/trunk/mega.php
r3801985 r3802069 3 3 Plugin Name: MEGA AI 4 4 Description: Connect your WordPress website to MEGA for automated SEO optimization and content management. 5 Version: 2.4 3.05 Version: 2.44.0 6 6 Author: MEGA 7 7 Author URI: https://gomega.ai … … 88 88 try { if (MegaModules::present('template-preview.php', 'sandbox.php', 'sandbox-helpers.php')) { require_once(__DIR__ . '/template-preview.php'); } } catch (\Throwable $e) { MegaModules::fail('template-preview.php', $e); } 89 89 try { if (MegaModules::present('page-duplicate.php', 'sandbox.php', 'sandbox-helpers.php')) { require_once(__DIR__ . '/page-duplicate.php'); } } catch (\Throwable $e) { MegaModules::fail('page-duplicate.php', $e); } 90 try { if (MegaModules::present('custom-fields.php')) { require_once(__DIR__ . '/custom-fields.php'); } } catch (\Throwable $e) { MegaModules::fail('custom-fields.php', $e); } 90 91 try { if (MegaModules::present('phone-replace.php')) { require_once(__DIR__ . '/phone-replace.php'); } } catch (\Throwable $e) { MegaModules::fail('phone-replace.php', $e); } 91 92 try { if (MegaModules::present('woocommerce-webhook.php')) { require_once(__DIR__ . '/woocommerce-webhook.php'); } } catch (\Throwable $e) { MegaModules::fail('woocommerce-webhook.php', $e); } … … 114 115 115 116 private static $namespace = 'mega'; 116 private static $version = '2.4 3.0';117 private static $version = '2.44.0'; 117 118 118 119 // Editor (widget) endpoints. … … 834 835 'permission_callback' => array($this, 'check_authenticated_permission') 835 836 ), 837 )); 838 839 // Where a page's text is stored outside its builder (v2.44.0): ACF fields, public post meta, theme mods and ACF 840 // options, read only, optional `contains` filter. See custom-fields.php. 841 \register_rest_route(self::$namespace . '/v1', '/editor/custom-fields/(?P<id>\d+)', array( 842 'methods' => \WP_REST_Server::READABLE, 843 'callback' => array($this, 'get_editor_custom_fields'), 844 'permission_callback' => array($this, 'check_authenticated_permission') 836 845 )); 837 846 … … 4220 4229 } 4221 4230 return array('tree' => $tree, 'empty' => $empty, 'info' => $info, 'filled' => $filled, 'offsets' => $offsets, 'ids' => $ids); 4231 } 4232 4233 /** 4234 * GET /mega/v1/editor/custom-fields/{id}[?contains=text] 4235 * 4236 * Read only: the post's ACF fields, public post meta, the theme's customizer values and ACF options, each with 4237 * its source and the key a write must address. See custom-fields.php. 4238 */ 4239 public function get_editor_custom_fields(\WP_REST_Request $request) { 4240 if (!MegaModules::loaded('custom-fields.php')) { 4241 return $this->editor_error('MODULE_UNAVAILABLE', 'The custom-fields module is not loaded on this site.', 503); 4242 } 4243 $contains = $request->get_param('contains'); 4244 $result = MegaCustomFields::read((int) $request['id'], is_string($contains) ? $contains : ''); 4245 return \is_wp_error($result) ? $result : new \WP_REST_Response($result); 4222 4246 } 4223 4247 -
mega-ai/trunk/readme.txt
r3801985 r3802069 4 4 Requires at least: 4.4 5 5 Tested up to: 6.8 6 Stable tag: 2.4 3.06 Stable tag: 2.44.0 7 7 Requires PHP: 7.2 8 8 License: GPLv2 or later … … 149 149 150 150 == Changelog == 151 = 2.44.0 = 152 * Feature: a signed, read-only route lists where a page's text is stored outside its page builder: the page's ACF fields, its public custom fields, the active theme's customizer values and ACF options-page fields, each with where it lives and the key a later edit would name, and an optional search for a phrase. Values that look like credentials are never returned. Nothing is changed. 151 153 = 2.43.0 = 152 154 * Fix: guarded menu edits no longer reorder a live menu whose stored item order is not exactly 1 to N (a first item stored at 0, gaps left by a removal, values written by the older menu sync): an edit that does not move an item leaves every item where it was, and an add, reorder or restore writes the whole order. A page, category or archive link whose title is empty or the same as its target now reads back as verified. Submitted menu text can no longer carry script (it is cleaned the same way for a preview and a write), backslashes are kept, values WordPress would silently change (such as a numeric character reference) are refused, an add to a menu that already has 500 items is refused before anything is written and a menu over the limit can be cut back, a menu that has an item WordPress does not list (a link to a trashed page, a draft item) is refused before any write, a custom link can no longer be edited to an empty title or address, text an edit did not name is left exactly as stored even on a site whose save filters would strip it (icon markup in a menu title, for example), and a restore is refused on a menu that is already over the limit.
Note:
See TracChangeset
for help on using the changeset viewer.