cronjob & 'pending' to 'publish'

Forums SNAP – WordPress Plugin Forums cronjob & 'pending' to 'publish'

  • This topic has 4 replies, 1 voice, and was last updated 10 years ago by ruperto.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #179100
    ruperto
    Participant

      First of all, congratulations for the script, very good. I’m from Argentina, so sorry for my English.

      The question is: I have a cronjob which changes the status of all post, from ‘pending’ to ‘publish’
      How do I call the script after running cronjob (today, does not work, it does if I click on the button ‘repost on facebook’ in each post

      Thanks!!!!!

      #179718
      NextScripts.com
      Participant

        Trigger WordPress function wp_transition_post_status after you actually change it.

        #179854
        ruperto
        Participant

          thanks for the reply! I found something here: https://codex.wordpress.org/Function_Reference/wp_transition_post_status

          but I do not understand how to apply with the SNAP script.
          Might you give me an example? Thank you!

          #179881
          NextScripts.com
          Participant

            You don’t need to do anything with the SNAP. SNAP is already hooked to that function, Just call it from your script.

            #181354
            ruperto
            Participant

              Thanks!!!

            Viewing 5 posts - 1 through 5 (of 5 total)
            • You must be logged in to reply to this topic.