Submit
Path:
~
/
home
/
getwphos
/
public_html
/
BenjaminMarc2023
/
wp-content
/
plugins
/
woocommerce
/
includes
/
File Content:
class-wc-register-wp-admin-settings.php
<?php /** * Take settings registered for WP-Admin and hooks them up to the REST API * * @package WooCommerce\Classes * @version 3.0.0 * @since 3.0.0 */ defined( 'ABSPATH' ) || exit; /** * Register WP admin settings class. */ class WC_Register_WP_Admin_Settings { /** * Contains the current class to pull settings from. * Either a admin page object or WC_Email object * * @var WC_Register_WP_Admin_Settings */ protected $object; /** * Hooks into the settings API and starts registering our settings. * * @since 3.0.0 * @param WC_Email|WC_Settings_Page $object The object that contains the settings to register. * @param string $type Type of settings to register (email or page). */ public function __construct( $object, $type ) { if ( ! is_object( $object ) ) { return; } $this->object = $object; if ( 'page' === $type ) { add_filter( 'woocommerce_settings_groups', array( $this, 'register_page_group' ) ); add_filter( 'woocommerce_settings-' . $this->object->get_id(), array( $this, 'register_page_settings' ) ); } elseif ( 'email' === $type ) { add_filter( 'woocommerce_settings_groups', array( $this, 'register_email_group' ) ); add_filter( 'woocommerce_settings-email_' . $this->object->id, array( $this, 'register_email_settings' ) ); } } /** * Register's all of our different notification emails as sub groups * of email settings. * * @since 3.0.0 * @param array $groups Existing registered groups. * @return array */ public function register_email_group( $groups ) { $groups[] = array( 'id' => 'email_' . $this->object->id, 'label' => $this->object->title, 'description' => $this->object->description, 'parent_id' => 'email', ); return $groups; } /** * Registers all of the setting form fields for emails to each email type's group. * * @since 3.0.0 * @param array $settings Existing registered settings. * @return array */ public function register_email_settings( $settings ) { foreach ( $this->object->form_fields as $id => $setting ) { $setting['id'] = $id; $setting['option_key'] = array( $this->object->get_option_key(), $id ); $new_setting = $this->register_setting( $setting ); if ( $new_setting ) { $settings[] = $new_setting; } } return $settings; } /** * Registers a setting group, based on admin page ID & label as parent group. * * @since 3.0.0 * @param array $groups Array of previously registered groups. * @return array */ public function register_page_group( $groups ) { $groups[] = array( 'id' => $this->object->get_id(), 'label' => $this->object->get_label(), ); return $groups; } /** * Registers settings to a specific group. * * @since 3.0.0 * @param array $settings Existing registered settings. * @return array */ public function register_page_settings( $settings ) { /** * WP admin settings can be broken down into separate sections from * a UI standpoint. This will grab all the sections associated with * a particular setting group (like 'products') and register them * to the REST API. */ $sections = $this->object->get_sections(); if ( empty( $sections ) ) { // Default section is just an empty string, per admin page classes. $sections = array( '' => '' ); } /** * We are using 'WC_Settings_Page::get_settings' on purpose even thought it's deprecated. * See the method documentation for an explanation. */ foreach ( $sections as $section => $section_label ) { $settings_from_section = $this->object->get_settings( $section ); foreach ( $settings_from_section as $setting ) { if ( ! isset( $setting['id'] ) ) { continue; } $setting['option_key'] = $setting['id']; $new_setting = $this->register_setting( $setting ); if ( $new_setting ) { $settings[] = $new_setting; } } } return $settings; } /** * Register a setting into the format expected for the Settings REST API. * * @since 3.0.0 * @param array $setting Setting data. * @return array|bool */ public function register_setting( $setting ) { if ( ! isset( $setting['id'] ) ) { return false; } $description = ''; if ( ! empty( $setting['desc'] ) ) { $description = $setting['desc']; } elseif ( ! empty( $setting['description'] ) ) { $description = $setting['description']; } $new_setting = array( 'id' => $setting['id'], 'label' => ( ! empty( $setting['title'] ) ? $setting['title'] : '' ), 'description' => $description, 'type' => $setting['type'], 'option_key' => $setting['option_key'], ); if ( isset( $setting['default'] ) ) { $new_setting['default'] = $setting['default']; } if ( isset( $setting['options'] ) ) { $new_setting['options'] = $setting['options']; } if ( isset( $setting['desc_tip'] ) ) { if ( true === $setting['desc_tip'] ) { $new_setting['tip'] = $description; } elseif ( ! empty( $setting['desc_tip'] ) ) { $new_setting['tip'] = $setting['desc_tip']; } } return $new_setting; } }
Edit
Rename
Chmod
Delete
FILE
FOLDER
Name
Size
Permission
Action
abstracts
---
0755
admin
---
0755
blocks
---
0755
cli
---
0755
customizer
---
0755
data-stores
---
0755
emails
---
0755
export
---
0755
gateways
---
0755
import
---
0755
integrations
---
0755
interfaces
---
0755
legacy
---
0755
libraries
---
0755
log-handlers
---
0755
payment-tokens
---
0755
queue
---
0755
react-admin
---
0755
rest-api
---
0755
shipping
---
0755
shortcodes
---
0755
theme-support
---
0755
tracks
---
0755
traits
---
0755
walkers
---
0755
wccom-site
---
0755
widgets
---
0755
class-wc-ajax.php
116708 bytes
0644
class-wc-api.php
5106 bytes
0644
class-wc-auth.php
12880 bytes
0644
class-wc-autoloader.php
2810 bytes
0644
class-wc-background-emailer.php
4685 bytes
0644
class-wc-background-updater.php
3535 bytes
0644
class-wc-breadcrumb.php
9722 bytes
0644
class-wc-cache-helper.php
11047 bytes
0644
class-wc-cart-fees.php
3448 bytes
0644
class-wc-cart-session.php
16611 bytes
0644
class-wc-cart-totals.php
28927 bytes
0644
class-wc-cart.php
66967 bytes
0644
class-wc-checkout.php
47751 bytes
0644
class-wc-cli.php
1737 bytes
0644
class-wc-comments.php
16241 bytes
0644
class-wc-countries.php
49688 bytes
0644
class-wc-coupon.php
34821 bytes
0644
class-wc-customer-download-log.php
3452 bytes
0644
class-wc-customer-download.php
10702 bytes
0644
class-wc-customer.php
30390 bytes
0644
class-wc-data-exception.php
1321 bytes
0644
class-wc-data-store.php
6752 bytes
0644
class-wc-datetime.php
2310 bytes
0644
class-wc-deprecated-action-hooks.php
7042 bytes
0644
class-wc-deprecated-filter-hooks.php
7518 bytes
0644
class-wc-discounts.php
33735 bytes
0644
class-wc-download-handler.php
26080 bytes
0644
class-wc-emails.php
22995 bytes
0644
class-wc-embed.php
4284 bytes
0644
class-wc-form-handler.php
45503 bytes
0644
class-wc-frontend-scripts.php
27133 bytes
0644
class-wc-geo-ip.php
31140 bytes
0644
class-wc-geolite-integration.php
2036 bytes
0644
class-wc-geolocation.php
10693 bytes
0644
class-wc-https.php
4439 bytes
0644
class-wc-install.php
91199 bytes
0644
class-wc-integrations.php
1308 bytes
0644
class-wc-log-levels.php
2600 bytes
0644
class-wc-logger.php
8976 bytes
0644
class-wc-meta-data.php
2260 bytes
0644
class-wc-order-factory.php
8695 bytes
0644
class-wc-order-item-coupon.php
4175 bytes
0644
class-wc-order-item-fee.php
8972 bytes
0644
class-wc-order-item-meta.php
5942 bytes
0644
class-wc-order-item-product.php
13453 bytes
0644
class-wc-order-item-shipping.php
7969 bytes
0644
class-wc-order-item-tax.php
6644 bytes
0644
class-wc-order-item.php
11547 bytes
0644
class-wc-order-query.php
2615 bytes
0644
class-wc-order-refund.php
5762 bytes
0644
class-wc-order.php
70361 bytes
0644
class-wc-payment-gateways.php
5545 bytes
0644
class-wc-payment-tokens.php
6390 bytes
0644
class-wc-post-data.php
20973 bytes
0644
class-wc-post-types.php
28870 bytes
0644
class-wc-privacy-background-process.php
1707 bytes
0644
class-wc-privacy-erasers.php
13938 bytes
0644
class-wc-privacy-exporters.php
15044 bytes
0644
class-wc-privacy.php
16205 bytes
0644
class-wc-product-attribute.php
7137 bytes
0644
class-wc-product-download.php
12373 bytes
0644
class-wc-product-external.php
4955 bytes
0644
class-wc-product-factory.php
3668 bytes
0644
class-wc-product-grouped.php
5349 bytes
0644
class-wc-product-query.php
2231 bytes
0644
class-wc-product-simple.php
1938 bytes
0644
class-wc-product-variable.php
22513 bytes
0644
class-wc-product-variation.php
17271 bytes
0644
class-wc-query.php
33387 bytes
0644
class-wc-rate-limiter.php
4100 bytes
0644
class-wc-regenerate-images-request.php
7923 bytes
0644
class-wc-regenerate-images.php
15555 bytes
0644
class-wc-register-wp-admin-settings.php
5171 bytes
0644
class-wc-rest-authentication.php
20448 bytes
0644
class-wc-rest-exception.php
276 bytes
0644
class-wc-session-handler.php
14209 bytes
0644
class-wc-shipping-rate.php
5638 bytes
0644
class-wc-shipping-zone.php
13392 bytes
0644
class-wc-shipping-zones.php
4106 bytes
0644
class-wc-shipping.php
11846 bytes
0644
class-wc-shortcodes.php
17648 bytes
0644
class-wc-structured-data.php
17899 bytes
0644
class-wc-tax.php
37969 bytes
0644
class-wc-template-loader.php
21908 bytes
0644
class-wc-tracker.php
36953 bytes
0644
class-wc-validation.php
5875 bytes
0644
class-wc-webhook.php
30871 bytes
0644
class-woocommerce.php
37987 bytes
0644
wc-account-functions.php
13180 bytes
0644
wc-attribute-functions.php
21102 bytes
0644
wc-cart-functions.php
17816 bytes
0644
wc-conditional-functions.php
14252 bytes
0644
wc-core-functions.php
81736 bytes
0644
wc-coupon-functions.php
2819 bytes
0644
wc-deprecated-functions.php
33485 bytes
0644
wc-formatting-functions.php
45334 bytes
0644
wc-notice-functions.php
7971 bytes
0644
wc-order-functions.php
37957 bytes
0644
wc-order-item-functions.php
5153 bytes
0644
wc-page-functions.php
7099 bytes
0644
wc-product-functions.php
49870 bytes
0644
wc-rest-functions.php
11185 bytes
0644
wc-stock-functions.php
13866 bytes
0644
wc-template-functions.php
121921 bytes
0644
wc-template-hooks.php
12681 bytes
0644
wc-term-functions.php
21155 bytes
0644
wc-update-functions.php
80757 bytes
0644
wc-user-functions.php
29247 bytes
0644
wc-webhook-functions.php
5731 bytes
0644
wc-widget-functions.php
2063 bytes
0644
N4ST4R_ID | Naxtarrr