]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/deprecated.php
WordPress 4.3
[autoinstalls/wordpress.git] / wp-includes / deprecated.php
index 6345bd7ca4a6de595cc0ec05a3208cfdde502bf8..ac3910550d49f73b2a9d5570421427589926456b 100644 (file)
@@ -2445,7 +2445,7 @@ function get_users_of_blog( $id = '' ) {
  * @deprecated 3.0.0
  * @deprecated Use add_theme_support( 'automatic-feed-links' )
  *
  * @deprecated 3.0.0
  * @deprecated Use add_theme_support( 'automatic-feed-links' )
  *
- * @param boolean $add Optional, default is true. Add or remove links. Defaults to true.
+ * @param bool $add Optional, default is true. Add or remove links. Defaults to true.
  */
 function automatic_feed_links( $add = true ) {
        _deprecated_function( __FUNCTION__, '3.0', "add_theme_support( 'automatic-feed-links' )" );
  */
 function automatic_feed_links( $add = true ) {
        _deprecated_function( __FUNCTION__, '3.0', "add_theme_support( 'automatic-feed-links' )" );
@@ -3491,3 +3491,148 @@ function url_is_accessable_via_ssl( $url ) {
 
        return false;
 }
 
        return false;
 }
+
+/**
+ * Start preview theme output buffer.
+ *
+ * Will only perform task if the user has permissions and template and preview
+ * query variables exist.
+ *
+ * @since 2.6.0
+ * @deprecated 4.3.0
+ */
+function preview_theme() {
+       _deprecated_function( __FUNCTION__, '4.3' );
+}
+
+/**
+ * Private function to modify the current template when previewing a theme
+ *
+ * @since 2.9.0
+ * @deprecated 4.3.0
+ * @access private
+ *
+ * @return string
+ */
+function _preview_theme_template_filter() {
+       _deprecated_function( __FUNCTION__, '4.3' );
+       return '';
+}
+
+/**
+ * Private function to modify the current stylesheet when previewing a theme
+ *
+ * @since 2.9.0
+ * @deprecated 4.3.0
+ * @access private
+ *
+ * @return string
+ */
+function _preview_theme_stylesheet_filter() {
+       _deprecated_function( __FUNCTION__, '4.3' );
+       return '';
+}
+
+/**
+ * Callback function for ob_start() to capture all links in the theme.
+ *
+ * @since 2.6.0
+ * @deprecated 4.3.0
+ * @access private
+ *
+ * @param string $content
+ * @return string
+ */
+function preview_theme_ob_filter( $content ) {
+       _deprecated_function( __FUNCTION__, '4.3' );
+       return $content;
+}
+
+/**
+ * Manipulates preview theme links in order to control and maintain location.
+ *
+ * Callback function for preg_replace_callback() to accept and filter matches.
+ *
+ * @since 2.6.0
+ * @deprecated 4.3.0
+ * @access private
+ *
+ * @param array $matches
+ * @return string
+ */
+function preview_theme_ob_filter_callback( $matches ) {
+       _deprecated_function( __FUNCTION__, '4.3' );
+       return '';
+}
+
+/**
+ * Formats text for the rich text editor.
+ *
+ * The filter 'richedit_pre' is applied here. If $text is empty the filter will
+ * be applied to an empty string.
+ *
+ * @since 2.0.0
+ * @deprecated 4.3.0
+ *
+ * @param string $text The text to be formatted.
+ * @return string The formatted text after filter is applied.
+ */
+function wp_richedit_pre($text) {
+       _deprecated_function( __FUNCTION__, '4.3', 'format_for_editor()' );
+
+       if ( empty( $text ) ) {
+               /**
+                * Filter text returned for the rich text editor.
+                *
+                * This filter is first evaluated, and the value returned, if an empty string
+                * is passed to wp_richedit_pre(). If an empty string is passed, it results
+                * in a break tag and line feed.
+                *
+                * If a non-empty string is passed, the filter is evaluated on the wp_richedit_pre()
+                * return after being formatted.
+                *
+                * @since 2.0.0
+                * @deprecated 4.3.0
+                *
+                * @param string $output Text for the rich text editor.
+                */
+               return apply_filters( 'richedit_pre', '' );
+       }
+
+       $output = convert_chars($text);
+       $output = wpautop($output);
+       $output = htmlspecialchars($output, ENT_NOQUOTES, get_option( 'blog_charset' ) );
+
+       /** This filter is documented in wp-includes/deprecated.php */
+       return apply_filters( 'richedit_pre', $output );
+}
+
+/**
+ * Formats text for the HTML editor.
+ *
+ * Unless $output is empty it will pass through htmlspecialchars before the
+ * 'htmledit_pre' filter is applied.
+ *
+ * @since 2.5.0
+ * @deprecated 4.3.0
+ *
+ * @param string $output The text to be formatted.
+ * @return string Formatted text after filter applied.
+ */
+function wp_htmledit_pre($output) {
+       _deprecated_function( __FUNCTION__, '4.3', 'format_for_editor()' );
+
+       if ( !empty($output) )
+               $output = htmlspecialchars($output, ENT_NOQUOTES, get_option( 'blog_charset' ) ); // convert only < > &
+
+       /**
+        * Filter the text before it is formatted for the HTML editor.
+        *
+        * @since 2.5.0
+        * @deprecated 4.3.0
+        *
+        * @param string $output The HTML-formatted text.
+        */
+       return apply_filters( 'htmledit_pre', $output );
+}
+