Changeset 2754211
- Timestamp:
- 07/10/2022 03:19:48 PM (4 years ago)
- Location:
- tori-ajax
- Files:
-
- 23 added
- 5 edited
-
tags/1.2.0 (added)
-
tags/1.2.0/LICENSE.txt (added)
-
tags/1.2.0/README.txt (added)
-
tags/1.2.0/assets (added)
-
tags/1.2.0/assets/screenshot-1.png (added)
-
tags/1.2.0/assets/screenshot-2.png (added)
-
tags/1.2.0/includes (added)
-
tags/1.2.0/includes/ajax (added)
-
tags/1.2.0/includes/ajax/class-toria-ajax.php (added)
-
tags/1.2.0/includes/ajax/index.php (added)
-
tags/1.2.0/includes/class-toria-activator.php (added)
-
tags/1.2.0/includes/class-toria-ajax-api.php (added)
-
tags/1.2.0/includes/class-toria-deactivator.php (added)
-
tags/1.2.0/includes/class-toria-i18n.php (added)
-
tags/1.2.0/includes/class-toria-loader.php (added)
-
tags/1.2.0/includes/class-toria.php (added)
-
tags/1.2.0/includes/index.php (added)
-
tags/1.2.0/index.php (added)
-
tags/1.2.0/languages (added)
-
tags/1.2.0/languages/index.php (added)
-
tags/1.2.0/languages/toria.pot (added)
-
tags/1.2.0/toria.php (added)
-
tags/1.2.0/uninstall.php (added)
-
trunk/README.txt (modified) (3 diffs)
-
trunk/includes/ajax/class-toria-ajax.php (modified) (2 diffs)
-
trunk/includes/class-toria-ajax-api.php (modified) (1 diff)
-
trunk/includes/class-toria.php (modified) (2 diffs)
-
trunk/toria.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tori-ajax/trunk/README.txt
r2732261 r2754211 5 5 Requires at least: 3.0.0 6 6 Tested up to: 6.0 7 Stable tag: 1. 1.07 Stable tag: 1.2.0 8 8 Requires PHP: 5.6.20 9 9 License: GPLv2 or later … … 59 59 tori_ajax();// call the function. 60 60 ~~~~ 61 62 == Documentation == 63 64 Please check out the [Tori Ajax plugin Documentation](https://toriajax.com/documentation) 61 65 62 66 == Frequently Asked Questions == … … 175 179 `apply_filters( 'toria/ajax/ajax_variables', $ajax_variables, $action, $php_callback, $script_path, $mode );` 176 180 181 = 1.2.0 = 182 *Added more parameters to some filters. 183 *The affected filters are: 184 `apply_filters( 'toria/ajax/ajax_object', $ajax_object, $action, $php_callback, $script_path, $mode, $nonce );` 185 `apply_filters( 'toria/ajax/ajax_handle', $ajax_handle, $action, $php_callback, $script_path, $mode, $nonce, $ajax_object );` 186 `apply_filters( 'toria/ajax/script_depends', $script_depends, $action, $php_callback, $script_path, $mode, $nonce, $ajax_object, $ajax_handle );` 187 `apply_filters( 'toria/ajax/script_version', $script_version, $action, $php_callback, $script_path, $mode, $nonce, $ajax_object, $ajax_handle, $script_depends );` 188 `apply_filters( 'toria/ajax/script_in_footer', $script_in_footer, $action, $php_callback, $script_path, $mode, $nonce, $ajax_object, $ajax_handle, $script_depends, $script_version );` 189 `apply_filters( 'toria/ajax/ajax_variables', $ajax_variables, $action, $php_callback, $script_path, $mode, $nonce, $ajax_object, $ajax_handle, $script_depends, $script_version, $script_in_footer );` 177 190 178 191 == Upgrade Notice == 179 192 180 = 1. 1.0 =181 * Added filters for the variables and compatible with WordPress 6.0.193 = 1.2.0 = 194 * Added more parameters to some filters. 182 195 183 196 == About == -
tori-ajax/trunk/includes/ajax/class-toria-ajax.php
r2732261 r2754211 172 172 $this->mode = apply_filters( 'toria/ajax/mode', $mode, $this->action, $this->php_callback, $this->script_path );// phpcs:ignore 173 173 $this->nonce = apply_filters( 'toria/ajax/nonce', $nonce, $this->action, $this->php_callback, $this->script_path, $this->mode );// phpcs:ignore 174 $this->ajax_object = apply_filters( 'toria/ajax/ajax_object', $ajax_object, $this->action, $this->php_callback, $this->script_path, $this->mode );// phpcs:ignore175 $this->ajax_handle = apply_filters( 'toria/ajax/ajax_handle', $ajax_handle, $this->action, $this->php_callback, $this->script_path, $this->mode );// phpcs:ignore176 $this->script_depends = apply_filters( 'toria/ajax/script_depends', $script_depends, $this->action, $this->php_callback, $this->script_path, $this->mode );// phpcs:ignore177 $this->script_version = apply_filters( 'toria/ajax/script_version', $script_version, $this->action, $this->php_callback, $this->script_path, $this->mode );// phpcs:ignore178 $this->script_in_footer = apply_filters( 'toria/ajax/script_in_footer', $script_in_footer, $this->action, $this->php_callback, $this->script_path, $this->mode );// phpcs:ignore174 $this->ajax_object = apply_filters( 'toria/ajax/ajax_object', $ajax_object, $this->action, $this->php_callback, $this->script_path, $this->mode, $this->nonce );// phpcs:ignore 175 $this->ajax_handle = apply_filters( 'toria/ajax/ajax_handle', $ajax_handle, $this->action, $this->php_callback, $this->script_path, $this->mode, $this->nonce, $this->ajax_object );// phpcs:ignore 176 $this->script_depends = apply_filters( 'toria/ajax/script_depends', $script_depends, $this->action, $this->php_callback, $this->script_path, $this->mode, $this->nonce, $this->ajax_object, $this->ajax_handle );// phpcs:ignore 177 $this->script_version = apply_filters( 'toria/ajax/script_version', $script_version, $this->action, $this->php_callback, $this->script_path, $this->mode, $this->nonce, $this->ajax_object, $this->ajax_handle, $this->script_depends );// phpcs:ignore 178 $this->script_in_footer = apply_filters( 'toria/ajax/script_in_footer', $script_in_footer, $this->action, $this->php_callback, $this->script_path, $this->mode, $this->nonce, $this->ajax_object, $this->ajax_handle, $this->script_depends, $this->script_version );// phpcs:ignore 179 179 180 180 if ( ! array_key_exists( 'ajax_url', $ajax_variables ) ) { … … 188 188 } 189 189 // phpcs:ignore 190 $this->ajax_variables = apply_filters( 'toria/ajax/ajax_variables', $ajax_variables, $this->action, $this->php_callback, $this->script_path, $this->mode );190 $this->ajax_variables = apply_filters( 'toria/ajax/ajax_variables', $ajax_variables, $this->action, $this->php_callback, $this->script_path, $this->mode, $this->nonce, $this->ajax_object, $this->ajax_handle, $this->script_depends, $this->script_version, $this->script_in_footer ); 191 191 192 192 $this->create_ajax(); -
tori-ajax/trunk/includes/class-toria-ajax-api.php
r2715093 r2754211 47 47 * @param array $ajax_variables Variables to be passed to be available for JS to utilize. 48 48 * @param string $nonce string used to create WP nonce for verification on PHP callback. 49 * @param string $ajax_object Name of object to be storing JS variables.49 * @param string $ajax_object (string) Name of object to be storing JS variables. 50 50 * @param string $ajax_handle Name of script. 51 51 * @param array $script_depends An array of registered script handles this script depends on. -
tori-ajax/trunk/includes/class-toria.php
r2732261 r2754211 97 97 $this->version = TORIA_VERSION; 98 98 } else { 99 $this->version = '1. 1.0';99 $this->version = '1.2.0'; 100 100 } 101 101 $this->plugin_name = 'toria'; … … 210 210 * @param array $ajax_variables Variables to be passed to be available for JS to utilize. 211 211 * @param string $nonce string used to create WP nonce for verification on PHP callback. 212 * @param string $ajax_object Name of object to be storing JS variables.212 * @param string $ajax_object (string) Name of object to be storing JS variables. 213 213 * @param string $ajax_handle Name of script. 214 214 * @param array $script_depends An array of registered script handles this script depends on. -
tori-ajax/trunk/toria.php
r2732261 r2754211 16 16 * Plugin URI: http://toriajax.com/ 17 17 * Description: Adds Ajax in WordPress with a few lines of code. 18 * Version: 1. 1.018 * Version: 1.2.0 19 19 * Author: Alvin Muthui 20 20 * Author URI: https://profiles.wordpress.org/alvinmuthui/ … … 33 33 * Currently plugin version. 34 34 */ 35 define( 'TORIA_VERSION', '1. 1.0' );35 define( 'TORIA_VERSION', '1.2.0' ); 36 36 37 37 /** … … 83 83 * Adds Ajax scripts and their associated actions and callback 84 84 * 85 * @param string $action The name of action.85 * @param string $action The name of the Ajax action. 86 86 * @param mixed $php_callback PHP function to respond to ajax calls. 87 87 * @param string $script_path File path containing you Javascript file. 88 * @param string $mode Determines if script will be exposed to authenticated Ajax actions for logged-in users or non-authenticated Ajax actions for logged-out users or both. Using both, private, and public.88 * @param string $mode (string) Determines if script will be exposed to authenticated Ajax actions for logged-in users or non-authenticated Ajax actions for logged-out users or both. Using both, private, and public. 89 89 * @param array $ajax_variables Variables to be passed to be available for JS to utilize. 90 * @param string $nonce string used to create WP nonce for verification on PHP callback.91 * @param string $ajax_object Name of object to be storing JS variables.90 * @param string $nonce (string) Used to create WP nonce for verification on PHP callback. 91 * @param string $ajax_object (string) Name of object to be storing JS variables. 92 92 * @param string $ajax_handle Name of script. 93 93 * @param array $script_depends (string[]) (Optional) An array of registered script handles this script depends on. Default value: array(). 94 94 * @param mixed $script_version String specifying script version number, if it has one, which is added to the URL as a query string for cache busting purposes. If the version is set to false, a version number is automatically added equal to the current installed Tori Ajax version. If set to null, no version is added. Default value: false. 95 95 * @param bool $script_in_footer (bool) (Optional) Whether to enqueue the script before </body> instead of in the <head>. Default 'false'. 96 * @return bool eanWhether it is added or not.96 * @return bool Whether it is added or not. 97 97 * 98 98 * @since 1.0.0
Note: See TracChangeset
for help on using the changeset viewer.