Category

Словарь Маркетолога

// Defer jQuery to Footer add_action( ‘wp_enqueue_scripts’, ‘defer_jquery’ ); function defer_jquery() { if ( !current_user_can( ‘edit_pages’ ) ) { wp_deregister_script( ‘jquery’ ); wp_register_script( ‘jquery’, includes_url( ‘/js/jquery/jquery.js’ ), false, NULL, true ); wp_enqueue_script( ‘jquery’ ); } }