Skip to content

Instantly share code, notes, and snippets.

@corenominal
Created December 12, 2015 12:47
Show Gist options
  • Save corenominal/16c6dde331c1283e5778 to your computer and use it in GitHub Desktop.
Save corenominal/16c6dde331c1283e5778 to your computer and use it in GitHub Desktop.
A WP theme activation function to disable WordPress smilies
<?php
/**
* Theme activation/setup functions
* Notes:
* - after_switch_theme is triggered on the request immediately following a theme switch.
* - switch_theme is triggered when the blog's theme is changed. Specifically, it fires after the theme has been switched but before the next request. Theme developers should use this hook to do things when their theme is deactivated.
*/
function corenominal_set_theme_options()
{
update_option( 'use_smilies', false );
}
add_action( 'after_switch_theme', 'corenominal_set_theme_options' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment