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

From IThemes Codex
(Difference between revisions)
Jump to: navigation, search
 
Line 1: Line 1:
__NOTOC__
+
This is the default template part for the empty_cart element in the content-cart template part.  
<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>
+
  
==Description==
+
==Theme Location==
Used to output the element to empty the cart.
+
theme/exchange/content-cart/elements/empty.php
  
==Options==
+
==Action Hooks==
<pre class="brush:php, gutter:false, toolbar:false">
+
*[[Exchange_Theme_Hooks:_it_exchange_content_cart_before_empty_element|it_exchange_content_cart_before_empty_element]]
'format' - Used to sets the format of the output.
+
*[[Exchange_Theme_Hooks:_it_exchange_content_cart_after_empty_element|it_exchange_content_cart_after_empty_element]]
$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>
+
  
==Usage==
+
==Theme API==
<pre class="brush:php">
+
*[[Exchange_Theme_API:_cart_(empty)|it_exchange( 'cart', 'empty' )]]
 +
 
 +
==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' ); ?>
</pre>
+
<?php do_action( 'it_exchange_content_cart_after_empty_element' ); ?></pre>
  
==Examples==
+
[[Exchange_Theme_Templates|&larr; Back to Exchange Theme Templates Page]]
*[[Exchange_Theme_Templates:_content-cart/elements/empty.php|content-cart/elements/empty.php]] - Line 19
+

Latest revision as of 17:36, August 1, 2013

This is the default template part for the empty_cart element in the content-cart template part.

Contents

Theme Location

theme/exchange/content-cart/elements/empty.php

Action Hooks

Theme API

Default Code

<?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 do_action( 'it_exchange_content_cart_after_empty_element' ); ?>

← Back to Exchange Theme Templates Page

Personal tools
Namespaces
Variants
Actions
iThemes Codex
Codex Navigation
Toolbox