| [ Index ] |
PHP Cross Reference of YOURLS |
[Source view] [Print] [Project Stats]
(no description)
| File Size: | 195 lines (6 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
| yourls_get_option( $option_name, $default = false ) X-Ref |
| Read an option from DB (or from cache if available). Return value or $default if not found Pretty much stolen from WordPress param: string $option_name Option name. Expected to not be SQL-escaped. param: mixed $default Optional value to return if option doesn't exist. Default false. since: 1.4 return: mixed Value set for the option. |
| yourls_get_all_options() X-Ref |
| Read all options from DB at once The goal is to read all options at once and then populate array $ydb->option, to prevent further SQL queries if we need to read an option value later. It's also a simple check whether YOURLS is installed or not (no option = assuming not installed) after a check for DB server reachability has been performed since: 1.4 return: void |
| yourls_update_option( $option_name, $newvalue ) X-Ref |
| Update (add if doesn't exist) an option to DB Pretty much stolen from WordPress param: string $option_name Option name. Expected to not be SQL-escaped. param: mixed $newvalue Option value. Must be serializable if non-scalar. Expected to not be SQL-escaped. since: 1.4 return: bool False if value was not updated, true otherwise. |
| yourls_add_option( $name, $value = '' ) X-Ref |
| Add an option to the DB Pretty much stolen from WordPress param: string $name Name of option to add. Expected to not be SQL-escaped. param: mixed $value Optional option value. Must be serializable if non-scalar. Expected to not be SQL-escaped. since: 1.4 return: bool False if option was not added and true otherwise. |
| yourls_delete_option( $name ) X-Ref |
| Delete an option from the DB Pretty much stolen from WordPress param: string $name Option name to delete. Expected to not be SQL-escaped. since: 1.4 return: bool True, if option is successfully deleted. False on failure. |
| yourls_maybe_serialize( $data ) X-Ref |
| Serialize data if needed. Stolen from WordPress param: mixed $data Data that might be serialized. since: 1.4 return: mixed A scalar data |
| yourls_maybe_unserialize( $original ) X-Ref |
| Unserialize value only if it was serialized. Stolen from WP param: string $original Maybe unserialized original, if is needed. since: 1.4 return: mixed Unserialized data can be any type. |
| yourls_is_serialized( $data, $strict = true ) X-Ref |
| Check value to find if it was serialized. Stolen from WordPress param: mixed $data Value to check to see if was serialized. param: bool $strict Optional. Whether to be strict about the end of the string. Defaults true. since: 1.4 return: bool False if not serialized and true if it was. |
| Generated: Wed Nov 5 05:10:36 2025 | Cross-referenced by PHPXref 0.7.1 |