Custom column for changing post status via ajax

here you go: <?php /* Plugin Name: ajaxed-status Plugin URI: http://en.bainternet.info Description: answer to : Custom column for changing post status via ajax http://wordpress.stackexchange.com/questions/33442/custom-column-for-changing-post-status-via-ajax Version: 1.0 Author: Bainternet Author URI: http://en.bainternet.info */ if ( !class_exists(‘ajaxed_status’)){ class ajaxed_status { //constarctor public function __construct() { global $pagenow,$typenow; //&& $typenow ==’page’ if (is_admin() && $pagenow==’edit.php’){ add_filter(‘admin_footer’,array($this,’insert_ajax_status_script’)); } add_filter( … Read more

wp_list_tables bulk actions

If you add a bulk-action, then you have to react on this action. Simply adding a function doesn’t do anything, you have to call it: class WPSE_List_Table extends WP_List_Table { public function __construct() { parent::__construct( array( ‘singular’ => ‘singular_form’, ‘plural’ => ‘plural_form’, ‘ajax’ => false ) ); } public function prepare_items() { $columns = $this->get_columns(); … Read more

Add “external” link to admin menu in the backend

you can create a function that redirects to the front-end like this: function redirect_home_987(){ wp_redirect( home_url() ); exit; } and call that function in WordPress default add_menu_page function like this: add_menu_page( ‘redirecting’, ‘View Site’, ‘read’, ‘my-top-level-handle’, ‘redirect_home_987’); Hope this helps

How to filter by post-format in admin?

Try this plugin i cooked up: <?php ! defined( ‘ABSPATH’ ) AND exit; /** * Plugin Name: (#26032) WP_List_Table Post Format filter extension * Plugin URI: http://wordpress.stackexchange.com/questions/26032/how-to-filter-by-post-format-in-admin * Description: Filters the admin WP_List_Table by post format * Author: Bainternet * Author URI: http://en.bainternet.info */ function wpse26032_admin_posts_filter( &$query ) { if ( is_admin() AND ‘edit.php’ === … Read more

Use a different domain for SSL

Just to keep things nice & clear, I’ve posted this as a new answer. Let’s reset the playing field & follow the below instructions as if it were a shiny new install (ignore all code & suggestions in previous answers). In your wp-config.php define( ‘WP_SITEURL’, ‘http://www.realdomain.com/blog’ ); define( ‘SSL_DOMAIN_ALIAS’, ‘realdomain.maindomain.net’ ); define( ‘FORCE_SSL_LOGIN’, true ); … Read more