Пример #1
0
 /**
  * Build data to be passed to JavaScript.
  *
  * @return array
  * @since 2.1
  */
 private function build_js_data()
 {
     $types_settings_action = Types_Ajax::get_instance()->get_action_js_name(Types_Ajax::CALLBACK_SETTINGS_ACTION);
     return array('ajaxInfo' => array('fieldAction' => array('name' => $types_settings_action, 'nonce' => wp_create_nonce($types_settings_action))));
 }
Пример #2
0
 /**
  * Build data to be passed to JavaScript.
  * 
  * @return array
  * @since 2.0
  */
 private function build_js_data()
 {
     $field_action_name = Types_Ajax::get_instance()->get_action_js_name(Types_Ajax::CALLBACK_FIELD_CONTROL_ACTION);
     return array('jsIncludePath' => TYPES_RELPATH . '/public/page/field_control', 'fieldDefinitions' => $this->build_field_definitions(), 'fieldTypeDefinitions' => Types_Field_Type_Definition_Factory::get_instance()->get_field_type_definitions(), 'templates' => $this->build_templates(), 'strings' => $this->build_strings_for_js(), 'ajaxInfo' => array('fieldAction' => array('name' => $field_action_name, 'nonce' => wp_create_nonce($field_action_name))), 'currentDomain' => $this->get_current_domain(), 'groups' => $this->build_group_data(), 'typeConversionMatrix' => Types_Field_Type_Converter::get_instance()->get_conversion_matrix(), 'itemsPerPage' => $this->get_items_per_page_setting());
 }