AFFILILABS_CPT_CRITERION, 'posts_per_page' => -1, ); $criteria_query = new WP_Query($criteria_args); $criteria = $criteria_query->posts; $navbar = new AffiliLabs_Navbar(); $navbar->load_scripts(); $button = new AffiliLabs_Button(); $modal = new AffiliLabs_Modal(); $modal->load_scripts(); $modal->init(); $spinner = new AffiliLabs_Spinner(); $spinner->load_scripts(); $spinner->init(); $video_frame = new AffiliLabs_VideoFrame(); $video_frame->load_scripts(); $video_frame->init(); wp_enqueue_style('affililabs-criteria', AFFILILABS_CRITERIA_CSS_URL, array(), AFFILILABS_VERSION); wp_enqueue_script('affililabs-criteria', AFFILILABS_CRITERIA_JS_URL, array('jquery'), AFFILILABS_VERSION, true); wp_localize_script('affililabs-criteria', 'affililabs_criteria', array( 'nonce' => wp_create_nonce('affl_admin_nonce'), 'i18n' => array( 'delete_criteria_title' => esc_html__('Delete Criterion', 'affililabs'), 'delete_criteria_confirm' => esc_html__('Are you sure you want to delete this criterion?', 'affililabs'), 'delete_criteria_success' => esc_html__('Criterion deleted', 'affililabs'), 'delete_criteria_error' => esc_html__('Failed to delete criterion', 'affililabs'), 'delete_criteria_unknown' => esc_html__('An unknown error occurred while trying to delete the criterion.', 'affililabs'), 'delete_criteria_success_message' => esc_html__('The criterion has been successfully deleted.', 'affililabs'), 'delete_criteria_error_message' => esc_html__('There was an error while deleting the criterion. Please try again.', 'affililabs'), 'delete_criteria_loading' => esc_html__('Deleting criteria...', 'affililabs'), ), )); ?>
render(); ?>
'; $button->render(esc_html__('Add New Criterion', 'affililabs'), esc_url(wp_nonce_url(admin_url('admin.php?page=affililabs-criteria-edit'), 'affl_admin_nonce', 'nonce')), $plus_svg); ?>

render(esc_html__('Add New Criterion', 'affililabs'), esc_url(wp_nonce_url(admin_url('admin.php?page=affililabs-criteria-edit'), 'affl_admin_nonce', 'nonce')), $plus_svg); ?>
render(''); ?>

ID, AFFILILABS_META_KEY_CRITERION, true); $linked_products = get_post_meta($criterion_post->ID, AFFILILABS_META_KEY_LINKED_PRODUCTS, true); $linked_categories = get_post_meta($criterion_post->ID, AFFILILABS_META_KEY_LINKED_CATEGORIES, true); $fields_count = is_array($fields) ? count($fields) : 0; $products_count = is_array($linked_products) ? count($linked_products) : 0; $categories_count = is_array($linked_categories) ? count($linked_categories) : 0; ?>
post_title)); ?>