コード例 #1
0
                    }
                    // Filter for populate from other than user meta, if meta key is "my_meta_key",
                    // filter would be "field_editor_auto_populate_my_meta_key"
                    $populate_value = maybe_unserialize(apply_filters("field_editor_auto_populate_{$pop_meta_key}", $populate_value));
                    // Set value in config to autopopulate value if set
                    if (!empty($populate_value)) {
                        $fields[$field_group][$field]['value'] = $populate_value;
                    }
                }
            }
        }
        return $fields;
    }
    /**
     * Singleton Instance
     *
     * @since 1.0.0
     *
     * @return WP_Job_Manager_Field_Editor_Integration
     */
    static function get_instance()
    {
        // If the single instance hasn't been set, set it now.
        if (null == self::$instance) {
            self::$instance = new self();
        }
        return self::$instance;
    }
}
WP_Job_Manager_Field_Editor_Integration::get_instance();
コード例 #2
0
 /**
  * WP_Job_Manager_Field_Editor_Integration Class Object
  *
  * @since 1.1.8
  *
  * @return WP_Job_Manager_Field_Editor_Integration
  */
 public function integration()
 {
     if (!class_exists('WP_Job_Manager_Field_Editor_Integration')) {
         include 'classes/integration.php';
     }
     if (!$this->integration) {
         $this->integration = WP_Job_Manager_Field_Editor_Integration::get_instance();
     }
     return $this->integration;
 }