Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // WP_Ajax & oEmbed
- add_action( 'wp_ajax_acf_oembed', __NAMESPACE__ . '\\acf_oembed_callback' );
- add_action( 'wp_ajax_nopriv_acf_oembed', __NAMESPACE__ . '\\acf_oembed_callback' );
- function acf_oembed_callback() {
- $post_id = $_GET['post_id'];
- $oembed = get_field('oembed', $post_id);
- var_dump($oembed);
- wp_die();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement