PHP Class WC_Embed

Author: WooThemes
Show file Open project: woocommerce/woocommerce Class Usage Examples

Public Methods

Method Description
get_ratings ( ) Prints the markup for the rating stars.
init ( ) Init embed class.
is_embedded_product ( ) : boolean Check if this is an embedded product - to make sure we don't mess up regular posts.
print_embed_styles ( ) Basic styling.
product_buttons ( ) : string Create the button to go to the product page for embedded products.
remove_comments_button ( ) Remove comments button on product embeds.
the_excerpt ( string $excerpt ) : string Create the excerpt for embedded products - we want to add the buy button to it.

Method Details

get_ratings() public static method

Prints the markup for the rating stars.
Since: 2.4.11
public static get_ratings ( )

init() public static method

Init embed class.
Since: 2.4.11
public static init ( )

is_embedded_product() public static method

Check if this is an embedded product - to make sure we don't mess up regular posts.
Since: 2.4.11
public static is_embedded_product ( ) : boolean
return boolean

print_embed_styles() public static method

Basic styling.
public static print_embed_styles ( )

product_buttons() public static method

Create the button to go to the product page for embedded products.
Since: 2.4.11
public static product_buttons ( ) : string
return string

remove_comments_button() public static method

Remove comments button on product embeds.
Since: 2.6.0
public static remove_comments_button ( )

the_excerpt() public static method

Create the excerpt for embedded products - we want to add the buy button to it.
Since: 2.4.11
public static the_excerpt ( string $excerpt ) : string
$excerpt string Embed short description.
return string