Created
December 12, 2015 12:47
-
-
Save corenominal/16c6dde331c1283e5778 to your computer and use it in GitHub Desktop.
A WP theme activation function to disable WordPress smilies
This file contains hidden or 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 | |
/** | |
* 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