Hot answers tagged


We start by adding the custom TinyMCE Button: function add_mce_button_custom_em() { // check user permissions if ( !current_user_can( 'edit_posts' ) && !current_user_can( 'edit_pages' ) ) { return; } // check if WYSIWYG is enabled if ( 'true' == get_user_option( 'rich_editing' ) ) { add_filter( '...


From quick look WP seems to process array of theme data in a way that is used for both PHP and JS sides. Result passes through wp_prepare_themes_for_js filter, which seems like a suitable place to override screenshot URL as necessary. This worked in my dev install: add_filter( 'wp_prepare_themes_for_js', function ( $themes ) { $themes['r-test']['...


That area of all admin screens is where admin notices are displayed, so you could generate an admin notice. Here's a suitable function and hook: function wpse_233031_admin_notice() { ?> <div class="notice notice-info"> <p>Your message here!</p> </div> <?php } function wpse_233031_hook_admin_notice() { ...


You could try a plugin like Visual Editor Custom Buttons. Or you may want to do something custom. There's a solid example at


I am not confident without downloading Estonian copy of WP source, but from look at GlotPress it seems that locale code for it is simply et, not et_EE.


Sure. In your single.php or where you loop through the posts, start by getting the content: $content = get_the_content(); Then use a regex where you target anything within <h2> tags: $regex = '/<h2>(.*?)\<\/h2>/u'; And then use preg_match_all() to find all titles: preg_match_all($regex, $content, $table_of_content); This will ...

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