WordPress.org

Ready to get started?Download WordPress

Forums

Facebook Page Publish 2
Is this plugin still developed ? (5 posts)

  1. jurasjo
    Member
    Posted 5 months ago #

  2. alm06130
    Member
    Posted 5 months ago #

    It seems this plugin is no developed any more .
    I tried it some days ago and could not make it work.
    I made some modifications that made it work (seems to).
    Modifications are tagged ///alm.
    Hope that may help!
    alain


    # Add publish actions for all post types (posts, pages, attachements, custom post types):
    $post_types = get_post_types(array('exclude_from_search' => false), 'objects');
    foreach ($post_types as $post_type) {
    ///alm didn't find these actions so removed them
    /// add_action('future_'.$post_type->name, 'fpp_future_action');
    /// add_action('publish_'.$post_type->name, 'fpp_publish_action');
    }

    Replace actions calls by:

    ///alm
    add_action('transition_post_status', 'fpp_status_change', 10, 3);

    ///alm
    function fpp_status_change($new_status, $old_status, $post) {
    if ($new_status=='future') fpp_future_action($post);
    if ($new_status=='publish') fpp_publish_action($post);
    }

    Replace $pots_id by $post in called functions, and remove $post = get_post($post_id):

    ///alm function fpp_future_action($post_id) {
    function fpp_future_action($post) {
    ...
    ///alm$post = get_post($post_id);
    ...
    ///alm function fpp_publish_action($post_id) {
    function fpp_publish_action($post) {
    ///alm$post = get_post($post_id);

  3. jurasjo
    Member
    Posted 5 months ago #

    Could You paste whole content of the .php file here ?
    I'm not very familiar with php code and I have a trouble with replacing proper lines.

  4. alm06130
    Member
    Posted 5 months ago #

    hum, cut when posted...
    sorry

  5. jurasjo
    Member
    Posted 5 months ago #

    maybe You could paste here http://pastebin.com/

    I think there is no need for having a valid account.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.