Adding tables to dashboard pages programmatically?
Well in that case take a look at this tutorial on how to use the native WP_List_Table
Well in that case take a look at this tutorial on how to use the native WP_List_Table
From stackoverflow: https://stackoverflow.com/questions/2450510/redirect-after-plugin-activation register_activation_hook(__FILE__, ‘my_plugin_activate’); add_action(‘admin_init’, ‘my_plugin_redirect’); function my_plugin_activate() { add_option(‘my_plugin_do_activation_redirect’, true); } function my_plugin_redirect() { if (get_option(‘my_plugin_do_activation_redirect’, false)) { delete_option(‘my_plugin_do_activation_redirect’); wp_redirect(MY_PLUGIN_SETTINGS_URL); } }
I would suggest looking at this StackOverflow post – Image Map Editor – particularly the top answer’s recommendation: imgAreaSelect. imgAreaSelect is a jQuery plugin for selecting a rectangular area of an image. It allows web developers to easily implement image cropping functionality, as well as other user interface features, such as photo notes (like those … Read more
Quick and easy. if ( is_plugin_active( ‘plugin-folder-name/main-plugin-file.php’ ) ) deactivate_plugins( ‘/plugin-folder-name/main-plugin-file.php’ ); It’s important to note the is_plugin_active string is slightly different than the deactivate_plugins string.
As far as my usage with Yoast’s WordPress SEO plugin goes, I thought always assumed the plugin simply replaced any existing code with what it generates for that same purpose. If you are using the plugin and don’t want to disable it, then simply go into your header.php file and delete/comment-out any meta tags that … Read more
You’ve got to actually check is_plugin_active. I would use something more like this, shamelessly stolen and modified from here: register_activation_hook( __FILE__, ‘dependentplugin_activate’ ); function dependentplugin_activate() { require_once( ABSPATH . ‘/wp-admin/includes/plugin.php’ ); if ( is_plugin_active( ‘nextgen-gallery/nggallery.php’ ) ) { require_once ( WP_PLUGIN_DIR . ‘/nextgen-gallery/nggallery.php’ ); } else { // deactivate dependent plugin deactivate_plugins( __FILE__); // throw … Read more
The multi-select field you referenced appears to be stored in PHP serialized format, which is used for “storing or passing PHP values around without losing their type and structure”. To unserialize a custom field value you need to use the unserialize() function: $multi_select_field = unserialize( get_post_meta( get_the_ID(), ‘custom_field_key’, true ) );
Take a look here: specify meta_key / meta_value condition for prev_post_link and next_post_link Which ultimately leads to this plugin, which accesses the get_adjacent_post function mentioned above: Ambrosite Next/Previous Post Link Plus And looks like it would fit your needs by allowing you to specificy a meta_value for the next/prev post hook.
Permalinks in WP do not actually have anything to do with wp_posts.guid any more. I believe that historically they did, and have been left in because of RSS feeds – I.e. changing them would cause peoples feeds to think that the posts had not been read. Your permalink structure is stored within your wp_options table … Read more
How to create custom columns for post types: http://justintadlock.com/archives/2011/06/27/custom-columns-for-custom-post-types