• The plugin in its current form sends a Yo whenever anything at all is published — including custom post types. For my site (and most others, I suspect), I don’t want a Yo sent out whenever something new is added to some CPT database — just when a standard post/article is published. I added this to our install to do that — maybe it might be a good thing to consider for the plugin?

    function send_yo_on_publish( $new_status, $old_status, $post ) {
    	$theposttype = get_post_type( $post );
        if ( $new_status == 'publish' && $new_status != $old_status && $theposttype == 'post' ) {
            $link = get_permalink( $post->ID );
            yo_all($link);
        }
    }

    https://wordpress.org/plugins/yo/

Viewing 1 replies (of 1 total)
  • Plugin Author paulmolluzzo

    (@paulmolluzzo)

    Thanks for the suggestion!

    The implementation seems fine, but what about people who are using custom post types for core pieces of their site? For example, a cooking blog that has custom “recipe” posts. IDK.

    The most “generic” solution I can think of is to put a little custom field with a checkbox that says, “Send a Yo with this post”. But even then, you might as well have two checkboxes so you can turn on sending a Yo and also toggle whether you’d include a link.

    This project is up on Github and I’d welcome a pull request for that checkbox idea if you’re up for it. If not that’s cool too.

Viewing 1 replies (of 1 total)

The topic ‘Plugin sends Yos for all post types’ is closed to new replies.