Skip to content

Instantly share code, notes, and snippets.

View 8ivek's full-sized avatar

Bivek 8ivek

View GitHub Profile
@8ivek
8ivek / wp_one_time_script.txt
Last active July 14, 2023 21:26
run one time code in Wordpress
<?php
// running one time script in wordpress
function oneTimeFunction($arguments)
{
// One time task goes here
}
add_action('wp_loaded', function () {
if (isset($_GET['unique_argument_xx007']) && $_GET['unique_argument_xx007'] === 'unique_value_xx007') {
if (!get_option('random_option_xx007')) {