Intercept comment form submit/list by hook/filter

wp_list_comments() has no filters or hooks so its going to be a bit hard, what you can do is use comments_array filter hook add_filter(‘comments_array’,’my_custom_comments_list’); function my_custom_comments_list($comments, $post_id){ //if criteria are met //pull your comments from your own table //in to an array and return it. return $my_comments; //else return $comments } and as for “intercept … Read more

Nested shortcodes

You cannot use shortcodes like this. The parser would not read that like you want. But there is a workaround: Hijack the shortcode dropbox-foldershare-hyno, run the callback function for the wp-members on the link and pass the result to the original dropbox-foldershare-hyno callback. Sample code, not tested: // wait until the other plugins are loaded … Read more

Customize WooCommerce Error Message

You can do this with the woocommerce_add_error filter. Add the following to your functions.php file. // alter the subscriptions error function my_woocommerce_add_error( $error ) { if( ‘The generic error message’ == $error ) { $error=”The shiny brand new error message”; } return $error; } add_filter( ‘woocommerce_add_error’, ‘my_woocommerce_add_error’ );

Custom Post Type Statuses

Custom post statuses do exist in the core code of WordPress, so you can register them, but they are not yet properly implemented in the admin screens (e.g. they don’t show in the dropdown list of statuses alongside Pending Review, Draft, Published). So essentially you can do very little with them at the moment. You … Read more

[Plugin: Posts 2 Posts] reciprocal connections

To see connections on both edit screens, set reciprocal to true, but note this is for the UI only, it doesn’t affect connections otherwise. function my_connection_types() { if ( !function_exists( ‘p2p_register_connection_type’ ) ) return; p2p_register_connection_type( array( ‘from’ => ‘movies’, ‘to’ => ‘actors’, ‘reciprocal’ => true ) ); } add_action( ‘init’, ‘my_connection_types’, 100 );