print_scripts_array

used in the Shopp script server in the same way print_scripts_array filters the array of script dependencies that will need to be loaded in WordPress.

add_filter( 'print_scripts_array', [callback] )

@param array $to_do list of script dependencing the script server will need to load.

Description

used in the Shopp script server in the same way print_scripts_array filters the array of script dependencies that will need to be loaded in WordPress.

Example

// register filter callback
add_filter('shopp_print_scripts_array', 'shopp_print_scripts_array_fltr');

// create filter function
function shopp_print_scripts_array_fltr( $to_do ) {
    foreach ( $to_do as $i => $handle ) {
        // prevent shopp.js behaviors from loading as dependency
        if ( 'shopp' == $handle )
            unset($to_do[$i]);
    }
    return $to_do;
}

See Also

You must be logged in to post a comment.

© Ingenesis Limited. Shopp™ is a registered trademark of Ingenesis Limited.

Skip to toolbar