Changeset 2088993
- Timestamp:
- 05/16/2019 09:39:41 AM (5 years ago)
- Location:
- option-tree/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
option-tree/trunk/composer.json
r2088704 r2088993 2 2 "name": "valendesigns/option-tree", 3 3 "description": "Theme Options UI Builder for WordPress.", 4 "version": "2.7. 1",4 "version": "2.7.", 5 5 "type": "wordpress-plugin", 6 6 "homepage": "https://github.com/valendesigns/option-tree", -
option-tree/trunk/includes/ot-functions-admin.php
r2088704 r2088993 564 564 } 565 565 } elseif ( in_array( $type, array( 'css', 'javascript', 'text', 'textarea', 'textarea-simple' ), true ) ) { 566 $filter = function( $tags, $context ) { 567 if ( 'post' === $context ) { 568 if ( current_user_can( 'unfiltered_html' ) || true === OT_ALLOW_UNFILTERED_HTML ) { 569 $tags['script'] = array_fill_keys( array( 'async', 'charset', 'defer', 'src', 'type' ), 1 ); 570 $tags['style'] = array_fill_keys( array( 'media', 'type' ), 1 ); 571 $tags['iframe'] = array_fill_keys( array( 'align', 'frameborder', 'height', 'longdesc', 'marginheight', 'marginwidth', 'name', 'sandbox', 'scrolling', 'src', 'srcdoc', 'style', 'width' ), 1 ); 572 $tags['noscript'] = array(); 573 574 $tags = apply_filters( 'ot_allowed_html', $tags ); 566 if ( ! function_exists( '_filter_wp_kses_post' ) ) { 567 /** 568 * Filter the allowed HTML and safe CSS styles. 569 * 570 * @since 2.7.2 571 * 572 * @param bool $add Whether to add or remove the filter. 573 */ 574 function _filter_wp_kses_post( $add = true ) { 575 $css_filter = function ( $attr ) { 576 array_push( $attr, 'display', 'visibility' ); 577 578 $attr = apply_filters( 'ot_safe_style_css', $attr ); 579 580 return $attr; 581 }; 582 583 $html_filter = function ( $tags, $context ) { 584 if ( 'post' === $context ) { 585 if ( current_user_can( 'unfiltered_html' ) || true === OT_ALLOW_UNFILTERED_HTML ) { 586 $tags['script'] = array_fill_keys( array( 'async', 'charset', 'defer', 'src', 'type' ), true ); 587 $tags['style'] = array_fill_keys( array( 'media', 'type' ), true ); 588 $tags['iframe'] = array_fill_keys( array( 'align', 'allowfullscreen', 'class', 'frameborder', 'height', 'id', 'longdesc', 'marginheight', 'marginwidth', 'name', 'sandbox', 'scrolling', 'src', 'srcdoc', 'style', 'width' ), true ); 589 $tags['noscript'] = true; 590 591 $tags = apply_filters( 'ot_allowed_html', $tags ); 592 } 593 } 594 595 return $tags; 596 }; 597 598 if ( $add ) { 599 add_filter( 'safe_style_css', $css_filter ); 600 add_filter( 'wp_kses_allowed_html', $html_filter, 10, 2 ); 601 } else { 602 remove_filter( 'safe_style_css', $css_filter ); 603 remove_filter( 'wp_kses_allowed_html', $html_filter ); 575 604 } 576 605 } 577 return $tags; 578 }; 579 580 add_filter( 'wp_kses_allowed_html', $filter, 10, 2 ); 606 } 607 608 _filter_wp_kses_post( true ); 581 609 $input_safe = wp_kses_post( $input ); 582 remove_filter( 'wp_kses_allowed_html', $filter);610 ); 583 611 } elseif ( 'date-picker' === $type || 'date-time-picker' === $type ) { 584 612 if ( ! empty( $input ) && (bool) strtotime( $input ) ) { -
option-tree/trunk/ot-loader.php
r2088704 r2088993 4 4 * Plugin URI: https://github.com/valendesigns/option-tree/ 5 5 * Description: Theme Options UI Builder for WordPress. A simple way to create & save Theme Options and Meta Boxes for free or premium themes. 6 * Version: 2.7. 16 * Version: 2.7. 7 7 * Author: Derek Herman 8 8 * Author URI: http://valendesigns.com … … 85 85 * Current Version number. 86 86 */ 87 define( 'OT_VERSION', '2.7. 1' );87 define( 'OT_VERSION', '2.7.' ); 88 88 89 89 /** -
option-tree/trunk/readme.txt
r2088704 r2088993 4 4 Requires at least: 3.8 5 5 Tested up to: 5.2 6 Stable tag: 2.7. 16 Stable tag: 2.7. 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 127 127 == Changelog == 128 128 129 130 131 129 132 = 2.7.1 = 130 133 * Hotfix - Fix error cannot redeclare `_sanitize_recursive()`. props @shramee
Note: See TracChangeset
for help on using the changeset viewer.