Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/15/2015 07:13:42 PM (11 years ago)
Author:
tw2113
Message:

More documentation cleanup for part of BP-Core component.

See #6398.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/classes/class-bp-media-extractor.php

    r10160 r10355  
    6363     * @param int            $what_to_extract Media type to extract (optional).
    6464     * @param array          $extra_args      Bespoke data for a particular extractor (optional).
    65      *
    6665     * @return array {
    6766     *     @type array $has Extracted media counts. {
     
    197196     * @param string $plaintext  Sanitized version of the content.
    198197     * @param array  $extra_args Bespoke data for a particular extractor (optional).
    199      *
    200198     * @return array {
    201199     *     @type array $has Extracted media counts. {
     
    212210        $data = array( 'has' => array( 'links' => 0 ), 'links' => array() );
    213211
    214         // Matches: href="text" and href='text'
     212        // Matches: href="text" and href='text'.
    215213        if ( stripos( $richtext, 'href=' ) !== false ) {
    216214            preg_match_all( '#href=(["\'])([^"\']+)\1#i', $richtext, $matches );
     
    257255     * @param string $plaintext  Sanitized version of the content.
    258256     * @param array  $extra_args Bespoke data for a particular extractor.
    259      *
    260257     * @return array {
    261258     *     @type array $has Extracted media counts. {
     
    292289        }
    293290
    294         // Build results
     291        // Build results.
    295292        foreach ( $mentions as $user_id => $mention_name ) {
    296293            $mention = array( 'name' => strtolower( $mention_name ) );
     
    329326     * @param string $plaintext  Sanitized version of the content.
    330327     * @param array  $extra_args Bespoke data for a particular extractor (optional).
    331      *
    332328     * @return array {
    333329     *     @type array $has Extracted media counts. {
     
    354350        // `<img src>` tags.
    355351        if ( stripos( $richtext, 'src=' ) !== false ) {
    356             preg_match_all( '#src=(["\'])([^"\']+)\1#i', $richtext, $img_srcs );  // matches src="text" and src='text'
     352            preg_match_all( '#src=(["\'])([^"\']+)\1#i', $richtext, $img_srcs );  // Matches src="text" and src='text'.
    357353
    358354            // <img>.
     
    449445     * @param string $plaintext  Sanitized version of the content.
    450446     * @param array  $extra_args Bespoke data for a particular extractor (optional).
    451      *
    452447     * @return array {
    453448     *     @type array $has Extracted media counts. {
     
    477472
    478473                    $shortcode               = array();
    479                     $shortcode['attributes'] = $attrs;             // Attributes
    480                     $shortcode['content']    = $matches[5][ $i ];  // Content
    481                     $shortcode['type']       = $shortcode_name;    // Shortcode
    482                     $shortcode['original']   = $matches[0][ $i ];  // Entire shortcode
     474                    $shortcode['attributes'] = $attrs;             // Attributes.
     475                    $shortcode['content']    = $matches[5][ $i ];  // Content.
     476                    $shortcode['type']       = $shortcode_name;    // Shortcode.
     477                    $shortcode['original']   = $matches[0][ $i ];  // Entire shortcode.
    483478
    484479                    $data['shortcodes'][] = $shortcode;
     
    511506     * @param string $plaintext  Sanitized version of the content.
    512507     * @param array  $extra_args Bespoke data for a particular extractor (optional).
    513      *
    514508     * @return array {
    515509     *     @type array $has Extracted media counts. {
     
    591585     * @param string $plaintext  Sanitized version of the content.
    592586     * @param array  $extra_args Bespoke data for a particular extractor (optional).
    593      *
    594587     * @return array {
    595588     *     @type array $has Extracted media counts. {
     
    644637        }
    645638
    646         // <a href="*.mp3"> tags
     639        // <a href="*.mp3"> tags.
    647640        foreach ( $audio_types as $extension ) {
    648641            $extension = '.' . $extension;
     
    689682     * @param string $plaintext  Sanitized version of the content.
    690683     * @param array  $extra_args Bespoke data for a particular extractor (optional).
    691      *
    692684     * @return array {
    693685     *     @type array $has Extracted media counts. {
     
    768760     * @param string $plaintext  Sanitized version of the content.
    769761     * @param array  $extra_args Bespoke data for a particular extractor (optional).
    770      *
    771762     * @return array
    772763     */
     
    794785                    $image_size = array( $extra_args['width'], $extra_args['height'] );
    795786                } else {
    796                     $image_size = $extra_args['width'];  // e.g. "thumb", "medium".
     787                    $image_size = $extra_args['width'];  // E.g. "thumb", "medium".
    797788                }
    798789
     
    868859     * @param string $plaintext  Sanitized version of the content.
    869860     * @param array  $extra_args Contains data that an implementation might need beyond the defaults.
    870      *
    871861     * @return array
    872862     */
     
    890880                    $image_size = array( $extra_args['width'], $extra_args['height'] );
    891881                } else {
    892                     $image_size = $extra_args['width'];  // e.g. "thumb", "medium".
     882                    $image_size = $extra_args['width'];  // E.g. "thumb", "medium".
    893883                }
    894884            } else {
     
    919909     * @since 2.3.0
    920910     *
    921      * @param string $richtext
    922      *
     911     * @param string $richtext Content to sanitize.
    923912     * @return string
    924913     */
Note: See TracChangeset for help on using the changeset viewer.