Default, locked sorting of posting fields

I can answer the last part: “I also want the excerpt-field to be above the content-field. Is all this possible?” The only way to move anything above the content field is via JavaScript–there are no php hooks or filters up there. It’s kind of a lame workaround because you can usually see (visually) the jump … Read more

Custom taxonomy admin description

I don’t know of any hooks to add or filter the metabox so you can either create your own metabox to replace the custom taxonomy metabox or in this case just use JQuery .append() for example is your taxonomy is named banners and its none – hierarchical (like tags) then: $(‘.tagsdiv-banners’).append(‘<p>your short description here</p>’); and … Read more

“Automatically add new top-level pages” Default

<?php add_action( ‘wp_create_nav_menu’, ‘PREFIX_nav_menu_auto_add_by_default’ ); function PREFIX_nav_menu_auto_add_by_default( $id ) { $options = (array) get_option( ‘nav_menu_options’ ); if ( ! isset( $options[‘auto_add’] ) ) { $options[‘auto_add’] = array(); } $options[‘auto_add’][] = $id; update_option( ‘nav_menu_options’, $options ); }

Reference external file as a function

You can’t. Create a function that loads that file: function load_admin_page_file() { require ‘admin-members.php’; } Then use that function name as callback argument. In PHP 5.3 you can use a lambda: add_menu_page( ‘Members’, ‘Members’, ‘manage_options’, ‘members’, function() { require ‘admin-members.php’; } );

WordPress 3.8 get current admin color scheme

I actually made it! In my script file, at the to I define a new variable and copy the $_wp_admin_css_colors variable into it using the admin_head hook, since the variable gets destroyed at some later point: <?php global $admin_colors; // only needed if colors must be available in classes add_action(‘admin_head’, function() { global $_wp_admin_css_colors; global … Read more