Exchange Theme Templates: content-cart/elements/empty.php

(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
This is the default template part for the empty_cart element in the content-cart template part.  
+
__NOTOC__
 +
<pre class="brush:php, gutter:false, toolbar:false">
 +
it_exchange( 'cart', 'empty', array( 'option' => 'value' ) )
 +
 +
Parameters
 +
string - $context the context or context.tag combination, if context.tag is used, the tag parameter can be omitted.
 +
string - $tag the tag, can be hyphenated or not.
 +
mixed  - $options associative array, or url-style name=value pairs separated by ampersands (&).
 +
Returns
 +
The empty cart button.
 +
</pre>
  
==Theme Location==
+
==Description==
theme/exchange/content-cart/elements/empty.php
+
Used to output the element to empty the cart.
  
==Action Hooks==
+
==Options==
*[[Exchange_Theme_Hooks:_it_exchange_content_cart_before_empty_element|it_exchange_content_cart_before_empty_element]]
+
<pre class="brush:php, gutter:false, toolbar:false">
*[[Exchange_Theme_Hooks:_it_exchange_content_cart_after_empty_element|it_exchange_content_cart_after_empty_element]]
+
'format' - Used to sets the format of the output.
 +
$default: 'button'
 +
$options: button, varname
 +
'class' - Used to set the class of the button.
 +
$default: 'it-exchange-empty-cart'
 +
$options: Any valid class name.
 +
'label' - Used to set the label of the button.
 +
$default: 'Empty Cart'
 +
$options: Any valid text.
 +
'title' - Used to set the title of the button.
 +
$default: 'Empty Cart'
 +
$options: Any valid text.
 +
'before' - Used to output content before the remove button.
 +
$default: empty
 +
$options: Any valid html.
 +
'after' - Used to output content after the remove button.
 +
$default: empty
 +
$options: Any valid html.
 +
'return' - Used to return (instead of echo) the output.
 +
$default: false
 +
$options: true, false
 +
</pre>
  
==Theme API==
+
==Usage==
*[[Exchange_Theme_API:_cart_(empty)|it_exchange( 'cart', 'empty' )]]
+
<pre class="brush:php">
 
+
==Default Code==
+
<pre class="brush:php"><?php
+
/**
+
* This is the default template part for the
+
* empty_cart element in the content-cart template
+
* part.
+
*
+
* @since 1.1.0
+
* @version 1.1.0
+
* @package IT_Exchange
+
*
+
* WARNING: Do not edit this file directly. To use
+
* this template in a theme, copy over this file
+
* to the exchange/content-cart/elements/ directory
+
* located in your theme.
+
*/
+
?>
+
 
+
<?php do_action( 'it_exchange_content_cart_before_empty_element' ); ?>
+
 
<?php it_exchange( 'cart', 'empty' ); ?>
 
<?php it_exchange( 'cart', 'empty' ); ?>
<?php do_action( 'it_exchange_content_cart_after_empty_element' ); ?></pre>
+
</pre>
  
[[Exchange_Theme_Templates|&larr; Back to Exchange Theme Templates Page]]
+
==Examples==
 +
*[[Exchange_Theme_Templates:_content-cart/elements/empty.php|content-cart/elements/empty.php]] - Line 19

Revision as of 17:35, August 1, 2013

it_exchange( 'cart', 'empty', array( 'option' => 'value' ) )
	
Parameters
	string - $context the context or context.tag combination, if context.tag is used, the tag parameter can be omitted.
	string - $tag the tag, can be hyphenated or not.
	mixed  - $options associative array, or url-style name=value pairs separated by ampersands (&).
Returns
	The empty cart button.

Description

Used to output the element to empty the cart.

Options

'format' - Used to sets the format of the output.
	$default: 'button'
	$options: button, varname
'class' - Used to set the class of the button.
	$default: 'it-exchange-empty-cart'
	$options: Any valid class name.
'label' - Used to set the label of the button.
	$default: 'Empty Cart'
	$options: Any valid text.
'title' - Used to set the title of the button.
	$default: 'Empty Cart'
	$options: Any valid text.
'before' - Used to output content before the remove button.
	$default: empty
	$options: Any valid html.
'after' - Used to output content after the remove button.
	$default: empty
	$options: Any valid html.
'return' - Used to return (instead of echo) the output.
	$default: false
	$options: true, false

Usage

<?php it_exchange( 'cart', 'empty' ); ?>

Examples

  • content-cart/elements/empty.php - Line 19
Personal tools
Namespaces
Variants
Actions
iThemes Codex
Codex Navigation
Toolbox