- if ( ! function_exists( 'did_action' ) || did_action( 'init' ) )
- $this->init();
- else
- add_action( 'init', array( $this, 'init' ), 0 );
+ $this->init();
+ add_action( 'init', array( $this, 'init' ), 0 );
- if ( !preg_match('|^https?://|', $src) && ! ( $this->content_url && 0 === strpos($src, $this->content_url) ) ) {
+ if ( !preg_match('|^(https?:)?//|', $src) && ! ( $this->content_url && 0 === strpos($src, $this->content_url) ) ) {
* Localizes only if the script has already been added
*/
function localize( $handle, $object_name, $l10n ) {
* Localizes only if the script has already been added
*/
function localize( $handle, $object_name, $l10n ) {
if ( is_array($l10n) && isset($l10n['l10n_print_after']) ) { // back compat, preserve the code in 'l10n_print_after' if present
$after = $l10n['l10n_print_after'];
unset($l10n['l10n_print_after']);
if ( is_array($l10n) && isset($l10n['l10n_print_after']) ) { // back compat, preserve the code in 'l10n_print_after' if present
$after = $l10n['l10n_print_after'];
unset($l10n['l10n_print_after']);