]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/deprecated.php
WordPress 4.0
[autoinstalls/wordpress.git] / wp-includes / deprecated.php
index 43cf743b77e4047c547f3c7c797a1af23875f863..0671dc12570163bfe75493cd7e4c963f757f3dbb 100644 (file)
@@ -1308,6 +1308,27 @@ function get_category_children( $id, $before = '/', $after = '', $visited = arra
        return $chain;
 }
 
        return $chain;
 }
 
+/**
+ * Retrieves all category IDs.
+ *
+ * @since 2.0.0
+ * @deprecated 4.0.0 Use get_terms() instead.
+ * @see get_terms()
+ * @link http://codex.wordpress.org/Function_Reference/get_all_category_ids
+ *
+ * @return object List of all of the category IDs.
+ */
+function get_all_category_ids() {
+       _deprecated_function( __FUNCTION__, '4.0', 'get_terms()' );
+
+       if ( ! $cat_ids = wp_cache_get( 'all_category_ids', 'category' ) ) {
+               $cat_ids = get_terms( 'category', array('fields' => 'ids', 'get' => 'all') );
+               wp_cache_add( 'all_category_ids', $cat_ids, 'category' );
+       }
+
+       return $cat_ids;
+}
+
 /**
  * Retrieve the description of the author of the current post.
  *
 /**
  * Retrieve the description of the author of the current post.
  *
@@ -1916,13 +1937,11 @@ function get_attachment_icon_src( $id = 0, $fullsize = false ) {
                // We have a thumbnail desired, specified and existing
 
                $src_file = basename($src);
                // We have a thumbnail desired, specified and existing
 
                $src_file = basename($src);
-               $class = 'attachmentthumb';
        } elseif ( wp_attachment_is_image( $post->ID ) ) {
                // We have an image without a thumbnail
 
                $src = wp_get_attachment_url( $post->ID );
                $src_file = & $file;
        } elseif ( wp_attachment_is_image( $post->ID ) ) {
                // We have an image without a thumbnail
 
                $src = wp_get_attachment_url( $post->ID );
                $src_file = & $file;
-               $class = 'attachmentimage';
        } elseif ( $src = wp_mime_type_icon( $post->ID ) ) {
                // No thumb, no image. We'll look for a mime-related icon instead.
 
        } elseif ( $src = wp_mime_type_icon( $post->ID ) ) {
                // No thumb, no image. We'll look for a mime-related icon instead.
 
@@ -3438,3 +3457,45 @@ function format_to_post( $content ) {
        _deprecated_function( __FUNCTION__, '3.9' );
        return $content;
 }
        _deprecated_function( __FUNCTION__, '3.9' );
        return $content;
 }
+
+/**
+ * Formerly used to escape strings before searching the DB. It was poorly documented and never worked as described.
+ *
+ * @since 2.5.0
+ * @deprecated 4.0.0
+ * @deprecated Use wpdb::esc_like()
+ *
+ * @param string $text The text to be escaped.
+ * @return string text, safe for inclusion in LIKE query.
+ */
+function like_escape($text) {
+       _deprecated_function( __FUNCTION__, '4.0', 'wpdb::esc_like()' );
+       return str_replace( array( "%", "_" ), array( "\\%", "\\_" ), $text );
+}
+
+/**
+ * Determines if the URL can be accessed over SSL.
+ *
+ * Determines if the URL can be accessed over SSL by using the WordPress HTTP API to access
+ * the URL using https as the scheme.
+ *
+ * @since 2.5.0
+ * @deprecated 4.0.0
+ *
+ * @param string $url The URL to test.
+ * @return bool Whether SSL access is available.
+ */
+function url_is_accessable_via_ssl( $url ) {
+       _deprecated_function( __FUNCTION__, '4.0' );
+
+       $response = wp_remote_get( set_url_scheme( $url, 'https' ) );
+
+       if ( !is_wp_error( $response ) ) {
+               $status = wp_remote_retrieve_response_code( $response );
+               if ( 200 == $status || 401 == $status ) {
+                       return true;
+               }
+       }
+
+       return false;
+}