本文整理汇总了PHP中WC_Admin_Settings::output_fields方法的典型用法代码示例。如果您正苦于以下问题:PHP WC_Admin_Settings::output_fields方法的具体用法?PHP WC_Admin_Settings::output_fields怎么用?PHP WC_Admin_Settings::output_fields使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WC_Admin_Settings
的用法示例。
在下文中一共展示了WC_Admin_Settings::output_fields方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: woocommerce_admin_fields
/**
* Output admin fields.
*
* Loops though the woocommerce options array and outputs each field.
*
* @param array $options Opens array to output
*/
function woocommerce_admin_fields($options)
{
if (!class_exists('WC_Admin_Settings')) {
include 'class-wc-admin-settings.php';
}
WC_Admin_Settings::output_fields($options);
}
示例2: output
/**
* Output the settings.
*/
public function output()
{
global $current_section, $hide_save_button;
// Load shipping methods so we can show any global options they may have
$shipping_methods = WC()->shipping->load_shipping_methods();
if ('options' === $current_section) {
$settings = $this->get_settings();
WC_Admin_Settings::output_fields($settings);
return;
} elseif ('classes' === $current_section) {
$hide_save_button = true;
$this->output_shipping_class_screen();
return;
} else {
foreach ($shipping_methods as $method) {
if (strtolower(get_class($method)) === strtolower($current_section) && $method->has_settings()) {
$method->admin_options();
return;
}
}
}
// Default to zones screen
$hide_save_button = true;
$this->output_zones_screen();
}
示例3: output
/**
* Output the settings.
*
* @since 1.0.0
*/
public function output() {
global $current_section;
$settings = $this->get_settings( $current_section );
WC_Admin_Settings::output_fields( $settings );
}
示例4: output_settings_fields
public function output_settings_fields()
{
WC_Admin_Settings::output_fields($this->settings);
$jsPath = $this->options->get_react_app_path();
echo $this->batch_upload();
$data = array('apiUrl' => plugins_url('api.php', dirname(__FILE__)));
wp_enqueue_script('wc-siftsci-react-app', $jsPath, array(), false, true);
wp_localize_script('wc-siftsci-react-app', "_siftsci_app_input_data", $data);
}
示例5: output
/**
* Output the settings
*/
public function output()
{
global $current_section;
if ($current_section == '') {
$GLOBALS['hide_save_button'] = true;
}
$settings = $this->get_settings($current_section);
WC_Admin_Settings::output_fields($settings);
$this->show_table_products();
}
示例6: output_settings
public function output_settings()
{
global $current_section;
$settings = $this->get_settings($current_section);
$hide_sec = array('plugin', 'newsletter');
if (in_array($current_section, $hide_sec)) {
$GLOBALS['hide_save_button'] = true;
} else {
WC_Admin_Settings::output_fields($settings);
}
}
示例7: output
/**
* Render the settings for the current section
*
* @since 2.0.0
*/
public function output()
{
$settings = $this->get_settings();
// inject the actual setting value before outputting the fields
// ::output_fields() uses get_option() but customizations are stored
// in a single option so this dynamically returns the correct value
foreach ($this->customizations as $filter => $value) {
add_filter("pre_option_{$filter}", array($this, 'get_customization'));
}
WC_Admin_Settings::output_fields($settings);
}
示例8: output
/**
* Output the settings
*/
public function output()
{
global $current_section;
$tax_classes = array_filter(array_map('trim', explode("\n", get_option('woocommerce_tax_classes'))));
if ($current_section == 'standard' || in_array($current_section, array_map('sanitize_title', $tax_classes))) {
$this->output_tax_rates();
} else {
$settings = $this->get_settings();
WC_Admin_Settings::output_fields($settings);
}
}
示例9: output
/**
* Output the settings
*/
public function output()
{
global $current_section;
$tax_classes = WC_Tax::get_tax_classes();
if ($current_section == 'standard' || in_array($current_section, array_map('sanitize_title', $tax_classes))) {
$this->output_tax_rates();
} else {
$settings = $this->get_settings();
WC_Admin_Settings::output_fields($settings);
}
}
示例10: output
/**
* Output the settings
*/
public function output()
{
global $current_section;
$settings = $this->get_settings();
WC_Admin_Settings::output_fields($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);
}
}
示例11: output
/**
* Output the settings
*/
public function output()
{
global $current_section;
if ($current_section == '') {
$settings = $this->rf_genaral_setting();
} elseif ($current_section == 'email_template') {
$settings = $this->rf_email_template_setting();
} else {
$settings = $this->rf_social_share_setting();
}
WC_Admin_Settings::output_fields($settings);
}
示例12: output
/**
* Output the settings.
*/
public function output()
{
global $current_section;
// Load shipping methods so we can show any global options they may have.
$payment_gateways = WC()->payment_gateways->payment_gateways();
if ($current_section) {
foreach ($payment_gateways as $gateway) {
if (in_array($current_section, array($gateway->id, sanitize_title(get_class($gateway))))) {
$gateway->admin_options();
break;
}
}
} else {
$settings = $this->get_settings();
WC_Admin_Settings::output_fields($settings);
}
}
示例13: output
/**
* Output the settings
*/
public function output()
{
global $current_section;
// Load shipping methods so we can show any global options they may have
$shipping_methods = WC()->shipping->load_shipping_methods();
if ($current_section) {
foreach ($shipping_methods as $method) {
if (strtolower(get_class($method)) == strtolower($current_section) && $method->has_settings()) {
$method->admin_options();
break;
}
}
} else {
$settings = $this->get_settings();
WC_Admin_Settings::output_fields($settings);
}
}
示例14: output
/**
* Output the settings.
*/
public function output()
{
global $current_section;
// Define emails that can be customised here
$mailer = WC()->mailer();
$email_templates = $mailer->get_emails();
if ($current_section) {
foreach ($email_templates as $email_key => $email) {
if (strtolower($email_key) == $current_section) {
$email->admin_options();
break;
}
}
} else {
$settings = $this->get_settings();
WC_Admin_Settings::output_fields($settings);
}
}
示例15: output
/**
* Output the settings.
*/
public function output()
{
global $current_section, $hide_save_button;
// Load shipping methods so we can show any global options they may have
$shipping_methods = WC()->shipping->load_shipping_methods();
if ('' === $current_section) {
$this->output_zones_screen();
} elseif ('options' === $current_section) {
$settings = $this->get_settings();
WC_Admin_Settings::output_fields($settings);
} elseif ('classes' === $current_section) {
$hide_save_button = true;
$this->output_shipping_class_screen();
} else {
foreach ($shipping_methods as $method) {
if (in_array($current_section, array($method->id, sanitize_title(get_class($method)))) && $method->has_settings()) {
$method->admin_options();
}
}
}
}