Jump to content
View in the app

A better way to browse. Learn more.

Forum Supreme-Elite

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Changer la source de JQuery dans WordPress

Featured Replies

Si vous souhaitez déporter la bibliothèque JQuery sur un CDN ou un site tiers plutôt que votre propre serveur, c'est très simple. Editez le fichier functions.php de votre thème et ajoutez y la fonction suivante :

function add_scripts() {

wp_deregister_script( 'jquery' );

wp_register_script( 'jquery', 'http://code.jquery.com/jquery-1.7.1.min.js');

wp_enqueue_script( 'jquery' );

}

add_action('wp_enqueue_scripts', 'add_scripts');

Ainsi, JQuery sera appelé directement depuis le site officiel. Attention cependant aux temps de réponse et au nombre de requêtes vers des sites tiers à partir de votre site. Cette astuce à réserver surtout à ceux qui souhaitent utiliser une version modifiée par leurs soins de cette bibliothèque Javascript.

Source

http://feeds.feedburner.com/~r/KorbensBlog-UpgradeYourMind/~4/wpd17n4riwA

Voir l'article complet

function add_scripts() {

wp_deregister_script( 'jquery' );

wp_register_script( 'jquery', 'http://code.jquery.com/jquery-1.7.1.min.js');

wp_enqueue_script( 'jquery' );

}

add_action('wp_enqueue_scripts', 'add_scripts');

 

 

La ligne que j'ai mis en rouge, c'est celle ou l'on doit indiquer le site "source" du jQuery ?

le fichier source oui.

 

J'hésite à dire captain obvious is obvious là (j'ai jamais utilisé cette fonction :P).

Edited by Batoune

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.