get_slug() !== $this->get_slug() ) { return; } ?> get_video_help_popup( array( 'popup_title' => __( 'JetEngine relations overview', 'jet-engine' ), 'embed' => 'https://www.youtube.com/embed/4ZNF_BTBQ8M', ) )->wp_page_popup(); } /** * Page slug * * @return string */ public function get_slug() { return 'list'; } /** * Page name * * @return string */ public function get_name() { return esc_html__( 'Relations List', 'jet-engine' ); } /** * Register add controls * @return [type] [description] */ public function page_specific_assets() { $module_data = jet_engine()->framework->get_included_module_data( 'cherry-x-vue-ui.php' ); $ui = new CX_Vue_UI( $module_data ); $ui->enqueue_assets(); wp_register_script( 'jet-engine-cpt-delete-dialog', jet_engine()->plugin_url( 'includes/components/relations/assets/js/delete-dialog.js' ), array( 'cx-vue-ui', 'wp-api-fetch', ), jet_engine()->get_version(), true ); wp_localize_script( 'jet-engine-cpt-delete-dialog', 'JetEngineRelationDeleteDialog', array( 'api_path' => jet_engine()->api->get_route( 'delete-relation' ), 'redirect' => $this->manager->get_page_link( 'list' ), ) ); wp_enqueue_script( 'jet-engine-cpt-list', jet_engine()->plugin_url( 'includes/components/relations/assets/js/list.js' ), array( 'cx-vue-ui', 'wp-api-fetch', 'jet-engine-cpt-delete-dialog' ), jet_engine()->get_version(), true ); wp_localize_script( 'jet-engine-cpt-list', 'JetEngineCPTListConfig', array( 'api_path' => jet_engine()->api->get_route( 'get-relations' ), 'api_path_add' => jet_engine()->api->get_route( 'add-relation' ), 'edit_link' => $this->manager->get_edit_item_link( '%id%' ), 'relations_types' => $this->manager->get_relations_types(), 'notices' => array( 'copied' => __( 'Copied!', 'jet-engine' ), ), ) ); add_action( 'admin_footer', array( $this, 'add_page_template' ) ); } /** * Print add/edit page template */ public function add_page_template() { ob_start(); include jet_engine()->relations->component_path( 'templates/list.php' ); $content = ob_get_clean(); printf( '', $content ); ob_start(); include jet_engine()->relations->component_path( 'templates/delete-dialog.php' ); $content = ob_get_clean(); printf( '', $content ); } /** * Renderer callback * * @return void */ public function render_page() { ?>
relations->legacy->convert->has_legacy_data() ) : ?>