Changeset 3414476
- Timestamp:
- 12/08/2025 03:11:46 PM (4 months ago)
- Location:
- advanced-custom-fields-table-field/trunk
- Files:
-
- 5 edited
-
acf-table.php (modified) (1 diff)
-
changelog.txt (modified) (1 diff)
-
class-jh-acf-field-table.php (modified) (1 diff)
-
js/init.js (modified) (2 diffs)
-
readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
advanced-custom-fields-table-field/trunk/acf-table.php
r3409348 r3414476 4 4 Plugin URI: https://www.acf-table-field.com 5 5 Description: This free Add-on adds a table field type for the plugins Advanced Custom Fields and Secure Custom Fields. 6 Version: 1.3.3 26 Version: 1.3.33 7 7 Author: Johann Heyne 8 8 Author URI: http://www.johannheyne.de -
advanced-custom-fields-table-field/trunk/changelog.txt
r3409348 r3414476 1 1 == Changelog == 2 3 = 1.3.33 = 4 * Adds hook registering event "tableFieldRegisterHooks" 5 * Changes example showing how to enqueue an admin script and apply the "sanitize_html" filter. 2 6 3 7 = 1.3.32 = -
advanced-custom-fields-table-field/trunk/class-jh-acf-field-table.php
r3409348 r3414476 40 40 */ 41 41 $this->settings = array( 42 'version' => '1.3.3 2',42 'version' => '1.3.33', 43 43 'dir_url' => plugins_url( '', __FILE__ ) . '/', 44 44 ); -
advanced-custom-fields-table-field/trunk/js/init.js
r3409348 r3414476 7 7 var t = this; 8 8 9 t.version = '1.3.3 2';9 t.version = '1.3.33'; 10 10 11 11 t.param = {}; … … 1807 1807 1808 1808 ACFTableField = new ACFTableFieldMain(); 1809 document.dispatchEvent(new CustomEvent('tableFieldRegisterHooks')); 1809 1810 1810 1811 })( jQuery ); -
advanced-custom-fields-table-field/trunk/readme.txt
r3409368 r3414476 4 4 Requires at least: 5.3 5 5 Tested up to: 6.9 6 Stable tag: 1.3.3 26 Stable tag: 1.3.33 7 7 Requires PHP: 7.4 8 8 License: GPLv2 or later … … 466 466 = UI Sanitizing Options = 467 467 468 Since version 1.3.32, you can configure the UI sanitizing options. 469 470 Ensure you create a dedicated admin script for configuring the table field plugin in your theme and enqueue it correctly. This is required so that the hook can be registered in the plugin after the plugin initialization and before the plugin script functionalities are executed. 471 472 Create a file in your theme at the path `/js/table-field-config.js`. 473 474 Than enqueue that script in your themes `functions.php` file with the following action. 475 476 ` 477 add_action( 'admin_enqueue_scripts', function() { 468 Since version 1.3.33, you can configure the UI sanitizing options. 469 470 This requires an admin script, that. You can in your themes `functions.php` file with the following action. 471 472 ` 473 add_action( 'acf/input/admin_enqueue_scripts', function() { 478 474 479 475 wp_enqueue_script( 480 476 'table-field-config', // Table field config script handle 481 477 get_template_directory_uri() . '/js/table-field-config.js', // Path to the script in the theme 482 array('acf-input-table'), // Required, ensures that the script is loaded and executed at the correct time483 '1.0', // Version of the script484 true // Required to be correctly placed in the script queue485 478 ); 486 479 });` … … 489 482 Use the following table field hook in your table field config script to modify the DOMPurify options. 490 483 491 `ACFTableField.addFilter( 'core', 'sanitize_html', function( options ) { 492 493 // DOMPurify Options, @see: https://github.com/cure53/DOMPurify?tab=readme-ov-file#can-i-configure-dompurify 494 495 options.ADD_ATTR = ['target']; // For instance, the target attribute can be permitted 496 497 return options; 498 });` 484 ` 485 document.addEventListener('tableFieldRegisterHooks', function(){ 486 487 ACFTableField.addFilter( 'core', 'sanitize_html', function( options ) { 488 489 // DOMPurify Options, @see: https://github.com/cure53/DOMPurify?tab=readme-ov-file#can-i-configure-dompurify 490 491 options.ADD_ATTR = ['target']; // For instance, the target attribute can be permitted 492 493 return options; 494 }); 495 }); 496 ` 499 497 500 498 … … 554 552 == Changelog == 555 553 554 = 1.3.33 = 555 * Adds hook registering event "tableFieldRegisterHooks" 556 * Changes and fixes example showing how to enqueue an admin script and apply the "sanitize_html" filter. 557 556 558 = 1.3.32 = 557 559 * Adds basic Polylang support
Note: See TracChangeset
for help on using the changeset viewer.