Merge pull request #9943 from frozzare/docs/admin-wc-meta-boxes

Add missing phpdoc param tags to all WC_Meta_Box_* classes
This commit is contained in:
Claudio Sanches 2016-01-04 20:01:50 -02:00
commit 9f5f1bd4fe
10 changed files with 44 additions and 1 deletions

View File

@ -21,6 +21,8 @@ class WC_Meta_Box_Coupon_Data {
/**
* Output the metabox.
*
* @param WP_Post $post
*/
public static function output( $post ) {
wp_nonce_field( 'woocommerce_save_data', 'woocommerce_meta_nonce' );
@ -209,6 +211,9 @@ class WC_Meta_Box_Coupon_Data {
/**
* Save meta box data.
*
* @param int $post_id
* @param WP_Post $post
*/
public static function save( $post_id, $post ) {
global $wpdb;

View File

@ -21,6 +21,8 @@ class WC_Meta_Box_Order_Actions {
/**
* Output the metabox.
*
* @param WP_Post $post
*/
public static function output( $post ) {
global $theorder;
@ -90,6 +92,9 @@ class WC_Meta_Box_Order_Actions {
/**
* Save meta box data.
*
* @param int $post_id
* @param WP_Post $post
*/
public static function save( $post_id, $post ) {
@ -147,7 +152,7 @@ class WC_Meta_Box_Order_Actions {
/**
* Set the correct message ID.
*
* @param $location
* @param string $location
*
* @since 2.3.0
*

View File

@ -133,6 +133,8 @@ class WC_Meta_Box_Order_Data {
/**
* Output the metabox.
*
* @param WP_Post $post
*/
public static function output( $post ) {
global $theorder;
@ -401,6 +403,9 @@ class WC_Meta_Box_Order_Data {
/**
* Save meta box data.
*
* @param int $post_id
* @param WP_Post $post
*/
public static function save( $post_id, $post ) {
global $wpdb;

View File

@ -19,6 +19,8 @@ class WC_Meta_Box_Order_Downloads {
/**
* Output the metabox.
*
* @param WP_Post $post
*/
public static function output( $post ) {
global $post, $wpdb;
@ -77,6 +79,9 @@ class WC_Meta_Box_Order_Downloads {
/**
* Save meta box data.
*
* @param int $post_id
* @param WP_Post $post
*/
public static function save( $post_id, $post ) {
global $wpdb;

View File

@ -21,6 +21,8 @@ class WC_Meta_Box_Order_Items {
/**
* Output the metabox.
*
* @param WP_Post $post
*/
public static function output( $post ) {
global $post, $thepostid, $theorder;
@ -41,6 +43,9 @@ class WC_Meta_Box_Order_Items {
/**
* Save meta box data.
*
* @param int $post_id
* @param WP_Post $post
*/
public static function save( $post_id, $post ) {
wc_save_order_items( $post_id, $_POST );

View File

@ -19,6 +19,8 @@ class WC_Meta_Box_Order_Notes {
/**
* Output the metabox.
*
* @param WP_Post $post
*/
public static function output( $post ) {
global $post;

View File

@ -21,6 +21,8 @@ class WC_Meta_Box_Order_Reviews {
/**
* Output the metabox.
*
* @param WP_Comment $comment
*/
public static function output( $comment ) {
wp_nonce_field( 'woocommerce_save_data', 'woocommerce_meta_nonce' );
@ -37,6 +39,9 @@ class WC_Meta_Box_Order_Reviews {
/**
* Save meta box data.
*
* @param string $location
* @param int $comment_id
*/
public static function save( $location, $comment_id ) {
// Not allowed, return regular value without updating meta

View File

@ -21,6 +21,8 @@ class WC_Meta_Box_Product_Data {
/**
* Output the metabox.
*
* @param WP_Post $post
*/
public static function output( $post ) {
global $post, $thepostid;
@ -1233,6 +1235,8 @@ class WC_Meta_Box_Product_Data {
/**
* Save meta box data.
*
* @param int $post_id
* @param WP_Post $post
*/
public static function save_variations( $post_id, $post ) {
global $wpdb;

View File

@ -21,6 +21,8 @@ class WC_Meta_Box_Product_Images {
/**
* Output the metabox.
*
* @param WP_Post $post
*/
public static function output( $post ) {
?>
@ -81,6 +83,9 @@ class WC_Meta_Box_Product_Images {
/**
* Save meta box data.
*
* @param int $post_id
* @param WP_Post $post
*/
public static function save( $post_id, $post ) {
$attachment_ids = isset( $_POST['product_image_gallery'] ) ? array_filter( explode( ',', wc_clean( $_POST['product_image_gallery'] ) ) ) : array();

View File

@ -21,6 +21,8 @@ class WC_Meta_Box_Product_Short_Description {
/**
* Output the metabox.
*
* @param WP_Post $post
*/
public static function output( $post ) {