Make WordPress Core


Ignore:
Timestamp:
01/11/2020 06:30:58 PM (7 years ago)
Author:
SergeyBiryukov
Message:

Docs: In various @return tags, list the expected type first, instead of false.

Follow-up to [46696].

See #48303.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-oembed.php

    r46761 r47060  
    249249         * @param string        $url  The URL to the content.
    250250         * @param string|array  $args Optional provider arguments.
    251          * @return false|string False on failure, otherwise the oEmbed provider URL.
     251         * @return string|false The oEmbed provider URL on success, false on failure.
    252252         */
    253253        public function get_provider( $url, $args = '' ) {
     
    340340         * @param string       $url  The URL to the content that should be attempted to be embedded.
    341341         * @param array|string $args Optional. Arguments, usually passed from a shortcode. Default empty.
    342          * @return false|object False on failure, otherwise the result in the form of an object.
     342         * @return object|false The result in the form of an object on success, false on failure.
    343343         */
    344344        public function get_data( $url, $args = '' ) {
     
    370370         * @param string       $url  The URL to the content that should be attempted to be embedded.
    371371         * @param array|string $args Optional. Arguments, usually passed from a shortcode. Default empty.
    372          * @return false|string False on failure, otherwise the UNSANITIZED (and potentially unsafe) HTML that should be used to embed.
     372         * @return string|false The UNSANITIZED (and potentially unsafe) HTML that should be used to embed on success,
     373         *                      false on failure.
    373374         */
    374375        public function get_html( $url, $args = '' ) {
     
    418419         *
    419420         * @param string $url The URL that should be inspected for discovery `<link>` tags.
    420          * @return false|string False on failure, otherwise the oEmbed provider URL.
     421         * @return string|false The oEmbed provider URL on success, false on failure.
    421422         */
    422423        public function discover( $url ) {
     
    510511         * @param string       $url      The URL to the content that is desired to be embedded.
    511512         * @param array|string $args     Optional. Arguments, usually passed from a shortcode. Default empty.
    512          * @return false|object False on failure, otherwise the result in the form of an object.
     513         * @return object|false The result in the form of an object on success, false on failure.
    513514         */
    514515        public function fetch( $provider, $url, $args = '' ) {
     
    548549         *
    549550         * @param string $provider_url_with_args URL to the provider with full arguments list (url, maxheight, etc.)
    550          * @param string $format Format to use
    551          * @return false|object|WP_Error False on failure, otherwise the result in the form of an object.
     551         * @param string $format                 Format to use.
     552         * @return object|false|WP_Error The result in the form of an object on success, false on failure.
    552553         */
    553554        private function _fetch_with_format( $provider_url_with_args, $format ) {
     
    654655         *
    655656         * @param object $data A data object result from an oEmbed provider.
    656          * @param string $url The URL to the content that is desired to be embedded.
    657          * @return false|string False on error, otherwise the HTML needed to embed.
     657         * @param string $url  The URL to the content that is desired to be embedded.
     658         * @return string|false The HTML needed to embed on success, false on failure.
    658659         */
    659660        public function data2html( $data, $url ) {
Note: See TracChangeset for help on using the changeset viewer.