Target post type edit page to change view post button, how do I?

»View Post« Button There’s a filter that you can use with a simple str_replace. Not the best solution, but there’s no other one: apply_filters(‘get_sample_permalink_html’, $return, $id, $new_title, $new_slug) »Preview« Button For the »Preview« Text, there’s not filter (only for the link target), but you can take a look at this Answer by @toscho on how … Read more

Is it possible to activate customfield ‘text description’ upon activating the customfield ‘checkbox’?

A possible solution is to use jquery to show/hide your custom field, something like this: <script> jQuery(document).ready(function($) { $(‘#yourcheckboxidentifier’).click(function() { $(‘#customfieldidentifier’).fadeToggle(400); }); if ($(‘#yourcheckboxidentifier’).val() !== undefined) { $(‘#customfieldidentifier’).show(); } }); </script>

Making the Content Editor Box Bigger in 2013

I write a small plugin to give ability for user to change the edito height in a option of profile page. A sort of back in time to WP < 3.5.2 Workflow Create custom field in the profile settings On admin init check if we are in the right page, if so set an hook … Read more

P̶l̶a̶c̶e̶h̶o̶l̶d̶e̶r̶ *Default* content in Custom Post Type TinyMCE editor

There is no way to add “placeholder” for TinyMCE, but you can set default content for newly created posts. All you need is just to hook default_content filter and return your formatted paragraphs: add_filter( ‘default_content’, ‘wpse8170_get_default_instructions’, 10, 2 ); function wpse8170_get_default_instructions( $content, WP_Post $post ) { if ( $post->post_type == ‘post’ ) { $content=”…. your … Read more

More than one TinyMCE (wp_editor) with different $settings[‘drag_drop_upload’] values breaks

Not sure if this is a bug, but the behaviour is correct, or at least apparently intentional. a) There is only one dragDropUpload setting in the tinyMCEPreInit object, instead of one flag per editor. b) looking at class-wp-editor.php:139: if ( $set[‘drag_drop_upload’] ) { self::$drag_drop_upload = true; } so, if the setting is set to true … Read more