-
-
Save billerickson/b85243965c4e1231bb74750a2f0719a7 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 | |
/** | |
* 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