Salve sto sviluppando un plugin che necessita la jQuery ma mi chiedo se sia possibile verificare se altri plugin (o lo stesso wordpress) la includano già .. per evitare doppie inclusioni e conflitti.
ps. voglio mantenere una certa indipendenza e lavorare SOLO col plugin .. quindi non chidete di modificare header.php manualmente etc …
ad oggi sto utilizzando questo codice… è corretto?
function mia_funzione() {
if (!is_admin()) {
wp_enqueue_script('jquery');
...
}
}
add_action('wp_print_scripts', 'mia_funzione');
altro dubbio … esiste un metodo più pulito di questo:
echo '<link rel="stylesheet" href="'.$wp_plugin_url.'/style.css" type="text/css" media="screen" />';
( sempre dentro la funzione mia_funzione() )
per includere un foglio di stile css?
e per finire..se qualcuno mi fornisse un esempio semplicissimmo e di base su come realizzare poi un pannello d’amministrazione da aggiungere alla Dashboard glie ne sarei infinitamente grato