Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created May 24, 2016 13:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save billerickson/b85243965c4e1231bb74750a2f0719a7 to your computer and use it in GitHub Desktop.
Save billerickson/b85243965c4e1231bb74750a2f0719a7 to your computer and use it in GitHub Desktop.
<?php
/**
* DEBUGGING Javascript for Load More
*
*/
function be_load_more_js() {
global $wp_query;
$args = array(
'nonce' => wp_create_nonce( 'be-load-more-nonce' ),
'url' => admin_url( 'admin-ajax.php' ),
'query' => $wp_query->query,
);
$args = isset( $arg['query'] ) ? array_map( 'esc_attr', $args['query'] ) : array();
$args['post_type'] = isset( $args['post_type'] ) ? esc_attr( $args['post_type'] ) : 'post';
print_r( $args );
//wp_enqueue_script( 'be-load-more', get_stylesheet_directory_uri() . '/js/load-more.js', array( 'jquery' ), '1.0', true );
//wp_localize_script( 'be-load-more', 'beloadmore', $args );
}
add_action( 'wp_enqueue_scripts', 'be_load_more_js' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment