Change padding to text indent in “Increase indent” TinyMCE

You need to modify the TinyMCE settings object on instantiation: Reference: TinyMCE documentation – content formatting WordPress provides a filter for this very purpose called tiny_mce_before_init which you can use as follows: function modify_tinymce_settings($settings) { $settings[‘indentation’] = ’10px’; return $settings; } add_filter(‘tiny_mce_before_init’, ‘modify_tinymce_settings’); If that does not work precisely, then dump the output of $settings … Read more

Hide page visual editor if template is selected – redux

The following works for me, testing with TwentyTwelve. Using load-{$pagenow} instead of admin_init avoids the checking for the global $pagenow. See comments for further info: // Run only when editing a page // For new pages load-page-new.php should be used // See: http://core.trac.wordpress.org/browser/tags/3.5.1/wp-admin/admin.php#L217 add_action( ‘load-page.php’, ‘hide_editor_wpse_88886’ ); function hide_editor_wpse_88886() { // Not really necessary, but … Read more

How can I insert HTML attributes with an existing TinyMCE button?

The following workaround is based on the wpeditimage/plugin.js file in the core. You could enqueue it or test it with: add_action( ‘admin_footer-post.php’, function() {?><script> jQuery(window).load( function( $ ) { if( ! $( “#wp-content-wrap”).hasClass(“tmce-active” ) ) return; var editor = tinyMCE.activeEditor; editor.on( ‘BeforeExecCommand’, function( event ) { var node, DL, cmd = event.command; if ( cmd … Read more

WordPress shortcut to switch from Visual to Text mode and vice versa

There are no shortcuts, but you could add some by eg adding accesskeys to the editor html generated (in your theme’s “functions.php”): function mytheme_edit_form_after_title( $post ) { ob_start(); } function mytheme_edit_form_after_editor( $post ) { echo str_replace( array( ‘id=”content-tmce”‘, ‘id=”content-html”‘ ), array( ‘id=”content-tmce” accesskey=”V”‘, ‘id=”content-html” accesskey=”E”‘ ), // ‘T’ already used for ‘Insert Read More tag’. … Read more

Remove path from the create/edit a post view

Use the filter tiny_mce_before_init to customise the default configuration; function wpse_11867_tiny_mce( $config ) { $config[‘theme_advanced_path’] = false; return $config; } add_filter( ‘tiny_mce_before_init’, ‘wpse_11867_tiny_mce’ ); Check out all the options available on the Tiny MCE documentation.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)