Send data to Editor before saving the post

Assuming you refer to the WP main editor, you can get the TinyMCE instance with var mainEditor = tinyMCE.getInstanceById(‘content’); then clear the current content with: mainEditor.setContent(”); and add your new content mainEditor.setContent(‘we are the borg lower your shields and surrender your ships’); If the new content doesn’t get saved, call tinyMCE.triggerSave(); additionally.

Display Pointer only once?

The idea of the pointer is to update the user meta when the pointer is closed. This is what will prevent the pointer from displaying on every page load. Once the user clicks “Close”.. that user meta pointer key is updated. So, add a post method to your close function: close: function() { // Once … Read more

Filter didn’t work on content class (hybrid_post_attributes)

For your filter to work, the Hybrid Core code would have to run something like $abcd = apply_filters(‘hybrid_post_attributes’,$something); and I don’t see that in the code you posted. In fact, I don’t see apply_filters anywhere at all. Based entirely on that posted code, you can’t filter those items. I don’t think you understand how filters … Read more

How to make sure relative URL works when site is not on root domain?

Make use of the functions wordpress offers to determine paths and URLs – see Determining Plugin and Content Directories. For example use: get_template_directory to Retrieves the absolute path to the directory of the current theme, without the trailing slash. or get_stylesheet_directory to Retrieve stylesheet directory Path for the current theme/child theme. You find more information … Read more