You are using esc_attr()
, which isn’t available if you use define( 'SHORTINIT', true );
, see source. So you either have to load the formatting.php
manually or have to ditch the define( 'SHORTINIT', true );
– actually like the example in the thread you are referring to shows.
As said in the comment, I checked out mentally after the first function that can’t work, but you are right about do_action
– can’t tell you exactly though what you need for that. Anyway, you should probably just not use SHORTINIT
and won’t have problems. Just to note as much, personally I just do my AJAX tasks the WordPress way.
Related Posts:
- Ajax takes 10x as long as it should/could
- store/cache ajax sent data to avoid repeated request
- Minimal WordPress load for only `get_option` to work (because ajax…)
- Async Loading of Custom Posts
- admin-ajax.php slows down, but cant figure out which plugin
- Load WP content with ajax less server demanding and faster than normal page loading?
- Performance optimization of tree like structure
- Tabbed feeds with ajax vs. without on homepage [closed]
- Disabling ajax code that does a POST request that ends in a 400 error code
- Content including hooks inside wp-settings.php are being called twice in WordPress
- Ajax takes 10x as long as it should/could
- Ajax take too long to return code
- Speeding up admin-ajax.php
- ASP.NET MVC controller actions that return JSON or partial html
- How to check if I am in admin-ajax.php?
- Ajax in a settings page (update_option is undefined)
- gettext does not translate when called in ajax
- Execute one AJAX request after another AJAX request finished
- Ajax and autocomplete
- admin-ajax.php vs Custom Page Template for Ajax Requests
- Load tinyMCE / wp_editor() via AJAX [duplicate]
- Is there a hook that fires before an ajax call?
- AJAX request from Chrome Extension to WordPress Website
- How to correctly load wordpress in a non WP script for AJAX request
- Why is admin ajax reloading my page
- Plupload in metabox – AJAX action not working in Class
- Why this plugin doesn’t work with media upload page?
- CPU usage: AJAX and Heartbeat API on admin pages
- add_action(‘wp_ajax_[action name]’, myfunction) problem
- Solve cors problem using rest api or ajax
- Can part of my WordPress website be headless?
- Nonces, AJAX, script variables & security in WordPress
- Extending wp JavaScript base class to make a post request to a custom REST endpoint
- Why would admin-ajax.php redirect to the home page for logged out users?
- wp_localize_script escaping my url – fix or alternative
- Insert wp_editor on front-end with AJAX?
- Admin Ajax and HTML5 Formdata
- Implementing an AJAX POST API call in wordpress
- Woocommerce Ajax Add cart not working
- WordPress ajax problem need wordpress expert?
- Ajax WordPress Login needs to be stayed in current page Url without redirecting
- wp_ajax function did not call
- Loading comments in ajax – comment-reply function missing $args
- Woocommerce update product price via AJAX
- How do I query posts by a sub value with the API?
- Popup or admin/update notice on post/page edit screen without page refresh
- Enqueue script in plugin is not working
- Single page site + pushState?
- Ajax call does not work for this simple code
- WordPress ajax call returns a zero though die()
- wp_update_post onclick button using ajax
- Check ajax triggered from front-end or from dashboard
- Localize script not working
- Why, if a function accepts arguments, it fails on ajax calls?
- wp_ajax declaration confusing for Front end
- Delete ACF repeater field row on Front End
- No errors in the console but Ajax call doesn’t seem to be working
- Preprocess submitted data
- Update status, meta while inside a post using AJAX button
- WP_query offset seems to be counting draft post – AJAX load more
- Can’t retrieve any content from Ajax-loaded page
- adding ajax load more to display images from meta box
- Can’t load search results with ajax
- wp_ajax is not calling the action
- Deny dashboard access breaks ajax requests
- Run javascript upon successfully set featured image
- update_option in WordPress AJAX
- Load more posts (Ajax) in tabbed sidebar on single.php
- Something strange with ajax
- admin-ajax.php returns 0 even when the post status code is 200 OK
- Why is the file not uploading to the server?
- Get localize of a loaded javascript
- Merge PDF files from post custom fields(ACF) into one PDF file and respond back the created PDF file, WordPress(AJAX Request)
- REST public POST giving 403 forbidden nginx
- Query data after an Ajax insert
- Sending email through Ajax without page refresh hangs on admin_ajax.php
- Is there a public ajax endpoint?
- Why Ajax Doesn’t Work?
- How can i do public ajax call?
- How to prevent multiple post with same meta value being created simultaneously in WordPress (with ajax)
- Problem when sending file via ajax
- wp_verify_nonce not working on the mobile device
- Can’t GET Variable from AJAX URL
- JS global variable doesn’t update
- 404 error custom post type rest api
- How to update cart total after AJAX success
- Change button text after ajax db update
- Jquery wrap permalink in a data-attribute?
- How do I display posts of a specific day?
- (Frontend AJAX) get post data WITH image thumbnail?
- Load .php file into div using ajax
- Native WordPress Video Shortcode Not Working After Post is Loaded via Ajax
- Ajax Function call is always returning 0 in front end(without plugin) [closed]
- AJAX Post from same domain to a wordpress page
- Using AJAX for dynamic settings pages
- admin ajax is not working for non logged in users
- wp_localize_script not create variable in head section
- AJAX admin Internal 500 error Failed to Upload
- Class property not visible inside ajax callback function?
- Run PHPMailer function after ajax function completes that adds row to custom table