Changeset 3075060
- Timestamp:
- 04/22/2024 01:48:52 PM (11 months ago)
- Location:
- zapier
- Files:
-
- 4 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
zapier/tags/1.1.0/readme.txt
r3069174 r3075060 5 5 Tested up to: 6.4 6 6 Requires PHP: 7.0 7 Stable tag: 1. 0.77 Stable tag: 1.1.0 8 8 License: Expat (MIT License) 9 9 License URI: https://spdx.org/licenses/MIT.html … … 102 102 * Updated description. 103 103 * Hotfix: Fix User-Agent header validation. 104 105 = 1.1.0 = 106 107 * Add endpoint to retrieve support fields for custom-type posts. -
zapier/tags/1.1.0/zapier.php
r3069174 r3075060 4 4 * Plugin Name: Zapier for WordPress 5 5 * Description: Zapier enables you to automatically share your posts to social media, create WordPress posts from Mailchimp newsletters, and much more. Visit https://zapier.com/apps/wordpress/integrations for more details. 6 * Version: 1. 0.76 * Version: 1.1.0 7 7 * Author: Zapier 8 8 * Author URI: https://zapier.com … … 94 94 'permission_callback' => '__return_true' 95 95 )); 96 97 register_rest_route($this->namespace, '/(?P<type>[a-zA-Z0-9_-]+)/supports', array( 98 'methods' => "GET", 99 'callback' => array($this, 'get_custom_type_supports'), 100 'permission_callback' => '__return_true' 101 )); 102 } 103 104 public function get_custom_type_supports($request) 105 { 106 $type = $request['type']; 107 $types = get_post_types(array()); 108 109 if(!in_array($type, $types)) { 110 return new WP_Error( 111 'invalid_post_type', 112 'Invalid post type', 113 array( 114 'status' => 404, 115 ) 116 ); 117 } 118 119 return array('supports' => get_all_post_type_supports($type)); 96 120 } 97 121 -
zapier/trunk/readme.txt
r3069174 r3075060 5 5 Tested up to: 6.4 6 6 Requires PHP: 7.0 7 Stable tag: 1. 0.77 Stable tag: 1.1.0 8 8 License: Expat (MIT License) 9 9 License URI: https://spdx.org/licenses/MIT.html … … 102 102 * Updated description. 103 103 * Hotfix: Fix User-Agent header validation. 104 105 = 1.1.0 = 106 107 * Add endpoint to retrieve support fields for custom-type posts. -
zapier/trunk/zapier.php
r3069174 r3075060 4 4 * Plugin Name: Zapier for WordPress 5 5 * Description: Zapier enables you to automatically share your posts to social media, create WordPress posts from Mailchimp newsletters, and much more. Visit https://zapier.com/apps/wordpress/integrations for more details. 6 * Version: 1. 0.76 * Version: 1.1.0 7 7 * Author: Zapier 8 8 * Author URI: https://zapier.com … … 94 94 'permission_callback' => '__return_true' 95 95 )); 96 97 register_rest_route($this->namespace, '/(?P<type>[a-zA-Z0-9_-]+)/supports', array( 98 'methods' => "GET", 99 'callback' => array($this, 'get_custom_type_supports'), 100 'permission_callback' => '__return_true' 101 )); 102 } 103 104 public function get_custom_type_supports($request) 105 { 106 $type = $request['type']; 107 $types = get_post_types(array()); 108 109 if(!in_array($type, $types)) { 110 return new WP_Error( 111 'invalid_post_type', 112 'Invalid post type', 113 array( 114 'status' => 404, 115 ) 116 ); 117 } 118 119 return array('supports' => get_all_post_type_supports($type)); 96 120 } 97 121
Note: See TracChangeset
for help on using the changeset viewer.