
بخشی از متن:
لینک دانلود و خرید پایین توضیحات
دسته بندی : وورد
نوع فایل : word (..docx) ( قابل ویرایش و آماده پرینت )
تعداد صفحه : 45 صفحه
قسمتی از متن word (..docx) :
/**
Option API
*
@package WordPress
@subpackage Option
*/
/**
Retrieves an option value based on an option name.
*
If the option does not exist or does not have a value then the return value
will be false. This is useful to check whether you need to install an option
and is commonly used during installation of plugin options and to test
whether upgrading is required.
*
If the option was serialized then it will be unserialized when it is returned.
*
Any scalar values will be returned as strings. You may coerce the return type of
a given option by registering an {@see 'option_$option'} filter callback.
*
@since 1.5.0
*
@global wpdb $wpdb WordPress database abstraction object.
*
@param string $option Name of option to retrieve. Expected to not be SQL-escaped.
@param mixed $default Optional. Default value to return if the option does not exist.
@return mixed Value set for the option.
*/
function get_option( $option $default = false ) {
global $wpdb;
$option = trim( $option );
if ( empty( $option ) )
return false;
/**
* Filters the value of an existing option before it is retrieved.
*
* The dynamic portion of the hook name `$option` refers to the option name.
*
* Passing a truthy value to the filter will short-circuit retrieving
* the option value returning the passed value instead.
*
* @since 1.5.0
