CMB2_Post_Search_field::get_instance PHP Метод

get_instance() публичный статический Метод

Creates or returns an instance of this class.
С версии: 0.2.4
public static get_instance ( ) : CMB2_Post_Search_field
Результат CMB2_Post_Search_field A single instance of this class.
    public static function get_instance()
    {
        if (null === self::$single_instance) {
            self::$single_instance = new self();
        }
        return self::$single_instance;
    }

Usage Example

Пример #1
0
 function cmb2_has_post_search_text_field($fields)
 {
     _deprecated_function(__FUNCTION__, '0.2.4', 'Please access these methods through the CMB2_Post_Search_field::get_instance() object.');
     return CMB2_Post_Search_field::get_instance()->has_post_search_text_field($fields);
 }