\AudioShortcode

Class wrapper for audio shortcode

Summary

Methods
Properties
Constants
__construct()
get_audio_id()
audio_shortcode()
check_infinite()
audio_shortcode_infinite()
rawurlencode_spaces()
$add_script
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$add_script

$add_script

Methods

__construct()

__construct()

Add all the actions & resgister the shortcode

get_audio_id()

get_audio_id( $atts)

Return the $url of the audio

Parameters

$atts

audio_shortcode()

audio_shortcode( $atts)

Shortcode for audio [audio http://wpcom.files.wordpress.com/2007/01/mattmullenweg-interview.mp3|width=180|titles=1|artists=2]

The important question here is whether the shortcode applies to widget_text: add_filter('widget_text', 'do_shortcode');

Parameters

$atts

check_infinite()

check_infinite()

If the theme uses infinite scroll, include jquery at the start

audio_shortcode_infinite()

audio_shortcode_infinite()

Dynamically load the .js, if needed

This hooks in late (priority 11) to infinite_scroll_render to determine a posteriori if a shortcode has been called.

rawurlencode_spaces()

rawurlencode_spaces(string $url) : string

Fixes URLs that have been pasted with spaces: [audio http://example.com/Some Cool Music.mp3]

Parameters

string $url

Returns

string