Ok, here are some pointers:
-
never run any meaningful code right from plugin body (especially don’t start queuing jQuery everywhere like you do – that’s asking for trouble), always do it at appropriate hooks;
-
learn how to use
$default
argument inget_option()
will save you a lot of typing there; -
learn how to use
plugins_url()
for reliable URL building to files; -
learn
submit_button()
, not critical but nifty; -
consider storing options in single array;
-
if you use options you should implement uninstall to delete them.
Related Posts:
- Custom plugin giving: wp-admin/admin-ajax.php 400 (Bad Request)
- jQuery AJAX call not executing in Plugin
- Why is my ajax call refreshing the page?
- What’s the point of using WordPress’s built in admin-ajax.php?
- Admin-ajax.php is dying “0” without processing function
- How to create popup same as wordpress popup feature
- Only execute jQuery function(on document ready) on the page has shortcode from plugin [duplicate]
- Ajax with jQuery UI dialog not working
- How to add pagination to wpbakery grid?
- jQuery Plugin to use WordPress functions in AJAX request
- Check if email address exists front end with AJAX in a plugin
- Form isn’t inserting data into database with ajax plugin
- How to put JQuery/Ajax inside shortcode?
- Ajax contact form widget plugin data not insert in database
- How can I inject options into an select tag inside the widget form?
- Display wordpress post’s in popup?
- Using color picker in plugin, does input attribute order matter?
- Post Comments with Ajax in WordPress
- how to insert data in wordpress table usnig jquery ajax
- AJAX fileupload – TypeError: not a function ajaxSubmit()
- wordpress add_action() issue in ajax call
- How to display checked posts on another page over AJAX? (like comparasion style)
- How to include my Ajax calls in one function instead of calling different ones every time?
- Using AJAX to run SQL statement and populate dropdown
- Ajax request sends url rather than data
- wc_get_template_part doesnt display the content [duplicate]
- Jquery POST Ajax Return null data in wordpress
- How do I reinit WordPress plugins dynamically using jS?
- WP Ajax DB issues
- Cannot pass value variable to WP AJAX functions
- Ajax Call not Working in Plugin
- jQuery Ajax not loading page with ACF fields
- JS working when used normally but not in wordpress
- checkout stripe with plugin contact form
- WordPress Ajax request “Failed to load resource: the server responded with a status of 400 ()”
- Custom plugin giving: wp-admin/admin-ajax.php 400 (Bad Request)
- Overwriting Plugin’s Ajax callback function from theme
- Ajax Load More on Hierarchical Categories
- Help with customising love it plugin (use within foreach)
- WordPress Feedback popup with date saved into table
- Not getting result using ajax on wordpress
- WordPress ajax not working in registration
- AJAX doesn’t pass variables to the php function in the plugin
- Like/Dislike Bar not working when updating
- Ajax, jQuery and WordPress
- Hyperlink to execute PHP
- How to get site homepage from plugin?
- WordPress plugin ajax post parameter
- Load css classes after using ajax calls
- How to create load more button without a plugin?
- Jquery post responses 500 error after some time and lastly an 503 error
- Ajax button “Load more” is not loading correct language version posts for logged out users
- What’s the preferred method of writing AJAX-enabled plugins?
- force enqueue script to be first in order of prominence
- Handling jQuery Component Collision
- How to Add jQuery Infinite Scroll to My Custom Archive Page
- Ajax Load More and Masonry: is it possible to load admin-ajax.php in the front end?
- WordPress Plugin development Call to undefined function jQuery()
- How can I process xml file on upload?
- WordPress 3.5 Media Manager – add a button
- Handling jQuery Component Collision
- ajax front-end increment views on click
- Infinite Scroll for both Index, Category and Archive
- How to Create a Custom Panel and Fields in Post Page [Plugin]
- Admin Panel pagination link styles
- Theme is Causing Ajax Conflicts for a plugin I cant identify it
- Search for categories
- Uncaught TypeError: jQuery(…).flipster is not a function in wordpress
- How to show only next post pagination link using wp_link_pages()
- jQuery | JJ Carousel Plugin – Can’t set speed [closed]
- AJAX call – failling to call do_action
- What are the Best Practises When Using AJAX in Plugin Development?
- How to track clicks
- where do I send my ajax calls
- Replacing global wp_query
- Ajax save data to database on document ready, no data being saved
- How to get specific string/value from an array? php [closed]
- How to request admin-ajax.php correctly when wordpress URL and site URL are different?
- Passing PHP Variables to AJAX Loaded Pages
- Why jquery option is not working when pass value using wp_localize_script?
- “switchEditors is not defined” with wp_editor() in jQuery UI tabs
- admin-ajax.php 500 error when new users try to register
- Send Array from JS to php file then insert it in wp database through a plugin
- Cannot read properties of undefined (reading ‘firstChild’) using photoswipe in product page
- Trigger jQuery to add events after AJAX-loading table in admin plugin
- $wpdb not working wordpress plugin ajax call
- Conditionally load public and admin code with AJAX working on both sides
- Dynamic input fields in WordPress Plugin
- WordPress ajax error 400 bad request for sending data to remote site [duplicate]
- Get shortcode attribute for AJAX call
- Why can’t I call a function from inside my registered AJAX function?
- Add HTML between feed items
- Javascript not working
- ajax request not returning the result
- My AJAX API plugin isn’t working
- ajax sends data to plugin
- FacetWP: Plugin breaks button/modal functionality inside searchable content area
- TypeErrors with Yoast, jQuery in conflict?
- Count div with class (.length) only shows 0 [closed]
- wordpress admin-ajax bad request 400