Skip to content

Instantly share code, notes, and snippets.

@seojacky
Last active October 14, 2021 19:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seojacky/cab518efdcade448b4c1e28a6b19f196 to your computer and use it in GitHub Desktop.
Save seojacky/cab518efdcade448b4c1e28a6b19f196 to your computer and use it in GitHub Desktop.
<?php
function tlap_activation(){
do_action( 'tlap_default_options' );
}
register_activation_hook( __FILE__, 'tlap_activation' );
// Set default values here
function tlap_plugin_default_values(){
$default = array(
'tlap_add_analytics_option' => array(
'tlap_excludepage' => '',
'tlap_timer_delay' => '5000',
),
);
add_option( 'write_here_options', $default );
}
add_action( 'tlap_default_options', 'tlap_plugin_default_values' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment