Create a admin page in wordpress without admin menus (“wordpress sidebars”)

You can use the built in ThickBox to display the popup by Ajax: //first add thickbox to your page function add_thickbox(){ if(is_admin() && (isset($_GET[‘page’]) && $_GET[‘page’] == “my-plugin-file.php”) { wp_enqueue_script(‘jquery’); wp_enqueue_script(‘thickbox’,null,array(‘jquery’)); wp_enqueue_style(‘thickbox.css’, “https://wordpress.stackexchange.com/”.WPINC.’/js/thickbox/thickbox.css’, null, ‘1.0’); } } add_action(‘wp_enqueue_script’,’add_thickbox’); //then in your user list for each user you add the thickbox //popup on the onclick and … Read more

Moving wp-admin to a different to a subdomain

I’m using BitNami WAMPStack, but theoretically it could be used for a Linux installation Here is how I did it: 1) Installed BitNami WAMPStack on secondary server. 2) Deleted the secondary servers’ htdocs folder and copied the entire htdocs folder from the primary to the secondary server. 3) open “C:\Program Files\BitNami WAMPStack\apps\wordpress\htdocs\wp-config.php” and edit section … Read more

How to check if upload window came from the featured image link?

There is a filter for the html of the ‘postimagediv’ called ‘admin_post_thumbnail_html’. There may be more elegant ways, but this works: add_filter(‘admin_post_thumbnail_html’, ‘wpse61502_change_thumbnail_link’); function wpse61502_change_thumbnail_link($content) { return str_replace(‘media-upload.php?’, ‘media-upload.php?is_thumbnail=true&’, $content); } In your plugin / script check the querystring: if ( isset($_GET[‘is_thumbnail’]) ) { // do stuff, actions, enqueue, … }

Auto create post title in admin

the_title filter filters the existing title when it’s output on the front end. If you want to set a title when a post is created on the back end, you want to use the title_save_pre filter: function wpa65253_time_title( $title ) { global $post; if ( isset( $post->ID ) ) : if ( empty( $_POST[‘post_title’] ) … Read more