本文整理汇总了PHP中Shopp::menuoptions方法的典型用法代码示例。如果您正苦于以下问题:PHP Shopp::menuoptions方法的具体用法?PHP Shopp::menuoptions怎么用?PHP Shopp::menuoptions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Shopp
的用法示例。
在下文中一共展示了Shopp::menuoptions方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: screen
public function screen()
{
if (!current_user_can('shopp_settings')) {
wp_die(__('You do not have sufficient permissions to access this page.'));
}
// Welcome screen handling
if (!empty($_POST['setup'])) {
shopp_set_setting('display_welcome', 'off');
}
$countries = ShoppLookup::countries();
$basecountry = ShoppBaseLocale()->country();
$countrymenu = Shopp::menuoptions($countries, $basecountry, true);
$basestates = ShoppLookup::country_zones(array($basecountry));
$statesmenu = '';
if (!empty($basestates)) {
$statesmenu = Shopp::menuoptions($basestates[$basecountry], ShoppBaseLocale()->state(), true);
}
$targets = shopp_setting('target_markets');
if (is_array($targets)) {
$targets = array_map('stripslashes', $targets);
}
if (!$targets) {
$targets = array();
}
$zones_ajaxurl = wp_nonce_url(admin_url('admin-ajax.php'), 'wp_ajax_shopp_country_zones');
include $this->ui('setup.php');
}
示例2: settings_meta_box
function settings_meta_box($Customer)
{
?>
<p>
<span>
<input type="hidden" name="marketing" value="no" />
<input type="checkbox" id="marketing" name="marketing" value="yes"<?php
echo $Customer->marketing == 'yes' ? ' checked="checked"' : '';
?>
/>
<label for="marketing" class="inline"> <?php
_e('Subscribes to marketing', 'Shopp');
?>
</label>
</span>
</p>
<br class="clear" />
<p>
<span>
<select name="type"><?php
echo Shopp::menuoptions(Lookup::customer_types(), $Customer->type);
?>
</select>
<label for="type"><?php
_e('Customer Type', 'Shopp');
?>
</label>
</span>
</p>
<br class="clear" />
<?php
do_action('shopp_customer_editor_settings', $Customer);
}
示例3: save_meta_box
function save_meta_box($Category)
{
$Shopp = Shopp::object();
$workflows = array("continue" => __('Continue Editing', 'Shopp'), "close" => __('Category Manager', 'Shopp'), "new" => __('New Category', 'Shopp'), "next" => __('Edit Next', 'Shopp'), "previous" => __('Edit Previous', 'Shopp'));
?>
<div id="major-publishing-actions">
<input type="hidden" name="id" value="<?php
echo $Category->id;
?>
" />
<select name="settings[workflow]" id="workflow">
<?php
echo Shopp::menuoptions($workflows, shopp_setting('workflow'), true);
?>
</select>
<input type="submit" class="button-primary" name="save" value="<?php
_e('Update', 'Shopp');
?>
" />
</div>
<?php
}
示例4: join
<script id="delivery-menu" type="text/x-jquery-tmpl">
<?php
echo Shopp::menuoptions(ShoppLookup::timeframes_menu(), false, true);
?>
</script>
<?php
$Table->display();
?>
<table class="form-table">
<tr>
<th scope="row" valign="top"><label><?php
_e('Shipping Carriers', 'Shopp');
?>
</label></th>
<td>
<div id="carriers" class="multiple-select">
<ul>
<li<?php
$even = true;
$classes[] = 'odd hide-if-no-js';
if (!empty($classes)) {
echo ' class="' . join(' ', $classes) . '"';
}
$even = !$even;
?>
><input type="checkbox" name="selectall" id="selectall" /><label for="selectall"><strong><?php
_e('Select All', 'Shopp');
?>
示例5: property_menu
/**
* Gets the generated conditional rules property menu options.
*
* @since 1.4
*
* @param string $selected The currently selected option.
* @return string The generated menu options.
**/
public function property_menu($selected = false)
{
return Shopp::menuoptions(array('product-name' => Shopp::__('Product name is'), 'product-tags' => Shopp::__('Product is tagged'), 'product-category' => Shopp::__('Product in category'), 'customer-type' => Shopp::__('Customer type is')), $selected, true);
}
示例6: _e
<div id="image-storage-engine" class="storage-settings"><?php
if ($ImageStorage) {
echo $ImageStorage->ui('image');
}
?>
</div>
</td>
</tr>
<tr>
<th scope="row" valign="top"><label for="download-storage"><?php
_e('Product File Storage', 'Shopp');
?>
</label></th>
<td><select name="settings[product_storage]" id="download-storage">
<?php
echo Shopp::menuoptions($storage, shopp_setting('product_storage'), true);
?>
</select><input type="submit" name="download-settings" value="<?php
_e('Settings…', 'Shopp');
?>
" class="button-secondary hide-if-js"/>
<div id="download-storage-engine" class="storage-settings"><?php
if ($DownloadStorage) {
echo $DownloadStorage->ui('download');
}
?>
</div>
</td>
</tr>
</table>
示例7: wp_nonce_field
<div class="clear">
<?php
wp_nonce_field('shopp_categories_manager');
?>
</div>
<div class="tablenav top">
<div class="alignleft actions">
<select name="action" id="actions">
<option value="" selected="selected"><?php
_e('Bulk Actions…', 'Shopp');
?>
</option>
<?php
echo Shopp::menuoptions(array('delete' => Shopp::__('Delete')), false, true);
?>
</select>
<input type="submit" value="<?php
esc_attr_e('Apply', 'Shopp');
?>
" id="apply" class="button action" />
</div>
<?php
$ListTable->pagination('top');
?>
</div>
<table class="widefat" cellspacing="0">
<thead>
示例8: _e
<p class="clearfix">
<span>
<input type="hidden" name="marketing" value="no" />
<input type="checkbox" id="marketing" name="marketing" value="yes"<?php
echo $Customer->marketing == 'yes' ? ' checked="checked"' : '';
?>
/>
<label for="marketing" class="inline"> <?php
_e('Subscribes to marketing', 'Shopp');
?>
</label>
</span>
</p>
<p class="clearfix">
<span>
<label for="customer-type"><?php
_e('Customer Type', 'Shopp');
?>
</label>
<select id="customer-type" name="type"><?php
echo Shopp::menuoptions(Lookup::customer_types(), $Customer->type);
?>
</select>
</span>
</p>
示例9: data
public function data()
{
$Purchase = $this->Purchase;
$names = explode(' ', $Purchase->shipname);
$firstname = array_shift($names);
$lastname = join(' ', $names);
if (empty($Purchase->_shipping_states) && !empty($Purchase->shipstate)) {
$statemenu = array($Purchase->shipstate => $Purchase->shipstate);
} else {
Shopp::menuoptions($Purchase->_shipping_states, $Purchase->shipstate, true);
}
return array('${type}' => 'shipping', '${firstname}' => $firstname, '${lastname}' => $lastname, '${address}' => $Purchase->shipaddress, '${xaddress}' => $Purchase->shipxaddress, '${city}' => $Purchase->shipcity, '${state}' => $Purchase->shipstate, '${postcode}' => $Purchase->shippostcode, '${country}' => $Purchase->shipcountry, '${statemenu}' => $statemenu, '${countrymenu}' => Shopp::menuoptions($Purchase->_countries, $Purchase->shipcountry, true));
}
示例10:
</span>
<span id="${type}-state-inputs">
<label for="${type}-state"><?php
Shopp::_e('State / Province');
?>
</label>
<select name="${type}[state]" id="${type}-state-menu">${statemenu}</select>
<input type="text" name="${type}[state]" id="${type}-state" value="${state}" size="12" disabled="disabled" class="hidden" />
</span>
</p>
<p class="inline-fields">
<span>
<label for="${type}-postcode"><?php
Shopp::_e('Postal Code');
?>
</label>
<input type="text" name="${type}[postcode]" id="${type}-postcode" value="${postcode}" size="10" /><br />
</span>
<span>
<label for="${type}-country"><?php
Shopp::_e('Country');
?>
</label>
<select name="${type}[country]" id="${type}-country">
<?php
echo Shopp::menuoptions($Customer->_countries, 'billing' == $type ? $Customer->Billing->country : $Customer->Shipping->country, true);
?>
</select>
</span>
</p>
示例11: array
$default = array('tracking' => '', 'carrier' => '');
$shipment = isset($_POST['shipment']) ? $_POST['shipment'] : array($default);
$shipments = (int) $_POST['shipments'];
if (isset($_POST['delete-shipment'])) {
$queue = array_keys($_POST['delete-shipment']);
foreach ($queue as $index) {
array_splice($shipment, $index, 1);
}
}
if (isset($_POST['add-shipment'])) {
$shipment[] = $default;
}
// Build the shipment entry UIs
foreach ($shipment as $id => $package) {
extract($package);
$menu = Shopp::menuoptions($carriers_menu, $carrier, true);
$shipmentuis = ShoppUI::template($shipmentui, array('${id}' => $id, '${num}' => $id + 1, '${tracking}' => $tracking, '${carriermenu}' => $menu));
}
echo ShoppUI::template($shipnotice_ui, array('${shipments}' => $shipmentuis, '${shipmentnum}' => count($shipment) + 1));
}
if ('refund-order' == $action) {
$data = array('${action}' => 'refund', '${title}' => __('Refund Order', 'Shopp'), '${reason}' => __('Reason for refund', 'Shopp'), '${send}' => __('Send to gateway', 'Shopp'), '${cancel}' => __('Cancel Refund', 'Shopp'), '${process}' => __('Process Refund', 'Shopp'));
if (isset($_POST['cancel-order'])) {
$data = array('${action}' => 'cancel', '${disable_amount}' => ' disabled="disabled"', '${title}' => __('Cancel Order', 'Shopp'), '${reason}' => __('Reason for cancellation', 'Shopp'), '${send}' => __('Send to gateway', 'Shopp'), '${cancel}' => __('Do Not Cancel', 'Shopp'), '${process}' => __('Cancel Order', 'Shopp'));
}
echo ShoppUI::template($refundui, $data);
}
?>
</div>
</div>
</div>
示例12: _e
<div class="alignleft actions">
<select name="newstatus">
<?php
echo Shopp::menuoptions($statusLabels, false, true);
?>
</select>
<button type="submit" id="update-button" name="update" value="order" class="button-secondary"><?php
_e('Update', 'Shopp');
?>
</button>
</div>
<div class="alignleft actions filtering">
<select name="range" id="range">
<?php
echo Shopp::menuoptions($ranges, $range, true);
?>
</select><div id="dates" class="hide-if-js"><div id="start-position" class="calendar-wrap"><input type="text" id="start" name="start" value="<?php
echo $startdate;
?>
" size="10" class="search-input selectall" /></div>
<small>to</small>
<div id="end-position" class="calendar-wrap"><input type="text" id="end" name="end" value="<?php
echo $enddate;
?>
" size="10" class="search-input selectall" /></div>
</div>
<button type="submit" id="filter-button" name="filter" value="order" class="button-secondary"><?php
_e('Filter', 'Shopp');
?>
</button>
示例13: extra_tablenav
public function extra_tablenav($which)
{
if ('bottom' == $which) {
return;
}
echo '<select name="id" id="payment-option-menu">' . ' <option>' . Shopp::__('Add a payment system…') . '</option>' . ' ' . Shopp::menuoptions($this->installed, false, true) . '</select>' . '<button type="submit" name="add-payment-option" id="add-payment-option" class="button-secondary hide-if-js" tabindex="9999">' . Shopp::__('Add Payment System') . '</button>';
}
示例14: _e
_e('Search Products', 'Shopp');
?>
" class="button" />
</p>
<div class="tablenav top">
<div class="alignleft actions">
<select name="action" id="actions">
<option value="" selected="selected"><?php
_e('Bulk Actions…', 'Shopp');
?>
</option>
<?php
echo Shopp::menuoptions($actions_menu, false, true);
?>
</select>
<input type="submit" value="<?php
esc_attr_e('Apply', 'Shopp');
?>
" name="apply" id="apply" class="button-secondary action" />
</div>
<div class="alignleft actions">
<?php
echo $categories_menu;
?>
<?php
echo $inventory_menu;
?>
示例15: array
<?php
if (count(shopp_setting('target_markets')) == 0) {
echo '<div class="error"><p>' . Shopp::__('No target markets have been selected in your store setup.') . '</p></div>';
}
?>
<script id="property-menu" type="text/x-jquery-tmpl"><?php
$propertymenu = array('product-name' => Shopp::__('Product name is'), 'product-tags' => Shopp::__('Product is tagged'), 'product-category' => Shopp::__('Product in category'), 'customer-type' => Shopp::__('Customer type is'));
echo Shopp::menuoptions($propertymenu, false, true);
?>
</script>
<script id="countries-menu" type="text/x-jquery-tmpl"><?php
echo Shopp::menuoptions($Table->countries, false, true);
?>
</script>
<script id="conditional" type="text/x-jquery-tmpl">
<?php
ob_start();
?>
<li>
<?php
echo ShoppUI::button('delete', 'deleterule');
?>
<select name="settings[taxrates][${id}][rules][${ruleid}][p]" class="property">${property_menu}</select> <input type="text" name="settings[taxrates][${id}][rules][${ruleid}][v]" size="25" class="value" value="${rulevalue}" />
<?php
echo ShoppUI::button('add', 'addrule');
?>
</li>