jeffreykarbowski
Forum Replies Created
-
Forum: Plugins
In reply to: [Postie] Can’t connect to mail hostSame. Please advise.
Forum: Plugins
In reply to: [Advanced Custom Fields: Extended] ACFE Button Ajax 400 errorNevermind, I figured this out, thanks so much for you efforts and wonderful extension to ACF!
Forum: Plugins
In reply to: [Advanced Custom Fields: Extended] ACFE Button Ajax 400 errorThanks, that was an issue, but only because when I copied over the code here I mistakenly didn’t change both action function names. I did however figure out the issue with the 400 error, it was that I was including the function only on the post.php edit page, it also needed to be included while doing ajax. (|| wp_doing_ajax()), and I am now getting a response.
I am now having issues with getting the response to the success callback.
Here is the code I have:function acfe_buttons_ajax() { ob_start(); echo 'Results'; $result = ob_get_contents(); ob_end_clean(); return $result; wp_die(); } add_action('wp_ajax_acfe/fields/button', 'acfe_buttons_ajax'); add_action('wp_ajax_nopriv_acfe/fields/button', 'acfe_buttons_ajax');
and:
acf.addAction('acfe/fields/button/ajax_success', function(response, $el){ alert(response); });
The js does the alert, but just alerts “0”. Any thoughts?
The .js is enqueued in functions.php like:
function agency_enqueue($hook) { if ( 'post.php' != $hook ) { return; } wp_enqueue_script( 'agency_js', get_stylesheet_directory_uri() . '/js/admin-agency.js', array('jquery'), null, true ); } add_action( 'admin_enqueue_scripts', 'agency_enqueue' );
Forum: Plugins
In reply to: [Media Vault] Plugin not loading on popup media uploaderI am also looking for this functionality, seems like it should protect PDFs automatically whether or not you are upload to the Media Library, or uploading to a page. Any clues would be appreciated, Thanks.