My metabox class

it says right in the instructions that you just include the class //include the main class file require_once(“meta-box-class/my-meta-box-class.php”); you’d put that in whatever file you are using for the code blocks you posted… not in the function you’ve written. looks like there is a pretty good section called “Usage” at the link you provided. you … Read more

Create a Meta Box in the Admin User Screen?

Well, as you already know, meta boxes are for post types only… What you can do is to customize the heck out of that screen. What follows is the code I used on a client’s custom theme. Originally, it was used with the action hook admin_print_scripts-profile.php (which could also be added bellow). /functions.php: add_action( ‘admin_print_scripts-user-new.php’, … Read more

Hide meta box based on post format

Try this one: jQuery( document ).ready( function($) { // Starts by hiding the “Video Options” meta box $( “#video-options” ).addClass( “hidden” ); if( $( “input#post-format-video” ).is(‘:checked’) ){ $( “#video-options” ).removeClass( “hidden” ); } // If “Video” post format is selected, show the “Video Options” meta box $( “input#post-format-video” ).change( function() { if( $(this).is(‘:checked’) ){ $( … Read more

all tincymce’s switch when updating page after changing from html to text in custom metabox

This is, as you guessed, default behavior. It’s stored in the wp_usermeta table for each user in the wp_user-settings meta_key and does not differentiate between different editor instances. On a side note, the tinymce version of wp_edior() does not cooperate very well with being inside a meta box. Especially if the metabox is moved, or … Read more

Add ‘Right Now’ widget to custom dashboard

I’ve got to know it in Make WordPress UI. The plugin Dashboard uses a very interesting technique: add_action( ‘load-index.php’, array( $this , ‘override_dashboard’ ) ); public function override_dashboard() { if( !isset( $_GET[‘page’] || ‘custom-dash’ != $_GET[‘page’] ) return; if ( get_current_screen()->in_admin( ‘site’ ) ) { require dirname( __FILE__ ) . ‘/dashboard-override.php’; exit; } } And … Read more

Are there any standard HTML markup for metabox?

WordPress.org UI Style Guide site has some reference materials, including those on Box Formats and Forms. As far as I remember it’s not consistently maintained or considered especially canonical source. In practice elements are often done after studying current state of actual admin markup.

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