Merge pull request #9508 from shivapoudel/periodic-ending
Tweak the dockblocks and periodic-ending fix
This commit is contained in:
commit
e4ba0ae8e9
|
@ -1,20 +1,20 @@
|
|||
<?php
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* WooCommerce Integration class.
|
||||
* Abstract Integration Class
|
||||
*
|
||||
* Extended by individual integrations to offer additional functionality.
|
||||
*
|
||||
* @class WC_Integration
|
||||
* @extends WC_Settings_API
|
||||
* @version 2.0.0
|
||||
* @package WooCommerce/Abstracts
|
||||
* @category Abstract Class
|
||||
* @author WooThemes
|
||||
* @class WC_Integration
|
||||
* @extends WC_Settings_API
|
||||
* @version 2.0.0
|
||||
* @package WooCommerce/Abstracts
|
||||
* @category Abstract Class
|
||||
* @author WooThemes
|
||||
*/
|
||||
abstract class WC_Integration extends WC_Settings_API {
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
<?php
|
||||
/**
|
||||
* Admin Settings API used by Shipping Methods and Payment Gateways
|
||||
* Abstract Settings API Class
|
||||
*
|
||||
* Admin Settings API used by Shipping Methods and Payment Gateways.
|
||||
*
|
||||
* @class WC_Settings_API
|
||||
* @version 2.4.0
|
||||
|
@ -86,7 +88,7 @@ abstract class WC_Settings_API {
|
|||
/**
|
||||
* Initialise Settings Form Fields.
|
||||
*
|
||||
* Add an array of fields to be displayed.
|
||||
* Add an array of fields to be displayed
|
||||
* on the gateway's settings screen.
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
@ -133,8 +135,8 @@ abstract class WC_Settings_API {
|
|||
/**
|
||||
* Initialise Gateway Settings.
|
||||
*
|
||||
* Store all settings in a single database entry.
|
||||
* and make sure the $settings array is either the default.
|
||||
* Store all settings in a single database entry
|
||||
* and make sure the $settings array is either the default
|
||||
* or the settings stored in the database.
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
@ -142,14 +144,14 @@ abstract class WC_Settings_API {
|
|||
*/
|
||||
public function init_settings() {
|
||||
|
||||
// Load form_field settings
|
||||
// Load form_field settings.
|
||||
$this->settings = get_option( $this->plugin_id . $this->id . '_settings', null );
|
||||
|
||||
if ( ! $this->settings || ! is_array( $this->settings ) ) {
|
||||
|
||||
$this->settings = array();
|
||||
|
||||
// If there are no settings defined, load defaults
|
||||
// If there are no settings defined, load defaults.
|
||||
if ( $form_fields = $this->get_form_fields() ) {
|
||||
|
||||
foreach ( $form_fields as $k => $v ) {
|
||||
|
@ -171,7 +173,7 @@ abstract class WC_Settings_API {
|
|||
*
|
||||
* @param string $key
|
||||
* @param mixed $empty_value
|
||||
* @return mixed The value specified for the option or a default value for the option
|
||||
* @return mixed The value specified for the option or a default value for the option.
|
||||
*/
|
||||
public function get_option( $key, $empty_value = null ) {
|
||||
|
||||
|
@ -179,7 +181,7 @@ abstract class WC_Settings_API {
|
|||
$this->init_settings();
|
||||
}
|
||||
|
||||
// Get option default if unset
|
||||
// Get option default if unset.
|
||||
if ( ! isset( $this->settings[ $key ] ) ) {
|
||||
$form_fields = $this->get_form_fields();
|
||||
$this->settings[ $key ] = isset( $form_fields[ $key ]['default'] ) ? $form_fields[ $key ]['default'] : '';
|
||||
|
|
|
@ -603,8 +603,8 @@ class WC_Admin_Settings {
|
|||
}
|
||||
|
||||
/**
|
||||
* Helper function to get the formated description and tip HTML for a.
|
||||
* given form field. Plugins can call this when implementing their own custom.
|
||||
* Helper function to get the formated description and tip HTML for a
|
||||
* given form field. Plugins can call this when implementing their own custom
|
||||
* settings types.
|
||||
*
|
||||
* @param array $value The form field value array
|
||||
|
|
|
@ -52,7 +52,7 @@ class WC_Install {
|
|||
}
|
||||
|
||||
/**
|
||||
* Install actions such as installing pages when a button is clicked.
|
||||
* Install actions when a update button is clicked.
|
||||
*/
|
||||
public static function install_actions() {
|
||||
if ( ! empty( $_GET['do_update_woocommerce'] ) ) {
|
||||
|
|
Loading…
Reference in New Issue