AFFILILABS_CPT_TEMPLATE, 'posts_per_page' => -1, 'meta_query' => array( array( 'key' => AFFILILABS_META_KEY_TEMPLATE_TYPE, 'value' => 'comparison_table', 'compare' => '=', ), ), ); $comparison_table_templates = get_posts($templates_args); $single_product_templates_args = array( 'post_type' => AFFILILABS_CPT_TEMPLATE, 'posts_per_page' => -1, 'meta_query' => array( array( 'key' => AFFILILABS_META_KEY_TEMPLATE_TYPE, 'value' => 'single_product', 'compare' => '=', ), ), ); $single_product_templates = get_posts($single_product_templates_args); $listicle_templates_args = array( 'post_type' => AFFILILABS_CPT_TEMPLATE, 'posts_per_page' => -1, 'meta_query' => array( array( 'key' => AFFILILABS_META_KEY_TEMPLATE_TYPE, 'value' => 'listicle', 'compare' => '=', ), ), ); $listicle_templates = array(); $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(); wp_enqueue_style('affililabs-templates', AFFILILABS_TEMPLATES_CSS_URL, array(), AFFILILABS_VERSION); wp_enqueue_script('affililabs-templates', AFFILILABS_TEMPLATES_JS_URL, array('jquery'), AFFILILABS_VERSION, true); wp_localize_script( 'affililabs-templates', 'affililabs_templates', array( 'i18n' => array( 'delete_confirm_title' => esc_html__('Delete Confirmation', 'affililabs'), 'delete_confirm' => esc_html__('Are you sure you want to delete this template?', 'affililabs'), 'delete_confirm_button_confirm' => esc_html__('Delete', 'affililabs'), 'delete_confirm_button_cancel' => esc_html__('Cancel', 'affililabs'), 'delete_success_title' => esc_html__('Success', 'affililabs'), 'delete_success_message' => esc_html__('The template was successfully deleted.', 'affililabs'), 'delete_error_title' => esc_html__('Error', 'affililabs'), 'delete_error_message' => esc_html__('Error deleting template.', 'affililabs'), ), 'nonce' => wp_create_nonce('affl_admin_nonce'), ) ); ?>