本文整理汇总了PHP中woocommerce_admin_fields函数的典型用法代码示例。如果您正苦于以下问题:PHP woocommerce_admin_fields函数的具体用法?PHP woocommerce_admin_fields怎么用?PHP woocommerce_admin_fields使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了woocommerce_admin_fields函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: output
/**
* Output the settings
*/
public function output()
{
global $woocommerce, $woocommerce_settings, $current_section, $current_tab;
if (!current_user_can('manage_woocommerce')) {
wp_die(__('You do not have sufficient permissions to access this page.', MAILPOET_WOOCOMMERCE_TEXT_DOMAIN));
}
do_action('woocommerce_mailpoet_settings_start');
$mailpoet_settings = $this->get_settings();
// Get current section
$current_section = empty($_REQUEST['section']) ? 'general' : sanitize_text_field(urldecode($_REQUEST['section']));
$current = $current_section ? '' : ' class="current"';
// Creates each settings section.
$mailpoet_section = apply_filters('woocommerce_mailpoet_settings_sections', array('general' => __('General', MAILPOET_WOOCOMMERCE_TEXT_DOMAIN), 'lists' => __('Lists', MAILPOET_WOOCOMMERCE_TEXT_DOMAIN)));
foreach ($mailpoet_section as $section => $title) {
$title = ucwords($title);
$current = $section == $current_section ? ' class="current"' : '';
$links[] = '<a href="' . add_query_arg('section', $section, admin_url('admin.php?page=woocommerce_settings&tab=mailpoet')) . '"' . $current . '>' . esc_html($title) . '</a>';
}
echo '<ul class="subsubsub"><li>' . implode('| </li><li>', $links) . '</li></ul><br class="clear" />';
woocommerce_admin_fields($mailpoet_settings);
if ($current_section == 'lists') {
include_once MailPoet_WooCommerce_Add_on()->plugin_path() . '/includes/admin/settings/settings-newsletters.php';
$mailpoet_list = mailpoet_lists();
do_action('woocommerce_mailpoet_list_newsletters', $mailpoet_list);
}
}
示例2: woo_settings
function woo_settings()
{
global $woocommerce_settings;
woocommerce_admin_fields($woocommerce_settings['rtwoogl']);
?>
<div><a href="#" id="rtwoogl_test_connection" class="button" style="margin-top: 15px;"><?php
_e('Test Connection');
?>
</a></div>
<?php
}
示例3: settings_tab_action
/**
* settings_tab_action()
*
* Do this when viewing our custom settings tab(s). One function for all tabs.
*/
function settings_tab_action()
{
global $woocommerce_settings;
// Determine the current tab in effect.
$current_tab = $this->get_tab_in_view(current_filter(), 'woocommerce_settings_tabs_');
// Hook onto this from another function to keep things clean.
// do_action( 'woocommerce_newsletter_settings' );
do_action('woocommerce_visibility_options_settings');
// Display settings for this tab (make sure to add the settings to the tab).
woocommerce_admin_fields($woocommerce_settings[$current_tab]);
}
示例4: pw_woocommerce_tabs_print_plugin_options
public function pw_woocommerce_tabs_print_plugin_options()
{
?>
<div class="subsubsub_section">
<br class="clear" />
<?php
foreach ($this->options as $id => $tab) {
?>
<div class="section" id="pw_woocommerce_tabs_<?php
echo $id;
?>
">
<?php
woocommerce_admin_fields($this->options[$id]);
?>
</div>
<?php
}
?>
</div>
<?php
}
示例5: settings_tab
public static function settings_tab()
{
woocommerce_admin_fields(self::get_settings());
}
示例6: route
public static function route()
{
switch (self::$ACTION) {
case 'create':
self::create_new();
return self::show_list();
break;
case 'edit':
$GLOBALS['hide_save_button'] = true;
$delete_url = admin_url('admin.php?page=wc-settings&tab=woorule_settings_tab&woo-rule-action=delete&rule-id=') . self::$RULE_ID;
woocommerce_admin_fields(self::edit_rule());
include_once (new WooRule())->get_path() . '/includes/admin/views/html-admin-buttons.php';
break;
case 'delete':
self::delete_rule();
self::show_list();
break;
default:
return self::show_list();
break;
}
}
示例7: print_plugin_options
/**
* Print all plugin options.
*
* @return void
* @since 1.0.0
*/
public function print_plugin_options()
{
$links = apply_filters('yith_wcwl_tab_links', array('<a href="#yith_wcwl_general_settings">' . __('General Settings', 'yit') . '</a>', '<a href="#yith_wcwl_styles">' . __('Styles', 'yit') . '</a>', '<a href="#yith_wcwl_socials_share">' . __('Socials & Share', 'yit') . '</a>'));
$this->_printBanner();
?>
<div class="subsubsub_section">
<!--<ul class="subsubsub">
<li>
<?php
/*echo implode( ' | </li><li>', $links ) */
?>
</li>
</ul>-->
<br class="clear" />
<?php
foreach ($this->options as $id => $tab) {
?>
<!-- tab #<?php
echo $id;
?>
-->
<div class="section" id="yith_wcwl_<?php
echo $id;
?>
">
<?php
woocommerce_admin_fields($this->options[$id]);
?>
<?php
if ($id == 'styles') {
?>
<div id="yith_wcwl_styles_colors">
<h3><?php
_e('Colors', 'yit');
?>
</h3>
<?php
$this->_styles_options();
?>
</div>
<?php
}
?>
</div>
<?php
}
?>
</div>
<?php
}
示例8: smart_coupon_admin_settings
/**
* Function to display fields for configuring settings for Gift Certificate
*/
public function smart_coupon_admin_settings()
{
woocommerce_admin_fields($this->sc_general_settings);
}
示例9: nod_do_settings_tab
/**
* Output the settings options to the tab.
*
* @since 0.0.1
* @global
* @param
* @return
*/
function nod_do_settings_tab()
{
woocommerce_admin_fields(nod_registered_settings());
}
示例10: admin_option_page
function admin_option_page()
{
woocommerce_admin_fields($this->settings);
}
示例11: admin_settings
function admin_settings()
{
woocommerce_admin_fields($this->settings);
}
示例12: handler_wc_get_settings_tab
/**
* Called when viewing our custom settings tab(s). One function for all tabs.
*/
public function handler_wc_get_settings_tab()
{
global $woocommerce_settings;
// Determine the current tab in effect.
$this->current_tab = $this->get_tab_in_view( current_filter(), 'woocommerce_settings_tabs_' );
// Hook onto this from another function to keep things clean.
do_action( 'woocommerce_email_attachment_settings' );
// Display settings for this tab (make sure to add the settings to the tab).
woocommerce_admin_fields( $woocommerce_settings[ $this->current_tab ] );
}
示例13: woo_vou_settings_tab
/**
* Settings Tab Content
*
* Adds the settings content to the Voucher tab.
*
* @package WooCommerce - PDF Vouchers
* @since 1.6
*/
public function woo_vou_settings_tab()
{
woocommerce_admin_fields($this->woo_vou_get_settings());
}
示例14: woocommerce_admin_fields
echo '</ul>';
}
}
?>
</li>
<?php
}
?>
</ul><br />
</div>
<div id="tabs-2">
<?php
woocommerce_admin_fields($this->get_options());
?>
</div>
<div id="tabs-3" style="display: none;">
<?php
$_REQUEST['woof_layout_edit'] = 1;
?>
<link rel='stylesheet' id='woof-css' href='<?php
echo WOOF_LINK;
?>
css/front.css' type='text/css' media='all' />
<div class="woof_auto_show">
<?php
//echo do_shortcode('[woof]')
示例15: show_settings
/**
* Show the 'Pre-Orders' settings page
*
* @since 1.0
*/
public function show_settings()
{
woocommerce_admin_fields($this->get_settings());
}