-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Large posts lazyload #20
base: master
Are you sure you want to change the base?
Conversation
// wp_register_script( 'selectize-js', plugins_url( 'js/selectize.min.js', __FILE__ ), array( 'jquery' ) ); | ||
// wp_enqueue_script( 'selectize-js' ); | ||
|
||
wp_register_style( 'selectize-css', 'https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't use cdns, download the file and use it
wp_enqueue_style( 'selectize-css' ); | ||
|
||
wp_register_script( 'selectize-js', plugins_url( 'js/selectize.min.js', __FILE__ ), array( 'jquery' ) ); | ||
wp_register_script( 'selectize-js', 'https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js', array( 'jquery' ) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't use cdns, download the file and use it
@@ -452,6 +460,7 @@ function hfcm_redirect( $url = '' ) { | |||
|
|||
// Handle AJAX requests | |||
add_action( 'wp_ajax_hfcm-request', 'hfcm_request_handler' ); | |||
add_action( 'wp_ajax_hfcm-request-example', 'hfcm_request_handler_example' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is it saying example?
?> | ||
|
||
<style> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is stying including here instead of CSS file?
$operator = 'and'; // 'and' or 'or' | ||
$offset = 0; | ||
if(!empty($_POST['page'])) { | ||
$offset = 100 * sanitize_text_field($_POST['page']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no wpnonce verification is being done
current_user_can( 'administrator' ); | ||
|
||
if ( isset( $_POST['insert'] ) ) { | ||
// Check nonce |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nonce check missing
|
||
$offset = 0; | ||
if(!empty($_POST['page'])) { | ||
$offset = 100 * sanitize_text_field($_POST['page']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this limit of 100 needs to be global and shouldn't be defined inline
@@ -0,0 +1,425 @@ | |||
// function to show dependent dropdowns for "Site Display" field. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is this file copy????
disabledOptions.push(jQuery(this).val()); | ||
}); | ||
var data = { | ||
action: 'hfcm-request-example', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why example??? it's a bad name
async:false, | ||
success: function (postData) { | ||
console.log("success"); | ||
console.log(postData); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove all console logs
No description provided.