Documentation

Packages

Application
Barn2
WPTRTadmin

Namespaces

Barn2
WPTRT

Interfaces, Classes and Traits

Product_Table_Data
An interface for table data.
WCPT_Util
WCPT_Settings
Abstract_Product_Table_Data
Abstract data class used to fetch data for a product in the table.
WC_Product_Table_Plugin
The main plugin class. Responsible for setting up to core plugin services.
WC_Product_Table
Represents a table of WooCommerce products.
WC_Product_Table_Columns
Responsible for managing the product table columns.
WC_Product_Table_Query
Responsible for managing the product table query, retrieving the list of products (as an array of WP_Post objects), and finding the product totals.
WC_Product_Table_Config_Builder
Responsible for creating the product table config script.
WC_Product_Table_Args
Responsible for storing and validating the product table arguments.
WC_Product_Table_Widget
Abstract widget class extended by the Product Table widgets.
WC_Product_Table_Widget_Layered_Nav_Filters
Product Table implementation of WooCommerce Layered Navigation Filters Widget.
WC_Product_Table_Widget_Layered_Nav
Product Table implementation of WooCommerce Layered Navigation Widget.
WC_Product_Table_Widget_Price_Filter
Product Table implementation of WooCommerce Price Filter Widget.
WC_Product_Table_Widget_Rating_Filter
Product Table implementation of WooCommerce Rating Filter Widget.
Html_Table_Cell
Represents a cell in a <code>Html_Table_Row</code>.
Html_Table_Row
Represents a row in a <code>Html_Data_Table</code>.
Html_Data_Table
Represents a HTML table. This class allows you to build a table by sequentially adding headings, rows, data, etc, and then outputting to either HTML, and array or JSON.
WC_Barn2_Plugin_Promo
Provides functions to add the plugin promo to the plugin settings page in the WordPress admin.
WP_Scoped_Hooks
Allows a temporary hook environment to be created for a given timeframe (i.e. scope), where any hooks added or removed will be recognised only during the specified scope. After the given scope, the original WordPress hook environment is restored to its previous state.

Table of Contents

wc_esc_json()  : string
Escape JSON for use on HTML or attribute text nodes.
woocommerce_product_loop()  : bool
Should the WooCommerce loop be displayed?
wc_product_table()  : Plugin
Global namespace version of Barn2\Plugin\WC_Product_Table\wpt(). Returns the shared plugin instance.
wc_get_product_table()  : string
Returns a new product table with the specified arguments.
wc_the_product_table()  : mixed
Prints (echos) a product table with the specified arguments.
b2_format_html_attributes()  : string
Formats an array of attributes into a string to be used inside a HTML tag.
edd_hidden_callback()  : mixed
edd_barn2_license_callback()  : mixed

Functions

wc_esc_json()

Escape JSON for use on HTML or attribute text nodes.

wc_esc_json(string $json[, bool $html = false ]) : string
Parameters
$json : string

JSON to escape.

$html : bool = false

True if escaping for HTML text node, false for attributes. Determines how quotes are handled.

Tags
since
3.5.5
Return values
string

Escaped JSON.

woocommerce_product_loop()

Should the WooCommerce loop be displayed?

woocommerce_product_loop() : bool

This will return true if we have posts (products) or if we have subcats to display.

Tags
since
3.4.0
Return values
bool

wc_product_table()

Global namespace version of Barn2\Plugin\WC_Product_Table\wpt(). Returns the shared plugin instance.

wc_product_table() : Plugin
Tags
deprecated
2.6.2

Use Barn2\Plugin\WC_Product_Table->wpt()

Return values
Plugin

The plugin instance.

wc_get_product_table()

Returns a new product table with the specified arguments.

wc_get_product_table([array<string|int, mixed> $args = [] ]) : string
Parameters
$args : array<string|int, mixed> = []

The table arguments.

Return values
string

The product table HTML.

wc_the_product_table()

Prints (echos) a product table with the specified arguments.

wc_the_product_table([array<string|int, mixed> $args = [] ]) : mixed
Parameters
$args : array<string|int, mixed> = []

The table arguments.

Return values
mixed

b2_format_html_attributes()

Formats an array of attributes into a string to be used inside a HTML tag.

b2_format_html_attributes(array<string|int, mixed> $atts) : string

The first attribute will contain a single space before it.

E.g. b2_format_html_attributes( array( 'data-thing' => 'foo', 'class' = 'test' ) )

would give this string:

' data-thing="foo" class="test"'

Parameters
$atts : array<string|int, mixed>

The attributes to format

Return values
string

The attribute string

edd_hidden_callback()

edd_hidden_callback(mixed $args) : mixed
Parameters
$args : mixed
Return values
mixed

edd_barn2_license_callback()

edd_barn2_license_callback(mixed $args) : mixed
Parameters
$args : mixed
Return values
mixed

Search results