X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/7f1521bf193b382565eb753043c161f4cb3fcda7..53f4633144ed68c8b8fb5861f992b5489894a940:/wp-includes/deprecated.php diff --git a/wp-includes/deprecated.php b/wp-includes/deprecated.php index 6345bd7c..ac391055 100644 --- a/wp-includes/deprecated.php +++ b/wp-includes/deprecated.php @@ -2445,7 +2445,7 @@ function get_users_of_blog( $id = '' ) { * @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' )" ); @@ -3491,3 +3491,148 @@ function url_is_accessable_via_ssl( $url ) { 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 ); +} +