Created
November 6, 2017 06:18
-
-
Save kadai/0ef4efc69bbd8e4fa8d60d4593fa06f9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'wp_footer', 'funcion_codigo_especial' ); | |
function funcion_codigo_especial(){ | |
/* AQUÍ IMPRIMIMOS EL CÓDIGO JAVASCRIPT A USAR */ | |
/* O LO PODEMOS DELIMITAR ENTRE "?>" Y <?php" */ | |
} | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="http://code.jquery.com/jquery-latest.min.js"></script> | |
<script type="text/javascript"> | |
(function(){ | |
var ique=document.createElement("script"),iqueC=document.getElementsByTagName("script")[0]; | |
ique.async=true; | |
ique.src='http://chat.dominio.net/cgi-bin/Empresa/js.js'; | |
ique.charset='UTF-8'; | |
ique.setAttribute('crossorigin','*'); | |
iqueC.parentNode.insertBefore(ique,iqueC); | |
})(); | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'wp_enqueue_scripts', 'el_script_agregado' ); | |
function el_script_agregado(){ | |
/* AGREGAMOS NUESTRO SCRIPT AL FINAL DEL DOCUMENTO WEB */ | |
/* EL ÚLTIMO PARAMETRO INDICA QUE AHÍ SE DEBE AGREGAR (EN PIE DE PÁGINA [CIERTO|FALSO]) */ | |
wp_enqueue_script('mi_script', get_template_directory_uri() . '/url-al-script/en-tema/archivo.js', array('jquery'), '1.0.0', TRUE); | |
} | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
(function($){ | |
/* CÓDIGO EN jQuery QUE USA LAS "$" */ | |
})( jQuery ); | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
jQuery(document).ready(function( $ ) { | |
/* CÓDIGO EN jQuery QUE USA LAS "$" */ | |
/* Y QUE VA EN UN WIDGET */ | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment