Hot answers tagged

2

Well, yes, you can do that: //replace live edited content to display html editor.on('BeforeSetcontent', function(event){ event.content = tinymce_to_html( event.content ); }); //Transform your html content to raw content editor.on('GetContent', function(event){ event.content = html_to_tinymce( event.content ); }); Let's explain that: Under the ...


1

You don't quite cover how far you got and if you are familiar with basic of WP enqueue process. Focusing on parent part I the basic code would go like this: add_action( 'wp_enqueue_scripts', function () { if ( is_page() && in_array( $book_page_id, get_post_ancestors( get_the_id() ) ) ) { // enqueue stuff } } ); In your examples ...


1

Choose the right place in (rendering-)time First off, you are hooking at init, while you want to add your callback on wp_enqueue_script. Example: add_action( 'wp_enqueue_script', function() { wp_deregister_script( 'jquery' ); // Rest of logic } ); Staying up to date with core Also, you might want to use the correct version that core uses. I ...


1

Migrate message is merely informational. It isn't a warning or error. It is displayed unconditionally whenever respective script is loaded. In current WP version it is loaded whenever jquery handle is requested by anything, alongside jquery-core.


1

That's called Thickbox. Since you give no clue what you want to use it for, you'll have to figure out the rest for yourself...


1

First, don't echo your php, but assemble everything in a string, let's say $titlestring. Next, make this string available for access by the javascript (the slug is the one you used to register the script): $params = array ( 'titlestring' => $titlestring, ); wp_localize_script ('your-script-slug', 'IframeTitle', $params); Finally, access the ...


1

I had 2 things wrong: I unregistered wordpress's jquery without properly registering my own (I concatenated my scripts ) I didnt have wp_footer() in my theme. the wp_enqueue_media() function loads the scripts to the footer.



Only top voted, non community-wiki answers of a minimum length are eligible