public/wordpress/wp-content/plugins/wp-courseware/includes/admin/tables/table-coupons.php
/**
	 * Display a Coupon Types Dropdown.
	 *
	 * @since 4.5.0
	 */
Display a Coupon Types Dropdown.
Display a Coupon Types Dropdown .
protected function coupon_types_dropdown() {
		if ( false !== apply_filters( 'wpcw_coupons_disable_filter_by_type_dropdown', false ) ) {
			return;
		}
		$types = wpcw()->coupons->get_types();
		if ( empty( $types ) ) {
			return;
		}
		$current_type = ! empty( $_GET['type'] ) ? wpcw_clean( $_GET['type'] ) : '';
		$placeholder  = esc_html__( 'Show all types', 'wp-courseware' );
		printf( '<span class="wpcw-filter-wrapper">' );
		printf( '<select class="wpcw-select-field-filter" name="type" placeholder="%s" data-placeholder="%s">', $placeholder, $placeholder );
		printf( '<option value="">%s</option>', esc_html__( 'Any Type', 'wp-courseware' ) );
		foreach ( $types as $type => $type_label ) {
			$selected = selected( $current_type, $type, false );
			printf( '<option value="%s" %s>%s</option>', $type, $selected, $type_label );
		}
		printf( '</select>' );
		printf( '</span>' );
	}
protected function coupon_types_dropdown ( ) { if ( false !== apply_filters ( 'wpcw_coupons_disable_filter_by_type_dropdown' , false ) ) { return ; } $ types = wpcw ( ) -> coupons -> get_types ( ) ; if ( empty ( $ types ) ) { return ; } $ current_type = ! empty ( $ _GET [ 'type' ] ) ? wpcw_clean ( $ _GET [ 'type' ] ) : '' ; $ placeholder = esc_html__ ( 'Show all types' , 'wp-courseware' ) ; printf ( '<span class="wpcw-filter-wrapper">' ) ; printf ( '<select class="wpcw-select-field-filter" name="type" placeholder="%s" data-placeholder="%s">' , $ placeholder , $ placeholder ) ; printf ( '<option value="">%s</option>' , esc_html__ ( 'Any Type' , 'wp-courseware' ) ) ; foreach ( $ types as $ type => $ type_label ) { $ selected = selected ( $ current_type , $ type , false ) ; printf ( '<option value="%s" %s>%s</option>' , $ type , $ selected , $ type_label ) ; } printf ( '</select>' ) ; printf ( '</span>' ) ; }
Display a Coupon Types Dropdown.
Display a Coupon Types Dropdown .
/**
		 * Filter: Disable filter by type dropdown.
		 *
		 * @since 4.5.0
		 *
		 * @param bool $disable Whether to disable the type drop-down. Default false.
		 */