Skip to content

Instantly share code, notes, and snippets.

View bvkcodes's full-sized avatar

Bivek bvkcodes

  • Cambridge, ON
View GitHub Profile
@bvkcodes
bvkcodes / 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')) {