$output .= esc_html__($key) . ':
'; $output .= HtmlWpf::text('params[attr][' . $key . ']', array('value' => $value)) . '
'; } } else { $output .= esc_html__('class', 'woo-product-filter') . ':
'; $output .= HtmlWpf::text('params[attr][class]', array('value' => '')) . '
'; $output .= esc_html__('id', 'woo-product-filter') . ':
'; $output .= HtmlWpf::text('params[attr][id]', array('value' => '')) . '
'; } return $output; } /** * Generating the list of categories for product extra fields * * @param object $field */ public static function productFieldCategories( $field ) { if (!empty($field->htmlParams['OptionsWpf'])) { return; } } public static function intToDB( $val ) { return intval($val); } public static function floatToDB( $val ) { return floatval($val); } /** * Save this in static var - to futher usage * * @return array with countries */ public static function getCachedCountries( $clearCache = false ) { if (empty(self::$countries) || $clearCache) { self::$countries = FrameWpf::_()->getTable('countries')->getAll('id, name, iso_code_2, iso_code_3'); } return self::$countries; } /** * Save this in static var - to futher usage * * @return array with states */ public static function getCachedStates( $clearCache = false ) { if (empty(self::$states) || $clearCache) { self::$states = FrameWpf::_()->getTable('states') ->leftJoin( FrameWpf::_()->getTable('countries'), 'country_id' ) ->getAll('toe_states.id, toe_states.name, toe_states.code, toe_states.country_id, toe_cry.name AS c_name, toe_cry.iso_code_2 AS c_iso_code_2, toe_cry.iso_code_3 AS c_iso_code_3'); } return self::$states; } }