GIF89A;
Server : Microsoft-IIS/10.0 System : Windows NT HMW9050 6.2 build 9200 (Unknow Windows version Standard Edition) i586 User : fatorc ( 0) PHP Version : 5.3.28 Disable Function : escapeshellarg, escapeshellcmd, exec, passthru, proc_close, proc_open, shell_exec, system, dl, popen, php_check_syntax, php_strip_whitespace, symlink, link, openlog, apache_child_terminate Directory : e:/home/fatorc/Web/wp-content/plugins/types/application/models/field/group/ |
Upload File : |
<?php /** * Factory for the Types_Field_Group_User class. * * @since 2.0 */ class Types_Field_Group_User_Factory extends Types_Field_Group_Factory { /** * @return Types_Field_Group_User_Factory */ public static function get_instance() { return parent::get_instance(); } protected function __construct() { parent::__construct(); //add_action( 'wpcf_group_updated', array( $this, 'on_group_updated' ), 10, 2 ); } /** * Load a field group instance. * * @param int|string|WP_Post $field_group Post ID of the field group, it's name or a WP_Post object. * * @return null|Types_Field_Group_User Field group or null if it can't be loaded. */ public static function load( $field_group ) { // we cannot use self::get_instance here, because of low PHP requirements and missing get_called_class function // we have a fallback class for get_called_class but that scans files by debug_backtrace and return 'self' // instead of Types_Field_Group_Term_Factory like the original get_called_class() function does // ends in an error because of parents (abstract) $var = new self(); return Types_Field_Group_User_Factory::get_instance()->load_field_group( $field_group ); } /** * Create new field group. * * @param string $name Sanitized field group name. Note that the final name may change when new post is inserted. * @param string $title Field group title. * * @return null|Types_Field_Group The new field group or null on error. */ public static function create( $name, $title = '' ) { // we cannot use self::get_instance here, because of low PHP requirements and missing get_called_class function // we have a fallback class for get_called_class but that scans files by debug_backtrace and return 'self' // instead of Types_Field_Group_Term_Factory like the original get_called_class() function does // ends in an error because of parents (abstract) $var = new self(); return Types_Field_Group_User_Factory::get_instance()->create_field_group( $name, $title ); } public function get_post_type() { return Types_Field_Group_User::POST_TYPE; } protected function get_field_group_class_name() { return 'Types_Field_Group_User'; } }