Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




wp_prototype_before_jquery [ WordPress Function ]

wp_prototype_before_jquery ( $js_array )
Parameters:
  • (array) $js_array JavaScript scripts array
Returns:
  • (array) Reordered array, if needed.
Defined at:



Reorder JavaScript scripts array to place prototype before jQuery.

Source


<?php
function wp_prototype_before_jquery$js_array ) {
    if ( 
false === $jquery array_search'jquery'$js_arraytrue ) )
        return 
$js_array;

    if ( 
false === $prototype array_search'prototype'$js_arraytrue ) )
        return 
$js_array;

    if ( 
$prototype $jquery )
        return 
$js_array;

    unset(
$js_array[$prototype]);

    
array_splice$js_array$jquery0'prototype' );

    return 
$js_array;
}
?>

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

Kullanýcý Tartýþmalarý [ wordpress.org ]

- Bulunamadý -

Yeni bir konu yaz ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics