Created
July 26, 2023 16:32
-
-
Save greenhornet79/b27b7deb8a1f837b1911adbafc48409f to your computer and use it in GitHub Desktop.
restore a leaky paywall level
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action ('admin_init', 'zeen_restore_level_by_id' ); | |
function zeen_restore_level_by_id() { | |
$settings = get_leaky_paywall_settings(); | |
$level_id = 1; // the id of the level you want to restore | |
$settings['levels'][$level_id]['deleted'] = 0; // this will "undelete" the level | |
update_leaky_paywall_settings( $settings ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment