Created
November 25, 2014 11:13
-
-
Save barrykooij/9610177e9db2ff4ecf63 to your computer and use it in GitHub Desktop.
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 | |
/** | |
* This works | |
*/ | |
add_option( 'verykey', 'wow' ); // Stored with key 'verykey' | |
echo get_option( 'verykey', '' ); // Outputs 'wow' | |
/** | |
* This doesn't work (as expected) | |
*/ | |
add_option( 'averylargekeythatmakesnosensebutsometimesyouendupwithverylargekeysbecauseyougeneratethem', 'wow' ); // Stored with key 'averylargekeythatmakesnosensebutsometimesyouendupwithverylargeke' | |
echo get_option( 'averylargekeythatmakesnosensebutsometimesyouendupwithverylargekeysbecauseyougeneratethem', '' ); // Outputs an empty string |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment