]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/kses.php
WordPress 4.5-scripts
[autoinstalls/wordpress.git] / wp-includes / kses.php
index 578c5ba4ff69bfcd49f9bebe3bf2fe9056a6caf4..b16a128e22837ebad28cab82da24aa4337374be1 100644 (file)
@@ -97,6 +97,9 @@ if ( ! CUSTOM_TAGS ) {
                        'src' => true,
                ),
                'b' => array(),
+               'bdo' => array(
+                       'dir' => true,
+               ),
                'big' => array(),
                'blockquote' => array(
                        'cite' => true,
@@ -395,6 +398,7 @@ if ( ! CUSTOM_TAGS ) {
                'ol' => array(
                        'start' => true,
                        'type' => true,
+                       'reversed' => true,
                ),
                'var' => array(),
                'video' => array(
@@ -1577,6 +1581,21 @@ function wp_kses_post( $data ) {
        return wp_kses( $data, 'post' );
 }
 
+/**
+ * Navigates through an array, object, or scalar, and sanitizes content for
+ * allowed HTML tags for post content.
+ *
+ * @since 4.4.2
+ *
+ * @see map_deep()
+ *
+ * @param mixed $data The array, object, or scalar value to inspect.
+ * @return mixed The filtered content.
+ */
+function wp_kses_post_deep( $data ) {
+       return map_deep( $data, 'wp_kses_post' );
+}
+
 /**
  * Strips all of the HTML in the content.
  *
@@ -1667,6 +1686,10 @@ function kses_init() {
  * Inline CSS filter
  *
  * @since 2.8.1
+ *
+ * @param string $css        A string of CSS rules.
+ * @param string $deprecated Not used.
+ * @return string            Filtered string of CSS rules.
  */
 function safecss_filter_attr( $css, $deprecated = '' ) {
        if ( !empty( $deprecated ) )
@@ -1694,10 +1717,10 @@ function safecss_filter_attr( $css, $deprecated = '' ) {
        'border-right-style', 'border-right-width', 'border-spacing', 'border-style', 'border-top',
        'border-top-color', 'border-top-style', 'border-top-width', 'border-width', 'caption-side',
        'clear', 'cursor', 'direction', 'font', 'font-family', 'font-size', 'font-style',
-       'font-variant', 'font-weight', 'height', 'letter-spacing', 'line-height', 'margin-bottom',
+       'font-variant', 'font-weight', 'height', 'min-height','max-height' , 'letter-spacing', 'line-height', 'margin-bottom',
        'margin-left', 'margin-right', 'margin-top', 'overflow', 'padding', 'padding-bottom',
        'padding-left', 'padding-right', 'padding-top', 'text-decoration', 'text-indent', 'vertical-align',
-       'width' ) );
+       'width', 'min-width', 'max-width' ) );
 
        if ( empty($allowed_attr) )
                return $css;