• Resolved DCuserName

    (@dcusername)


    Hi, can anyone point me in the right direction for a way to update the protected status of a site programmatically, via a hook, updating a meta value, database entry, etc.?

    Basically I need to hook into a custom post save, and change the password status based on a submitted form value. Possible?

    Thanks,
    David

Viewing 1 replies (of 1 total)
  • Thread Starter DCuserName

    (@dcusername)

    Actually this was simpler than I thought, for anyone who needs it:

    update_option(‘password_protected_status’, 0); // Protected Status off

    update_option(‘password_protected_status’, 1); // Protected Status on

Viewing 1 replies (of 1 total)
  • The topic ‘Programmatically enable/disable Protected Status’ is closed to new replies.