Hey leute ich will gerade ein wordpress plugin bauen scheitere aber am javascript könnt ihr mir helfen?
dieses script auf jeder meiner wordpress seiten in den head eingefügt und ist dazu da um aufrufe zu zählen inkl. Agent, IP, Standort usw.
dieses script auf jeder meiner wordpress seiten in den head eingefügt und ist dazu da um aufrufe zu zählen inkl. Agent, IP, Standort usw.
PHP:
add_action('wp_head','hook_javascript');
function hook_javascript()
{
$output="<script>
$( document ).ready(function() {
$.ajax({
type: 'GET',
url: 'HIER HIN SOLL DIE WEBSEITEN URLmittelsjavascrupt wp-content/plugins/telecount/views.php',
cache: 'false',
dataType: 'json',
success: function(response) {
// alert(response.status)
}
});
});
</script>";
echo $output;
}
Zuletzt bearbeitet von einem Moderator: