PhpDocs and TODO comments
This commit is contained in:
parent
06e047f6c3
commit
43ca01badc
|
@ -125,7 +125,6 @@ abstract class WC_Email extends WC_Settings_API {
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @return void
|
|
||||||
*/
|
*/
|
||||||
function __construct() {
|
function __construct() {
|
||||||
|
|
||||||
|
@ -270,11 +269,12 @@ abstract class WC_Email extends WC_Settings_API {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Proxy to parent's get_option and attempt to localize the result using gettext.
|
* Proxy to parent's get_option and attempt to localize the result using gettext.
|
||||||
*
|
* @access public
|
||||||
* @access public
|
* @param string $key
|
||||||
* @return string
|
* @param mixed $empty_value
|
||||||
*/
|
* @return string
|
||||||
|
*/
|
||||||
function get_option( $key, $empty_value = null ) {
|
function get_option( $key, $empty_value = null ) {
|
||||||
return __( parent::get_option( $key, $empty_value ) );
|
return __( parent::get_option( $key, $empty_value ) );
|
||||||
}
|
}
|
||||||
|
@ -324,6 +324,7 @@ abstract class WC_Email extends WC_Settings_API {
|
||||||
* style_inline_tags function.
|
* style_inline_tags function.
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
|
* @param array $tags
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
function style_inline_tags($tags) {
|
function style_inline_tags($tags) {
|
||||||
|
@ -332,8 +333,8 @@ abstract class WC_Email extends WC_Settings_API {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* style_inline_h1_tag function.
|
* style_inline_h1_tag function.
|
||||||
*
|
|
||||||
* @access public
|
* @access public
|
||||||
|
* @param array $styles
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
function style_inline_h1_tag($styles) {
|
function style_inline_h1_tag($styles) {
|
||||||
|
@ -354,8 +355,8 @@ abstract class WC_Email extends WC_Settings_API {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* style_inline_h2_tag function.
|
* style_inline_h2_tag function.
|
||||||
*
|
|
||||||
* @access public
|
* @access public
|
||||||
|
* @param array $styles
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
function style_inline_h2_tag($styles) {
|
function style_inline_h2_tag($styles) {
|
||||||
|
@ -378,6 +379,7 @@ abstract class WC_Email extends WC_Settings_API {
|
||||||
* style_inline_h3_tag function.
|
* style_inline_h3_tag function.
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
|
* @param array $styles
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
function style_inline_h3_tag($styles) {
|
function style_inline_h3_tag($styles) {
|
||||||
|
@ -396,6 +398,10 @@ abstract class WC_Email extends WC_Settings_API {
|
||||||
return $styles;
|
return $styles;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param array $styles
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
function style_inline_a_tag($styles) {
|
function style_inline_a_tag($styles) {
|
||||||
$styles['color'] = get_option( 'woocommerce_email_text_color' );
|
$styles['color'] = get_option( 'woocommerce_email_text_color' );
|
||||||
$styles['font-weight'] = 'normal';
|
$styles['font-weight'] = 'normal';
|
||||||
|
@ -408,6 +414,7 @@ abstract class WC_Email extends WC_Settings_API {
|
||||||
* style_inline_img_tag function.
|
* style_inline_img_tag function.
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
|
* @param array $styles
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
function style_inline_img_tag($styles) {
|
function style_inline_img_tag($styles) {
|
||||||
|
@ -438,6 +445,7 @@ abstract class WC_Email extends WC_Settings_API {
|
||||||
* get_style_inline_for_tag function.
|
* get_style_inline_for_tag function.
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
|
* @param string $tag
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function get_style_inline_for_tag($tag) {
|
function get_style_inline_for_tag($tag) {
|
||||||
|
|
|
@ -125,7 +125,7 @@ abstract class WC_Settings_API {
|
||||||
* Gets and option from the settings API, using defaults if necessary to prevent undefined notices.
|
* Gets and option from the settings API, using defaults if necessary to prevent undefined notices.
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @param mixed $key
|
* @param string $key
|
||||||
* @param mixed $empty_value
|
* @param mixed $empty_value
|
||||||
* @return string The value specified for the option or a default value for the option
|
* @return string The value specified for the option or a default value for the option
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -55,6 +55,10 @@ class WC_Admin_CPT_Shop_Coupon extends WC_Admin_CPT {
|
||||||
return $text;
|
return $text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Print coupon description textarea field
|
||||||
|
* @param WP_Post $post
|
||||||
|
*/
|
||||||
public function coupon_description_field( $post ) {
|
public function coupon_description_field( $post ) {
|
||||||
if ( $post->post_type != 'shop_coupon' )
|
if ( $post->post_type != 'shop_coupon' )
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -636,6 +636,10 @@ class WC_AJAX {
|
||||||
|
|
||||||
// Now find all combinations and create posts
|
// Now find all combinations and create posts
|
||||||
if ( ! function_exists( 'array_cartesian' ) ) {
|
if ( ! function_exists( 'array_cartesian' ) ) {
|
||||||
|
/**
|
||||||
|
* @param array $input
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
function array_cartesian( $input ) {
|
function array_cartesian( $input ) {
|
||||||
$result = array();
|
$result = array();
|
||||||
|
|
||||||
|
|
|
@ -1622,6 +1622,8 @@ class WC_Cart {
|
||||||
/**
|
/**
|
||||||
* Remove a single coupon by code
|
* Remove a single coupon by code
|
||||||
* @param string $coupon_code Code of the coupon to remove
|
* @param string $coupon_code Code of the coupon to remove
|
||||||
|
* @return bool
|
||||||
|
* @todo Should either be void or return true at the end of the function
|
||||||
*/
|
*/
|
||||||
public function remove_coupon( $coupon_code ) {
|
public function remove_coupon( $coupon_code ) {
|
||||||
// Coupons are globally disabled
|
// Coupons are globally disabled
|
||||||
|
|
|
@ -122,6 +122,7 @@ class WC_Shortcodes {
|
||||||
* @access public
|
* @access public
|
||||||
* @param array $atts
|
* @param array $atts
|
||||||
* @return string
|
* @return string
|
||||||
|
* @todo Must not return void. Need return '';
|
||||||
*/
|
*/
|
||||||
public static function product_category( $atts ){
|
public static function product_category( $atts ){
|
||||||
global $woocommerce_loop;
|
global $woocommerce_loop;
|
||||||
|
@ -331,6 +332,7 @@ class WC_Shortcodes {
|
||||||
* @access public
|
* @access public
|
||||||
* @param array $atts
|
* @param array $atts
|
||||||
* @return string
|
* @return string
|
||||||
|
* @todo Must not return void. Need return '';
|
||||||
*/
|
*/
|
||||||
public static function products( $atts ) {
|
public static function products( $atts ) {
|
||||||
global $woocommerce_loop;
|
global $woocommerce_loop;
|
||||||
|
@ -407,6 +409,7 @@ class WC_Shortcodes {
|
||||||
* @access public
|
* @access public
|
||||||
* @param array $atts
|
* @param array $atts
|
||||||
* @return string
|
* @return string
|
||||||
|
* @todo Must not return void. Need return '';
|
||||||
*/
|
*/
|
||||||
public static function product( $atts ) {
|
public static function product( $atts ) {
|
||||||
if (empty($atts)) return;
|
if (empty($atts)) return;
|
||||||
|
@ -466,6 +469,7 @@ class WC_Shortcodes {
|
||||||
* @access public
|
* @access public
|
||||||
* @param array $atts
|
* @param array $atts
|
||||||
* @return string
|
* @return string
|
||||||
|
* @todo Must not return void. Need return '';
|
||||||
*/
|
*/
|
||||||
public static function product_add_to_cart( $atts ) {
|
public static function product_add_to_cart( $atts ) {
|
||||||
global $wpdb, $post;
|
global $wpdb, $post;
|
||||||
|
@ -518,6 +522,7 @@ class WC_Shortcodes {
|
||||||
* @access public
|
* @access public
|
||||||
* @param array $atts
|
* @param array $atts
|
||||||
* @return string
|
* @return string
|
||||||
|
* @todo Must not return void. Need return '';
|
||||||
*/
|
*/
|
||||||
public static function product_add_to_cart_url( $atts ) {
|
public static function product_add_to_cart_url( $atts ) {
|
||||||
global $wpdb;
|
global $wpdb;
|
||||||
|
@ -789,6 +794,7 @@ class WC_Shortcodes {
|
||||||
* @access public
|
* @access public
|
||||||
* @param array $atts
|
* @param array $atts
|
||||||
* @return string
|
* @return string
|
||||||
|
* @todo Must not return void. Need return '';
|
||||||
*/
|
*/
|
||||||
public static function product_page( $atts ) {
|
public static function product_page( $atts ) {
|
||||||
if ( empty( $atts ) ) return;
|
if ( empty( $atts ) ) return;
|
||||||
|
@ -839,7 +845,6 @@ class WC_Shortcodes {
|
||||||
* Show messages
|
* Show messages
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @param array $atts
|
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function shop_messages() {
|
public static function shop_messages() {
|
||||||
|
@ -945,6 +950,10 @@ class WC_Shortcodes {
|
||||||
return '<div class="woocommerce">' . ob_get_clean() . '</div>';
|
return '<div class="woocommerce">' . ob_get_clean() . '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param array $atts
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
public static function related_products( $atts ) {
|
public static function related_products( $atts ) {
|
||||||
|
|
||||||
$atts = shortcode_atts( array(
|
$atts = shortcode_atts( array(
|
||||||
|
|
|
@ -23,7 +23,11 @@ class Mijireh_Address extends Mijireh_Model {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function validate() {
|
/**
|
||||||
|
* Check required fields
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function validate() {
|
||||||
$is_valid = $this->_check_required_fields();
|
$is_valid = $this->_check_required_fields();
|
||||||
return $is_valid;
|
return $is_valid;
|
||||||
}
|
}
|
||||||
|
|
|
@ -154,13 +154,17 @@ class Mijireh_Order extends Mijireh_Model {
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add the specified item and price to the order.
|
* Add the specified item and price to the order.
|
||||||
*
|
* Return the total number of items in the order (including the one that was just added)
|
||||||
* Return the total number of items in the order (including the one that was just added)
|
*
|
||||||
*
|
* @param Mijireh_Item|string $name
|
||||||
* @return int
|
* @param int $price
|
||||||
*/
|
* @param int $quantity
|
||||||
|
* @param string $sku
|
||||||
|
* @throws Mijireh_Exception
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
public function add_item($name, $price=0, $quantity=1, $sku='') {
|
public function add_item($name, $price=0, $quantity=1, $sku='') {
|
||||||
$item = '';
|
$item = '';
|
||||||
if(is_object($name) && get_class($name) == 'Mijireh_Item') {
|
if(is_object($name) && get_class($name) == 'Mijireh_Item') {
|
||||||
|
|
|
@ -993,8 +993,8 @@ if ( ! function_exists( 'woocommerce_sort_product_tabs' ) ) {
|
||||||
* Sort tabs by priority
|
* Sort tabs by priority
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @param mixed $tabs
|
* @param array $tabs
|
||||||
* @return void
|
* @return array
|
||||||
*/
|
*/
|
||||||
function woocommerce_sort_product_tabs( $tabs = array() ) {
|
function woocommerce_sort_product_tabs( $tabs = array() ) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue