How do I integrate a codepen?

All sorted. My theme actually had a section for custom javascript in the theme options. I added the code there and used the enqueue for the bootstrap – all working fine now.

VisualComposer/WPBakery Page Editor: Is any JS event triggered after the Edition pop-in is shown?

Solution: add an action on the tag vc_edit_form_fields_after_render. add_action( ‘vc_edit_form_fields_after_render’, function() { echo ‘<script src=”‘ . AN_URL . ‘test.js”></script>’; // Or something other }, 9 ); In the functions.php or equivalent. (Indeed, the tag vc_edit_form_fields_after_render is used by do_action( ‘vc_edit_form_fields_after_render’ ) which is located in js_composer\include\classes\editors\class-vc-edit-form-fields.php . So what you type in your add_action callable … Read more

Get user in rest API endpoint

Thanks to Jacob Peattie, I was able to solve this issue. You have to include a nonce from the WordPress Javascript API in your REST API requests if you wish to use information about the current user. From the WordPress documentation: If no nonce is provided the API will set the current user to 0, … Read more