[ Index ] |
PHP Cross Reference of BuddyPress |
[Source view] [Print] [Project Stats]
Core component classes.
File Size: | 933 lines (31 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
BP_Media_Extractor:: (11 methods):
extract()
extract_links()
extract_mentions()
extract_images()
extract_shortcodes()
extract_embeds()
extract_audio()
extract_video()
extract_images_from_galleries()
extract_images_from_featured_images()
strip_markup()
Class: BP_Media_Extractor - X-Ref
Extracts media from text. Use {@link extract()}.extract( $richtext, $what_to_extract = self::ALL, $extra_args = array() X-Ref |
Extract media from text. return: array { param: string|WP_Post $richtext Content to parse. param: int $what_to_extract Media type to extract (optional). param: array $extra_args Bespoke data for a particular extractor (optional). since: 2.3.0 |
extract_links( $richtext, $plaintext, $extra_args = array() X-Ref |
Extract `<a href>` tags from text. return: array { param: string $richtext Content to parse. param: string $plaintext Sanitized version of the content. param: array $extra_args Bespoke data for a particular extractor (optional). since: 2.3.0 |
extract_mentions( $richtext, $plaintext, $extra_args = array() X-Ref |
Extract @mentions tags from text. If the Activity component is enabled, it is used to parse @mentions. The mentioned "name" must match a user account, otherwise it is discarded. If the Activity component is disabled, any @mentions are extracted. return: array { param: string $richtext Content to parse. param: string $plaintext Sanitized version of the content. param: array $extra_args Bespoke data for a particular extractor. since: 2.3.0 |
extract_images( $richtext, $plaintext, $extra_args = array() X-Ref |
Extract images from `<img src>` tags, [galleries], and featured images from a Post. If an image is in the Media Library, then its resolution is included in the results. return: array { param: string $richtext Content to parse. param: string $plaintext Sanitized version of the content. param: array $extra_args Bespoke data for a particular extractor (optional). since: 2.3.0 |
extract_shortcodes( $richtext, $plaintext, $extra_args = array() X-Ref |
Extract shortcodes from text. This includes any shortcodes indirectly used by other media extraction types. For example, [gallery] and [audio]. return: array { param: string $richtext Content to parse. param: string $plaintext Sanitized version of the content. param: array $extra_args Bespoke data for a particular extractor (optional). since: 2.3.0 |
extract_embeds( $richtext, $plaintext, $extra_args = array() X-Ref |
Extract any URL, matching a registered oEmbed endpoint, from text. return: array { param: string $richtext Content to parse. param: string $plaintext Sanitized version of the content. param: array $extra_args Bespoke data for a particular extractor (optional). since: 2.3.0 |
extract_audio( $richtext, $plaintext, $extra_args = array() X-Ref |
Extract [audio] shortcodes and `<a href="*.mp3">` tags, from text. return: array { param: string $richtext Content to parse. param: string $plaintext Sanitized version of the content. param: array $extra_args Bespoke data for a particular extractor (optional). since: 2.3.0 |
extract_video( $richtext, $plaintext, $extra_args = array() X-Ref |
Extract [video] shortcodes from text. return: array { param: string $richtext Content to parse. param: string $plaintext Sanitized version of the content. param: array $extra_args Bespoke data for a particular extractor (optional). since: 2.3.0 |
extract_images_from_galleries( $richtext, $plaintext, $extra_args = array() X-Ref |
Extract images in [galleries] shortcodes from text. return: array param: string $richtext Content to parse. param: string $plaintext Sanitized version of the content. param: array $extra_args Bespoke data for a particular extractor (optional). since: 2.3.0 |
extract_images_from_featured_images( $richtext, $plaintext, $extra_args ) X-Ref |
Extract the featured image from a Post. return: array param: string $richtext Content to parse. param: string $plaintext Sanitized version of the content. param: array $extra_args Contains data that an implementation might need beyond the defaults. since: 2.3.0 |
strip_markup( $richtext ) X-Ref |
Sanitize and format raw content to prepare for content extraction. HTML tags and shortcodes are removed, and HTML entities are decoded. return: string param: string $richtext Content to sanitize. since: 2.3.0 |
Generated: Thu Nov 21 01:00:57 2024 | Cross-referenced by PHPXref 0.7.1 |