Tag Info

Hot answers tagged

3

The third parameter for transition_post_status is the post object. Use it. add_action( 'transition_post_status', 'dostuff', 10, 3 ); function dostuff( $new_status, $old_status, $post ) { } When in doubt, do not use globals. They are not reliable, they make your code hard to test and to read.


3

This is the filter: "plugin_install_action_links". You can find this in /wp-admin/includes/class-wp-plugin-install-list-table.php (currently) at line 434: $action_links = apply_filters( 'plugin_install_action_links', $action_links, $plugin ); Use it like: add_filter( 'plugin_install_action_links', 'my_custom_links', 10, 2 ); function my_custom_links( ...


2

This is the filter: views_plugin-install You can find this in /wp-admin/includes/class-wp-plugin-install-list-table.php (currently) at line 226: $views = apply_filters( "views_{$this->screen->id}", $views ); Use it like: add_filter( 'views_plugin-install', 'my_filter', 10, 1 ); function my_filter( $views ){ //Do your stuff return $views; ...


1

I would remove the jQuery save function that was added... and then... Try this for the form function: public function form( $instance ) { // Code for editing/adding title and adding IDs to the <select> object // ... <?php printf ( '<select multiple="multiple" name="%s[]" id="%s" class="widefat" size="15" ...



Only top voted, non community-wiki answers of a minimum length are eligible