/** * Menu page hook. */ function wpcf_admin_menu_edit_type_hook() { do_action('wpcf_admin_page_init'); require_once WPCF_EMBEDDED_INC_ABSPATH . '/custom-types.php'; require_once WPCF_INC_ABSPATH . '/custom-types-form.php'; require_once WPCF_INC_ABSPATH . '/post-relationship.php'; wp_enqueue_script('wpcf-js', WPCF_RES_RELPATH . '/js/basic.js', array('jquery', 'jquery-ui-sortable', 'jquery-ui-draggable'), WPCF_VERSION); wp_enqueue_style('wpcf-type-edit', WPCF_RES_RELPATH . '/css/basic.css', array(), WPCF_VERSION); wp_enqueue_script('wpcf-form-validation', WPCF_RES_RELPATH . '/js/' . 'jquery-form-validation/jquery.validate.min.js', array('jquery'), WPCF_VERSION); wp_enqueue_script('wpcf-form-validation-additional', WPCF_RES_RELPATH . '/js/' . 'jquery-form-validation/additional-methods.min.js', array('jquery'), WPCF_VERSION); add_action('admin_footer', 'wpcf_admin_types_form_js_validation'); wpcf_post_relationship_init(); $form = wpcf_admin_custom_types_form(); wpcf_form('wpcf_form_types', $form); }
/** * Menu page hook. */ function wpcf_admin_menu_edit_type_hook() { require_once WPCF_INC_ABSPATH . '/fields.php'; do_action('wpcf_admin_page_init'); require_once WPCF_EMBEDDED_INC_ABSPATH . '/custom-types.php'; require_once WPCF_INC_ABSPATH . '/custom-types-form.php'; require_once WPCF_INC_ABSPATH . '/post-relationship.php'; wp_enqueue_script('wpcf-custom-types-form', WPCF_RES_RELPATH . '/js/' . 'custom-types-form.js', array('jquery', 'jquery-ui-dialog', 'jquery-masonry'), WPCF_VERSION); wp_enqueue_script('wpcf-form-validation', WPCF_RES_RELPATH . '/js/' . 'jquery-form-validation/jquery.validate.min.js', array('jquery'), WPCF_VERSION); wp_enqueue_script('wpcf-form-validation-additional', WPCF_RES_RELPATH . '/js/' . 'jquery-form-validation/additional-methods.min.js', array('jquery'), WPCF_VERSION); wp_enqueue_style('wp-jquery-ui-dialog'); add_action('admin_footer', 'wpcf_admin_types_form_js_validation'); wpcf_post_relationship_init(); /** * add form */ // $form = wpcf_admin_custom_types_form(); require_once WPCF_INC_ABSPATH . '/classes/class.types.admin.edit.post.type.php'; $wpcf_admin = new Types_Admin_Edit_Post_Type(); $wpcf_admin->init_admin(); $form = $wpcf_admin->form(); wpcf_form('wpcf_form_types', $form); }