Changeset 25485 for trunk/src/wp-includes/media.php
- Timestamp:
- 09/18/2013 10:05:46 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/media.php
r25484 r25485 874 874 * @since 3.6.0 875 875 * 876 * @param array $attr Attributes of the shortcode. 876 * @param array $attr Attributes of the shortcode. 877 * @param string $content Optional. Shortcode content. 877 878 * @return string HTML content to display audio. 878 879 */ 879 function wp_audio_shortcode( $attr ) {880 function wp_audio_shortcode( $attr, $content = '' ) { 880 881 $post_id = get_post() ? get_the_ID() : 0; 881 882 … … 888 889 * @since 3.7.0 889 890 * 890 * @param null Empty variable to be replaced with shortcode markup. 891 * @param array $attr Attributes of the shortcode. 892 * @param int $instances Unique numeric ID of this audio shortcode instance. 891 * @param null Empty variable to be replaced with shortcode markup. 892 * @param array $attr Attributes of the shortcode. 893 * @param string $content Shortcode content. 894 * @param int $instances Unique numeric ID of this audio shortcode instance. 893 895 */ 894 $html = apply_filters( 'wp_audio_shortcode_override', null, $attr, $instances );895 if ( null!== $html )896 $html = apply_filters( 'wp_audio_shortcode_override', '', $attr, $content, $instances ); 897 if ( '' !== $html ) 896 898 return $html; 897 899 … … 1009 1011 * @since 3.6.0 1010 1012 * 1011 * @param array $attr Attributes of the shortcode. 1013 * @param array $attr Attributes of the shortcode. 1014 * @param string $content Optional. Shortcode content. 1012 1015 * @return string HTML content to display video. 1013 1016 */ 1014 function wp_video_shortcode( $attr ) {1017 function wp_video_shortcode( $attr, $content = '' ) { 1015 1018 global $content_width; 1016 1019 $post_id = get_post() ? get_the_ID() : 0; … … 1024 1027 * @since 3.7.0 1025 1028 * 1026 * @param null Empty variable to be replaced with shortcode markup. 1027 * @param array $attr Attributes of the shortcode. 1028 * @param int $instances Unique numeric ID of this video shortcode instance. 1029 * @param null Empty variable to be replaced with shortcode markup. 1030 * @param array $attr Attributes of the shortcode. 1031 * @param string $content Shortcode content. 1032 * @param int $instances Unique numeric ID of this video shortcode instance. 1029 1033 */ 1030 $html = apply_filters( 'wp_video_shortcode_override', null, $attr, $instances );1031 if ( null!== $html )1034 $html = apply_filters( 'wp_video_shortcode_override', '', $attr, $content, $instances ); 1035 if ( '' !== $html ) 1032 1036 return $html; 1033 1037
Note: See TracChangeset
for help on using the changeset viewer.