PhpDocs
This commit is contained in:
parent
6db8ac6f6f
commit
dd5a2fb334
|
@ -171,7 +171,7 @@ class WC_Makepot {
|
|||
* @access public
|
||||
* @param mixed $filename
|
||||
* @param int $lines (default: 30)
|
||||
* @return void
|
||||
* @return string|bool
|
||||
*/
|
||||
public static function get_first_lines($filename, $lines = 30) {
|
||||
$extf = fopen($filename, 'r');
|
||||
|
@ -194,7 +194,7 @@ class WC_Makepot {
|
|||
* @access public
|
||||
* @param mixed $header
|
||||
* @param mixed &$source
|
||||
* @return void
|
||||
* @return string|bool
|
||||
*/
|
||||
public static function get_addon_header($header, &$source) {
|
||||
if (preg_match('|'.$header.':(.*)$|mi', $source, $matches))
|
||||
|
|
|
@ -295,7 +295,7 @@ abstract class WC_Email extends WC_Settings_API {
|
|||
* get_blogname function.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
function get_blogname() {
|
||||
return wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
|
||||
|
@ -456,7 +456,7 @@ abstract class WC_Email extends WC_Settings_API {
|
|||
*
|
||||
* @access public
|
||||
* @param mixed $content
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
function style_inline( $content ) {
|
||||
if ( ! class_exists( 'DOMDocument' ) ) {
|
||||
|
@ -487,7 +487,7 @@ abstract class WC_Email extends WC_Settings_API {
|
|||
* get_content_plain function.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
function get_content_plain() {}
|
||||
|
||||
|
@ -495,7 +495,7 @@ abstract class WC_Email extends WC_Settings_API {
|
|||
* get_content_html function.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
function get_content_html() {}
|
||||
|
||||
|
|
|
@ -964,7 +964,7 @@ class WC_Product {
|
|||
* get_average_rating function.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get_average_rating() {
|
||||
if ( false === ( $average_rating = get_transient( 'wc_average_rating_' . $this->id ) ) ) {
|
||||
|
@ -999,7 +999,7 @@ class WC_Product {
|
|||
* get_rating_count function.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return int
|
||||
*/
|
||||
public function get_rating_count() {
|
||||
if ( false === ( $count = get_transient( 'wc_rating_count_' . $this->id ) ) ) {
|
||||
|
|
|
@ -241,8 +241,8 @@ class WC_Order {
|
|||
* Return an array of items/products within this order.
|
||||
*
|
||||
* @access public
|
||||
* @param string $type Types of line items to get (array or string)
|
||||
* @return void
|
||||
* @param string|array $type Types of line items to get (array or string)
|
||||
* @return array
|
||||
*/
|
||||
public function get_items( $type = '' ) {
|
||||
global $wpdb;
|
||||
|
@ -325,7 +325,7 @@ class WC_Order {
|
|||
* Return an array of taxes within this order.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return array
|
||||
*/
|
||||
public function get_taxes() {
|
||||
return $this->get_items( 'tax' );
|
||||
|
@ -334,7 +334,7 @@ class WC_Order {
|
|||
/**
|
||||
* Return an array of shipping costs within this order.
|
||||
*
|
||||
* @return void
|
||||
* @return array
|
||||
*/
|
||||
public function get_shipping_methods() {
|
||||
return $this->get_items( 'shipping' );
|
||||
|
@ -342,8 +342,8 @@ class WC_Order {
|
|||
|
||||
/**
|
||||
* Check whether this order has a specific shipping method or not
|
||||
*
|
||||
* @return void
|
||||
* @param string $method_id
|
||||
* @return bool
|
||||
*/
|
||||
public function has_shipping_method( $method_id ) {
|
||||
$shipping_methods = $this->get_shipping_methods();
|
||||
|
@ -364,7 +364,7 @@ class WC_Order {
|
|||
* Get taxes, merged by code, formatted ready for output.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return array
|
||||
*/
|
||||
public function get_tax_totals() {
|
||||
$taxes = $this->get_items( 'tax' );
|
||||
|
@ -390,8 +390,8 @@ class WC_Order {
|
|||
|
||||
/**
|
||||
* has_meta function for order items.
|
||||
*
|
||||
* @access public
|
||||
* @param string $order_item_id
|
||||
* @return array of meta data
|
||||
*/
|
||||
public function has_meta( $order_item_id ) {
|
||||
|
@ -406,10 +406,10 @@ class WC_Order {
|
|||
* Get order item meta.
|
||||
*
|
||||
* @access public
|
||||
* @param mixed $item_id
|
||||
* @param mixed $order_item_id
|
||||
* @param string $key (default: '')
|
||||
* @param bool $single (default: false)
|
||||
* @return void
|
||||
* @return array|string
|
||||
*/
|
||||
public function get_item_meta( $order_item_id, $key = '', $single = false ) {
|
||||
return get_metadata( 'order_item', $order_item_id, $key, $single );
|
||||
|
|
|
@ -70,7 +70,7 @@ class WC_Product_External extends WC_Product {
|
|||
* get_product_url function.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get_product_url() {
|
||||
return esc_url( $this->product_url );
|
||||
|
@ -80,7 +80,7 @@ class WC_Product_External extends WC_Product {
|
|||
* get_button_text function.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get_button_text() {
|
||||
return $this->button_text ? $this->button_text : __( 'Buy product', 'woocommerce' );
|
||||
|
|
|
@ -366,7 +366,7 @@ class WC_Gateway_Mijireh extends WC_Payment_Gateway {
|
|||
* is_slurp_page function.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return bool
|
||||
*/
|
||||
public static function is_slurp_page() {
|
||||
global $post;
|
||||
|
|
|
@ -129,7 +129,7 @@ function wc_set_customer_auth_cookie( $customer_id ) {
|
|||
* Get past orders (by email) and update them
|
||||
*
|
||||
* @param int $customer_id
|
||||
* @return void
|
||||
* @return int
|
||||
*/
|
||||
function wc_update_new_customer_past_orders( $customer_id ) {
|
||||
|
||||
|
|
|
@ -193,6 +193,10 @@ function woocommerce_price( $price, $args = array() ) {
|
|||
function woocommerce_let_to_num( $size ) {
|
||||
wc_let_to_num( $size );
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
function woocommerce_date_format() {
|
||||
wc_date_format();
|
||||
}
|
||||
|
|
|
@ -397,7 +397,8 @@ if ( ! function_exists( 'woocommerce_product_loop_start' ) ) {
|
|||
* Output the start of a product loop. By default this is a UL
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @param bool @echo
|
||||
* @return string
|
||||
*/
|
||||
function woocommerce_product_loop_start( $echo = true ) {
|
||||
ob_start();
|
||||
|
@ -414,7 +415,8 @@ if ( ! function_exists( 'woocommerce_product_loop_end' ) ) {
|
|||
* Output the end of a product loop. By default this is a UL
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @param bool $echo
|
||||
* @return string
|
||||
*/
|
||||
function woocommerce_product_loop_end( $echo = true ) {
|
||||
ob_start();
|
||||
|
@ -1268,7 +1270,7 @@ if ( ! function_exists( 'woocommerce_products_will_display' ) ) {
|
|||
*
|
||||
* @access public
|
||||
* @subpackage Loop
|
||||
* @return void
|
||||
* @return bool
|
||||
*/
|
||||
function woocommerce_products_will_display() {
|
||||
global $wpdb;
|
||||
|
@ -1327,7 +1329,8 @@ if ( ! function_exists( 'woocommerce_product_subcategories' ) ) {
|
|||
*
|
||||
* @access public
|
||||
* @subpackage Loop
|
||||
* @return void
|
||||
* @param array $args
|
||||
* @return bool
|
||||
*/
|
||||
function woocommerce_product_subcategories( $args = array() ) {
|
||||
global $wp_query;
|
||||
|
|
|
@ -124,7 +124,7 @@ function wc_product_dropdown_categories( $args = array(), $deprecated_hierarchic
|
|||
/**
|
||||
* Walk the Product Categories.
|
||||
*
|
||||
* @return void
|
||||
* @return mixed
|
||||
*/
|
||||
function wc_walk_category_dropdown_tree() {
|
||||
global $woocommerce;
|
||||
|
|
Loading…
Reference in New Issue