Changeset 2883308
- Timestamp:
- 03/20/2023 08:57:09 AM (3 years ago)
- Location:
- integromat-connector
- Files:
-
- 12 edited
- 1 copied
-
tags/1.5.5 (copied) (copied from integromat-connector/trunk)
-
tags/1.5.5/class/class-rest-request.php (modified) (1 diff)
-
tags/1.5.5/class/class-user.php (modified) (1 diff)
-
tags/1.5.5/index.php (modified) (2 diffs)
-
tags/1.5.5/readme.txt (modified) (1 diff)
-
tags/1.5.5/settings/class-controller.php (modified) (1 diff)
-
tags/1.5.5/settings/object-types/custom-taxonomy.php (modified) (2 diffs)
-
trunk/class/class-rest-request.php (modified) (1 diff)
-
trunk/class/class-user.php (modified) (1 diff)
-
trunk/index.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/settings/class-controller.php (modified) (1 diff)
-
trunk/settings/object-types/custom-taxonomy.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
integromat-connector/tags/1.5.5/class/class-rest-request.php
r2783423 r2883308 42 42 43 43 /** 44 * @param WP_REST_Response $response44 * @param /WP_REST_Response $response 45 45 * @param array $response_data 46 46 */ -
integromat-connector/tags/1.5.5/class/class-user.php
r2783423 r2883308 11 11 */ 12 12 public static function get_administrator_user() { 13 $users = get_users( );13 $users = get_users( array( 'role__in' => array( 'administrator') ) ); 14 14 if ( empty( $users ) ) { 15 15 return 0; -
integromat-connector/tags/1.5.5/index.php
r2793954 r2883308 3 3 /** 4 4 * @package Integromat_Connector 5 * @version 1.5. 45 * @version 1.5.5 6 6 */ 7 7 … … 11 11 Author: Celonis s.r.o. 12 12 Author URI: https://www.make.com/en?utm_source=wordpress&utm_medium=partner&utm_campaign=wordpress-partner-make 13 Version: 1.5. 413 Version: 1.5.5 14 14 */ 15 15 -
integromat-connector/tags/1.5.5/readme.txt
r2793954 r2883308 3 3 Tags: rest, api, rest api, integromat, endpoint, endpoints, meta, data, meta_data, make 4 4 Requires at least: 5.0 5 Tested up to: 6. 0.15 Tested up to: 6.1.1 6 6 Requires PHP: 5.6 7 Stable tag: 1.5. 47 Stable tag: 1.5.5 8 8 License: GPLv2 or later 9 9 -
integromat-connector/tags/1.5.5/settings/class-controller.php
r2783423 r2883308 56 56 } 57 57 58 add_filter( "pre_update_option_integromat_api_options_taxonomy", function ($new_value, $old_value) { 59 60 $updated_taxonomies = empty( $new_value ) ? array() : $new_value; 61 62 $taxonomies = get_taxonomies( array( '_builtin' => false, 'public' => true ) ); 63 foreach ( $taxonomies as $key ) { 64 if ( ! in_array( $key, array_keys( $updated_taxonomies ) ) ) { 65 $updated_taxonomies[ $key ] = "0"; 66 } 67 } 68 69 return $updated_taxonomies; 70 71 }, 10, 2 ); 72 58 73 add_filter( 59 74 'register_taxonomy_args', 60 function ( $args, $taxonomy_name ) { 61 $o = get_option( 'integromat_api_options_taxonomy' ); 62 // Option doesn't exist, run with default params. 63 $not_exists = is_bool( $o ) && $o === false; 64 // otherwise run with settings. 65 if ( false === $not_exists ) { 66 $enabled_taxonomies = empty( $o ) ? array() : array_keys( $o ); 67 if ( in_array( $taxonomy_name, $enabled_taxonomies ) ) { 68 $args['show_in_rest'] = true; 69 } else { 70 $args['show_in_rest'] = false; 71 } 75 function ($args, $taxonomy_name) { 76 77 if ( ( isset( $args['_builtin'] ) && $args['_builtin'] ) || ( isset( $args['public'] ) && ! $args['public'] ) ) { 78 return $args; 79 } 80 81 $optn = get_option( 'integromat_api_options_taxonomy' ); 82 83 if ( false === $optn ) { 84 // option doesn't exist in db, run with everything default. 85 return $args; 86 } 87 88 $saved_taxonomies = empty( $optn ) ? array() : array_keys( $optn ); 89 90 if ( in_array( $taxonomy_name, $saved_taxonomies ) ) { 91 $args['show_in_rest'] = (boolean) $optn[ $taxonomy_name ]; 72 92 } 73 93 return $args; -
integromat-connector/tags/1.5.5/settings/object-types/custom-taxonomy.php
r2783423 r2883308 18 18 ); 19 19 20 $taxonomies = get_taxonomies( );20 $taxonomies = get_taxonomies(array('_builtin' => false, 'public' => true)); 21 21 foreach ( $taxonomies as $tax_slug ) { 22 22 add_settings_field( … … 25 25 function ( $args ) { 26 26 $taxonomy = get_taxonomy( $args['label_for'] ); 27 $options = get_option( 'integromat_api_options_taxonomy' ); 28 // check if taxonomy is generally enabled. 29 $is_enabled = empty( $taxonomy->show_in_rest ) ? false : true; 30 // check if taxonomy enabled in plugin settings. 31 $is_enabled_in_plugin = isset( $options[ $args['label_for'] ] ) && $options[ $args['label_for'] ] == 1 ? true : false; 32 $checked = $is_enabled || $is_enabled_in_plugin ? 'checked' : ''; 27 $checked = !empty( $taxonomy->show_in_rest ) ? 'checked' : ''; 33 28 ?> 34 29 <input type="checkbox" -
integromat-connector/trunk/class/class-rest-request.php
r2783423 r2883308 42 42 43 43 /** 44 * @param WP_REST_Response $response44 * @param /WP_REST_Response $response 45 45 * @param array $response_data 46 46 */ -
integromat-connector/trunk/class/class-user.php
r2783423 r2883308 11 11 */ 12 12 public static function get_administrator_user() { 13 $users = get_users( );13 $users = get_users( array( 'role__in' => array( 'administrator') ) ); 14 14 if ( empty( $users ) ) { 15 15 return 0; -
integromat-connector/trunk/index.php
r2793954 r2883308 3 3 /** 4 4 * @package Integromat_Connector 5 * @version 1.5. 45 * @version 1.5.5 6 6 */ 7 7 … … 11 11 Author: Celonis s.r.o. 12 12 Author URI: https://www.make.com/en?utm_source=wordpress&utm_medium=partner&utm_campaign=wordpress-partner-make 13 Version: 1.5. 413 Version: 1.5.5 14 14 */ 15 15 -
integromat-connector/trunk/readme.txt
r2793954 r2883308 3 3 Tags: rest, api, rest api, integromat, endpoint, endpoints, meta, data, meta_data, make 4 4 Requires at least: 5.0 5 Tested up to: 6. 0.15 Tested up to: 6.1.1 6 6 Requires PHP: 5.6 7 Stable tag: 1.5. 47 Stable tag: 1.5.5 8 8 License: GPLv2 or later 9 9 -
integromat-connector/trunk/settings/class-controller.php
r2783423 r2883308 56 56 } 57 57 58 add_filter( "pre_update_option_integromat_api_options_taxonomy", function ($new_value, $old_value) { 59 60 $updated_taxonomies = empty( $new_value ) ? array() : $new_value; 61 62 $taxonomies = get_taxonomies( array( '_builtin' => false, 'public' => true ) ); 63 foreach ( $taxonomies as $key ) { 64 if ( ! in_array( $key, array_keys( $updated_taxonomies ) ) ) { 65 $updated_taxonomies[ $key ] = "0"; 66 } 67 } 68 69 return $updated_taxonomies; 70 71 }, 10, 2 ); 72 58 73 add_filter( 59 74 'register_taxonomy_args', 60 function ( $args, $taxonomy_name ) { 61 $o = get_option( 'integromat_api_options_taxonomy' ); 62 // Option doesn't exist, run with default params. 63 $not_exists = is_bool( $o ) && $o === false; 64 // otherwise run with settings. 65 if ( false === $not_exists ) { 66 $enabled_taxonomies = empty( $o ) ? array() : array_keys( $o ); 67 if ( in_array( $taxonomy_name, $enabled_taxonomies ) ) { 68 $args['show_in_rest'] = true; 69 } else { 70 $args['show_in_rest'] = false; 71 } 75 function ($args, $taxonomy_name) { 76 77 if ( ( isset( $args['_builtin'] ) && $args['_builtin'] ) || ( isset( $args['public'] ) && ! $args['public'] ) ) { 78 return $args; 79 } 80 81 $optn = get_option( 'integromat_api_options_taxonomy' ); 82 83 if ( false === $optn ) { 84 // option doesn't exist in db, run with everything default. 85 return $args; 86 } 87 88 $saved_taxonomies = empty( $optn ) ? array() : array_keys( $optn ); 89 90 if ( in_array( $taxonomy_name, $saved_taxonomies ) ) { 91 $args['show_in_rest'] = (boolean) $optn[ $taxonomy_name ]; 72 92 } 73 93 return $args; -
integromat-connector/trunk/settings/object-types/custom-taxonomy.php
r2783423 r2883308 18 18 ); 19 19 20 $taxonomies = get_taxonomies( );20 $taxonomies = get_taxonomies(array('_builtin' => false, 'public' => true)); 21 21 foreach ( $taxonomies as $tax_slug ) { 22 22 add_settings_field( … … 25 25 function ( $args ) { 26 26 $taxonomy = get_taxonomy( $args['label_for'] ); 27 $options = get_option( 'integromat_api_options_taxonomy' ); 28 // check if taxonomy is generally enabled. 29 $is_enabled = empty( $taxonomy->show_in_rest ) ? false : true; 30 // check if taxonomy enabled in plugin settings. 31 $is_enabled_in_plugin = isset( $options[ $args['label_for'] ] ) && $options[ $args['label_for'] ] == 1 ? true : false; 32 $checked = $is_enabled || $is_enabled_in_plugin ? 'checked' : ''; 27 $checked = !empty( $taxonomy->show_in_rest ) ? 'checked' : ''; 33 28 ?> 34 29 <input type="checkbox"
Note: See TracChangeset
for help on using the changeset viewer.