Skip to:
Content
Pages
Categories
Search
Top
Bottom

Invite Anyone 0.8.1 – New Custom Post class results in invitations auto-publishing to Twitter page

  • Avatar of gotequity
    gotequity
    Participant

    @gotequity

    url: http://www.thegolfmob.com

    I’m using BP 1.2.7 & WP 3.1 with no issues (so far, fingers-crossed), and WP to Twitter 2.2.7 to auto-publish posts from the site to our Twitter page. After upgrading from v0.8 to v0.8.1, twenty invites from the last few weeks in my DB were auto-published on our Twitter page, all with the title “Migrated Invitation”. Is there a solution for preventing invitations from being published, either by exclusion from custom posts or reverting back to the previous data structure?

    Thanks in advance for any feedback or suggestions.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Avatar of gotequity
    gotequity
    Participant

    @gotequity

    Any ideas or solutions? I really like this plugin and want to use it but have deactivated it to avoid having invites post to Twitter. I’ve searched through the plugin PHP looking for a way to restrict based on category or tag, but came up empty (probably because I don’t have the skills to decifer correctly). If anyone can help, I would greatly appreciate it!!

    Avatar of Boone Gorges
    Boone Gorges
    Keymaster

    @boonebgorges

    Hm. Unfortunately, this is more of a problem with the Twitter plugin than it is with Invite Anyone. The Twitter plugin (or really any plugin that fires an action when a post is fired) should check the post type before sending the tweet.

    Actually, I just downloaded the WP to Twitter plugin and it looks like the author has actually put a note to that effect in the code! Open up wp-to-twitter/wp-to-twitter.php and check the function jd_twit( $post_ID ). A few lines into the function (line 487 in the version of the plugin I downloaded, 2.2.8), there are some lines commented out that do the post type check. You could comment out line 488 – as well as the end of the conditional, lines 525-527 – and it should do the job for you. And then you can write to the developer of the plugin and ask when that feature will be enabled in the release version ;)

    Avatar of gotequity
    gotequity
    Participant

    @gotequity

    Thanks for taking a look at this. I’ve checked the wp-to-twitter.php, and it appears that the lines you referenced have already been commented out – here’s the code pulled directly from my plugin file:

    Lines 487-488 -
    ‘// this will eventually be related to custom post types’
    ‘//if ($post_type == ‘post’ || $post_type == ‘page’ ) {‘

    Lines 525-527 -
    ‘// } else {
    // return $post_ID;
    // }’

    I’d appreciate if you could confirm these are the lines you meant – in the meantime I will write to the PI developer to seek his input on updates or workarounds.

    Avatar of Boone Gorges
    Boone Gorges
    Keymaster

    @boonebgorges

    Yes, those are the lines I’m talking about. What I meant is that, for some reason, they *are* commented out in the release version, but they *shouldn’t* be. By uncommenting them (I realize now that I said ‘comment them out’ when I meant ‘uncomment them’) you should be able to make it work the way you want.

    Avatar of gotequity
    gotequity
    Participant

    @gotequity

    Ok, that would make more sense :). I’ll give it a try and let you know how it works. Thanks, again, for your help!!

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.