Changeset 2945104
- Timestamp:
- 07/30/2023 03:37:17 PM (2 years ago)
- Location:
- custom-post-types
- Files:
-
- 41 added
- 4 edited
-
tags/4.0.7 (added)
-
tags/4.0.7/assets (added)
-
tags/4.0.7/assets/css (added)
-
tags/4.0.7/assets/css/backend.css (added)
-
tags/4.0.7/assets/icon-256x256.png (added)
-
tags/4.0.7/assets/icon.svg (added)
-
tags/4.0.7/assets/js (added)
-
tags/4.0.7/assets/js/backend.js (added)
-
tags/4.0.7/custom-post-types.php (added)
-
tags/4.0.7/includes (added)
-
tags/4.0.7/includes/classes (added)
-
tags/4.0.7/includes/classes/AdminNotices.php (added)
-
tags/4.0.7/includes/classes/AdminPages.php (added)
-
tags/4.0.7/includes/classes/Api.php (added)
-
tags/4.0.7/includes/classes/Core.php (added)
-
tags/4.0.7/includes/classes/FieldGroups.php (added)
-
tags/4.0.7/includes/classes/PostTypes.php (added)
-
tags/4.0.7/includes/classes/Taxonomies.php (added)
-
tags/4.0.7/includes/classes/Utils.php (added)
-
tags/4.0.7/includes/fields (added)
-
tags/4.0.7/includes/fields/checkbox.php (added)
-
tags/4.0.7/includes/fields/color.php (added)
-
tags/4.0.7/includes/fields/date.php (added)
-
tags/4.0.7/includes/fields/email.php (added)
-
tags/4.0.7/includes/fields/file.php (added)
-
tags/4.0.7/includes/fields/html.php (added)
-
tags/4.0.7/includes/fields/number.php (added)
-
tags/4.0.7/includes/fields/post_rel.php (added)
-
tags/4.0.7/includes/fields/pro-only.php (added)
-
tags/4.0.7/includes/fields/radio.php (added)
-
tags/4.0.7/includes/fields/repeater.php (added)
-
tags/4.0.7/includes/fields/select.php (added)
-
tags/4.0.7/includes/fields/tax_rel.php (added)
-
tags/4.0.7/includes/fields/tel.php (added)
-
tags/4.0.7/includes/fields/text.php (added)
-
tags/4.0.7/includes/fields/textarea.php (added)
-
tags/4.0.7/includes/fields/time.php (added)
-
tags/4.0.7/includes/fields/tinymce.php (added)
-
tags/4.0.7/includes/views (added)
-
tags/4.0.7/includes/views/tools.php (added)
-
tags/4.0.7/readme.txt (added)
-
trunk/custom-post-types.php (modified) (2 diffs)
-
trunk/includes/classes/Core.php (modified) (2 diffs)
-
trunk/includes/classes/FieldGroups.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
custom-post-types/trunk/custom-post-types.php
r2944690 r2945104 12 12 13 13 use CustomPostTypes\includes\classes\Core; 14 use CustomPostTypes\includes\classes\Utils; 14 15 15 16 if (!defined('ABSPATH')) { … … 47 48 48 49 do_action('custom_post_types_plugin_loaded'); 50 51 $currentVersion = Utils::getInfo('version'); 52 register_activation_hook(__FILE__, function () use ($currentVersion) { 53 $request_url = add_query_arg( 54 ['id' => 92, 'action' => 'activate', 'domain' => md5(get_home_url()), 'v' => $currentVersion], 55 'https://totalpress.org/wp-json/totalpress/v1/plugin-growth' 56 ); 57 wp_remote_get($request_url); 58 }); 59 register_deactivation_hook(__FILE__, function () use ($currentVersion) { 60 $request_url = add_query_arg( 61 ['id' => 92, 'action' => 'deactivate', 'domain' => md5(get_home_url()), 'v' => $currentVersion], 62 'https://totalpress.org/wp-json/totalpress/v1/plugin-growth' 63 ); 64 wp_remote_get($request_url); 65 }); -
custom-post-types/trunk/includes/classes/Core.php
r2944690 r2945104 48 48 $this->ajaxAction(); 49 49 $this->applyUpdates(); 50 $this->pluginActions();51 50 // Lets go 52 51 $this->initRegisteredContents(); … … 773 772 } 774 773 775 private function pluginActions()776 {777 $currentVersion = Utils::getInfo('version');778 register_activation_hook(__FILE__, function () use ($currentVersion) {779 $request_url = add_query_arg(780 ['id' => 92, 'action' => 'activate', 'domain' => md5(get_home_url()), 'v' => $currentVersion],781 'https://totalpress.org/wp-json/totalpress/v1/plugin-growth'782 );783 wp_remote_get($request_url);784 });785 register_deactivation_hook(__FILE__, function () use ($currentVersion) {786 $request_url = add_query_arg(787 ['id' => 92, 'action' => 'deactivate', 'domain' => md5(get_home_url()), 'v' => $currentVersion],788 'https://totalpress.org/wp-json/totalpress/v1/plugin-growth'789 );790 wp_remote_get($request_url);791 });792 }793 794 774 /** 795 775 * @return void -
custom-post-types/trunk/includes/classes/FieldGroups.php
r2944690 r2945104 349 349 $groupId = $config['id']; 350 350 351 if(!empty($config['show_in_rest'])){352 $fields = !empty($config['fields']) && is_array($config['fields']) ? $config['fields'] : [];353 add_action( 'rest_api_init', function () use ($postType, $groupId, $fields) {354 register_rest_field($postType, $groupId, ['get_callback' => function($item) use ($fields) {355 return $fields;356 }]);357 });358 }351 // if(!empty($config['show_in_rest'])){ 352 // $fields = !empty($config['fields']) && is_array($config['fields']) ? $config['fields'] : []; 353 // add_action( 'rest_api_init', function () use ($postType, $groupId, $fields) { 354 // register_rest_field($postType, $groupId, ['get_callback' => function($item) use ($fields) { 355 // return $fields; 356 // }]); 357 // }); 358 // } 359 359 360 360 add_action('add_meta_boxes', function ($posttype) use ($postType, $config) { -
custom-post-types/trunk/readme.txt
r2944690 r2945104 5 5 Requires at least: 4.0 6 6 Tested up to: 6.2 7 Stable tag: 4.0. 67 Stable tag: 4.0.7 8 8 Requires PHP: 5.6 9 9 License: GPLv2 or later … … 199 199 == Changelog == 200 200 201 = 4.0.7 = 202 *2023-07-30* 203 * Activation/deactivation actions 204 201 205 = 4.0.6 = 202 *2023- 27-28*206 *2023-07-28* 203 207 * Performance improvments 204 208
Note: See TracChangeset
for help on using the changeset viewer.