Ticket #37916: 37916.diff
File 37916.diff, 2.6 KB (added by , 8 years ago) |
---|
-
src/wp-includes/functions.php
4954 4954 * 4955 4955 * @since 3.3.0 4956 4956 * @since 4.3.0 Added 'webcal' to the protocols array. 4957 * @since 4.7.0 Added 'urn' to the protocols array. 4957 4958 * 4958 4959 * @see wp_kses() 4959 4960 * @see esc_url() … … 4962 4963 * 4963 4964 * @return array Array of allowed protocols. Defaults to an array containing 'http', 'https', 4964 4965 * 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 4965 * 'mms', 'rtsp', 'svn', 'tel', 'fax', 'xmpp', and 'webcal'.4966 * 'mms', 'rtsp', 'svn', 'tel', 'fax', 'xmpp', 'webcal', and 'urn'. 4966 4967 */ 4967 4968 function wp_allowed_protocols() { 4968 4969 static $protocols = array(); 4969 4970 4970 4971 if ( empty( $protocols ) ) { 4971 $protocols = array( 'http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'svn', 'tel', 'fax', 'xmpp', 'webcal' );4972 $protocols = array( 'http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'svn', 'tel', 'fax', 'xmpp', 'webcal', 'urn' ); 4972 4973 4973 4974 /** 4974 4975 * Filters the list of protocols allowed in HTML attributes. -
src/wp-includes/class-wp-customize-nav-menus.php
764 764 wp_send_json_error( 'missing_params', 400 ); 765 765 } 766 766 767 if ( ! apply_filters( 'customize_create_nav_menu_content', true ) ) { 768 wp_send_json_error( 'nav_menu_creation_disabled', 400 ); 769 } 770 767 771 $params = wp_array_slice_assoc( 768 772 array_merge( 769 773 array( … … 941 945 <div class="accordion-section-content"> 942 946 <?php if ( 'post_type' === $available_item_type['type'] ) : ?> 943 947 <?php $post_type_obj = get_post_type_object( $available_item_type['object'] ); ?> 944 <?php if ( current_user_can( $post_type_obj->cap->create_posts ) && current_user_can( $post_type_obj->cap->publish_posts ) ) : ?>948 <?php if ( current_user_can( $post_type_obj->cap->create_posts ) && current_user_can( $post_type_obj->cap->publish_posts ) && apply_filters( 'customize_create_nav_menu_content', true ) ) : ?> 945 949 <div class="new-content-item"> 946 950 <input type="text" class="create-item-input" placeholder="<?php echo esc_attr( $post_type_obj->labels->add_new_item ); ?>"> 947 951 <button type="button" class="button add-content"><?php _e( 'Add' ); ?></button>