Syntax highlighting for post/page editor [closed]

I am using SyntaxHighlighter Evolved by Viper007Bond, works great! http://wordpress.org/extend/plugins/syntaxhighlighter/ After I gave this answer yesterday, I read a recent post by Konstantin Kovshenin over at theme.fm, which gives you all the different possibilities on how to add syntax into your Posts/Pages: http://theme.fm/2011/07/working-with-code-in-wordpress-posts-985/

How to tell if a plugin is multisite compatible?

There are two types of multisite compatibility: Passive compatibility: doing nothing multisite specific, just works without breaking anything. Active compatibility: changing or extending multisite specific behavior. I guess you are out for 1. See my slides from WordCamp Prague 2015 for the second part. Plugins that do not say anything about multisite should not be … Read more

Restricting a Plugin to Only Load its CSS and JS on Selected Pages?

Styles and scripts are always set up by the functions wp_enqueue_script() and wp_enqueue_style(), which have to be tied to a particular action hook in order to function. I took a peek inside Contact Form 7, and it looks like it’s using action tags of wpcf7_enqueue_scripts and wpcf7_enqueue_styles to add them to the wp_print_scripts and wp_print_styles … Read more

How to not allow users to create new tags, but allow to them to use existing ones

You can hook onto pre_insert_term, check the taxonomy and whether or not the user has the specified role as follows: function disallow_insert_term($term, $taxonomy) { $user = wp_get_current_user(); if ( $taxonomy === ‘post_tag’ && in_array(‘somerole’, $user->roles) ) { return new WP_Error( ‘disallow_insert_term’, __(‘Your role does not have permission to add terms to this taxonomy’) ); } … Read more

How to Remove Certain Screen Options and Meta Boxes from add/edit post type?

What you need is in global $wp_meta_boxes indexed by get_current_screen()->id. Removing the screen options will also remove the metaboxes which you can do just before screen options are displayed using the ‘in_admin_header’ hook. So let’s assume you want to get rid of the “Send Trackbacks” screen option which you see in this screenshot: Drop the … Read more

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