• Resolved Robswaimea

    (@robswaimea)


    force pending for admin…

    Obviously… I can go into settings capability and set it there.

    Sooo….. what is exactly going on, is I have achieved the “holy grail” and now I can import facebook events into Events Manager.

    It’s not that difficult.. there is a plugin for purchase that works.
    Not perfect… but it really works.

    I know we can’t talk about custom coding and all that stuff..
    The plugin has the basic option of…
    'post_status' => 'publish',

    Yet if I set it to pending nothing changes and the event gets published.
    I know contact the author of the plugin… well.. you know how that goes..
    he’s not like you guys with great support. The plugin is from a popular code site…

    From what I have read… when a plugin runs… it runs as Administrator.
    And it seems that even though I have set “pending” as I am logged in as Admin it is being overridden.
    I tried messing around with changing set_status(1, true);

    But that doesn’t work either… I set the 'post_author' => '2',
    Which no matter which capability is.. still the same.

    The big problem is that when the plugin publishes, it inserts a new Location, if it does not recognize a known location.
    Facebook has it’s own Location “auto fill”… so often, it doesn’t match up with my previous Locations.
    So the plugin easily duplicates.. a similar Location.
    And similar “duplicate” Locations is a real pain in the database, and adding events the “old fashion” way.

    I know.. custom coding is not part of the great support you guys provide here, and thanks so much for all your help.

    But any clue how to force not to auto publish or save.
    (I am not showing the link to the plugin because it is paid.. .. let me know if it is ok to post here)

    The plugin does not auto publish. You have to click a link to run it.
    So.. now it just as easy to go into Events Manger settings, and turn off my Administrator publish options.
    And then the imported events show as “Pending”… turn back on my Administrator options.. edit the event.. and publish (and put in the correct Location as needed).

    In conclusion.. importing facebook events works. Not exactly the way I want.. but some easy work arounds.

    I emailed Mr. Fersamp… hopefully he’ll find this as a solution.

    Thanks again for your support I have learned a lot from you guys.

    https://www.ads-software.com/plugins/events-manager/

Viewing 1 replies (of 1 total)
  • Plugin Support angelo_nwl

    (@angelo_nwl)

    not sure if this will help you out but maybe you can check this snippet – https://pastebin.com/3UDjZ8Le (take note that EM is using custom post type and each event save under events table has an equivalent post) or check save function under classes/em-event.php

Viewing 1 replies (of 1 total)
  • The topic ‘force pending for admin…’ is closed to new replies.