wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
wp_prototype_before_jquery › WordPress Function
Seit2.3.1
Veraltetn/v
› wp_prototype_before_jquery ( $js_array )
| Parameter: |
|
| Gibt zurück: |
|
| Definiert in: |
|
| Codex: |
Reorders JavaScript scripts array to place prototype before jQuery.
Ähnliche Funktionen: wp_reset_query, wp_privacy_exports_url, render_block_core_query, wp_edit_posts_query, wp_post_mime_type_where
Quellcode
function wp_prototype_before_jquery( $js_array ) {
$prototype = array_search( 'prototype', $js_array, true );
if ( false === $prototype ) {
return $js_array;
}
$jquery = array_search( 'jquery', $js_array, true );
if ( false === $jquery ) {
return $js_array;
}
if ( $prototype < $jquery ) {
return $js_array;
}
unset( $js_array[ $prototype ] );
array_splice( $js_array, $jquery, 0, 'prototype' );
return $js_array;
}