1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
<script type="text/javascript">
var img = 0;
var image = new Array();
</script>
<?php
$query_images_args = array('post_type' => 'attachment', 'post_mime_type' =>'image', 'post_status' => 'inherit', 'posts_per_page' => -1);
?>
<script type="text/javascript">
<?php
$query_images = new WP_Query( $query_images_args );
foreach ( $query_images->posts as $image) {
?>
image[img] = new Image();
image[img].src = "<?php echo wp_get_attachment_url( $image->ID ); ?>";
img++;
<?php
}
?>
</script> |
Partager