PHP 클래스 Give_Donate_Form, Give

This class handles donation forms.
부터: 1.0
파일 보기 프로젝트 열기: wordimpress/give 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$ID integer The donation ID
$comment_count integer The comment count
$comment_status string The comment status
$filter string Filtered
$guid string The post GUID
$menu_order integer The menu order
$ping_status string The ping status
$pinged string Pinged
$post_author integer The post author
$post_content string The post content
$post_content_filtered string The post filtered content
$post_date string The post date
$post_date_gmt string The post GTM date
$post_excerpt string The post excerpt
$post_mime_type string The mime type0
$post_modified string The post modified date
$post_modified_gmt string The post modified GTM date
$post_name string The post name
$post_parent integer The post parent
$post_password string The post password
$post_status string The post status
$post_title string The post title
$to_ping string Ping

공개 메소드들

메소드 설명
__construct ( boolean $_id = false, array $_args = [] ) : void Class Constructor
__get ( string $key ) : mixed Magic __get function to dispatch a call to retrieve a private property
create ( array $data = [] ) : mixed Creates a donation form
decrease_earnings ( integer $amount ) : float | false Decrease the earnings by the given amount
decrease_sales ( integer $quantity = 1 ) : integer | false Decrement the sale count by one
get_ID ( ) : integer Retrieve the ID
get_earnings ( ) : float Retrieve the total earnings for the form
get_form_classes ( $args ) : string Get form tag classes.
get_form_wrap_classes ( $args ) : string Get form wrap Classes.
get_goal ( ) : float Retrieve the goal
get_minimum_price ( ) : float Retrieve the minimum price.
get_name ( ) : string Retrieve the donation form name
get_price ( ) : float Retrieve the price
get_prices ( ) : array Retrieve the variable prices
get_sales ( ) : integer Retrieve the sale count for the donation form
get_type ( ) : string Retrieve the donation form type, set or multi-level
has_variable_prices ( ) : boolean Has Variable Prices
increase_earnings ( integer $amount ) : float | false Increase the earnings by the given amount
increase_sales ( integer $quantity = 1 ) : integer | false Increment the sale count by one
is_close_donation_form ( ) : boolean Determine if donation form closed or not
is_custom_price_mode ( ) : boolean Determine if custom price mode is enabled or disabled
is_free ( integer $price_id = false ) : boolean Determine if the donation is free or if the given price ID is free
is_multi_type_donation_form ( ) : boolean Get if form type set or not.
is_single_price_mode ( ) : boolean Determine if single price mode is enabled or disabled

비공개 메소드들

메소드 설명
setup_donation_form ( WP_Post $donation_form ) : boolean Given the donation form data, let's set the variables
update_meta ( string $meta_key = '', string | array | object $meta_value = '' ) : boolean Updates a single meta entry for the donation form

메소드 상세

__construct() 공개 메소드

Set up the Give Donate Form Class.
부터: 1.0
public __construct ( boolean $_id = false, array $_args = [] ) : void
$_id boolean Post id. Default is false.
$_args array Arguments passed.
리턴 void

__get() 공개 메소드

Magic __get function to dispatch a call to retrieve a private property
부터: 1.0
public __get ( string $key ) : mixed
$key string
리턴 mixed

create() 공개 메소드

Creates a donation form
부터: 1.5
public create ( array $data = [] ) : mixed
$data array Array of attributes for a donation form.
리턴 mixed False if data isn't passed and class not instantiated for creation, or New Form ID.

decrease_earnings() 공개 메소드

Decrease the earnings by the given amount
부터: 1.0
public decrease_earnings ( integer $amount ) : float | false
$amount integer Amount of donation.
리턴 float | false

decrease_sales() 공개 메소드

Decrement the sale count by one
부터: 1.0
public decrease_sales ( integer $quantity = 1 ) : integer | false
$quantity integer The quantity to decrease by. Default is 1.
리턴 integer | false New number of total sales.

get_ID() 공개 메소드

Retrieve the ID
부터: 1.0
public get_ID ( ) : integer
리턴 integer Donation form ID.

get_earnings() 공개 메소드

Retrieve the total earnings for the form
부터: 1.0
public get_earnings ( ) : float
리턴 float Donation form total earnings.

get_form_classes() 공개 메소드

Provides the classes for the donation
html tag and filters for customization.
부터: 1.6
public get_form_classes ( $args ) : string
$args
리턴 string

get_form_wrap_classes() 공개 메소드

Provides the classes for the donation form div wrapper and filters for customization.
public get_form_wrap_classes ( $args ) : string
$args
리턴 string

get_goal() 공개 메소드

Retrieve the goal
부터: 1.0
public get_goal ( ) : float
리턴 float Goal.

get_minimum_price() 공개 메소드

Retrieve the minimum price.
부터: 1.3.6
public get_minimum_price ( ) : float
리턴 float Minimum price.

get_name() 공개 메소드

Retrieve the donation form name
부터: 1.5
public get_name ( ) : string
리턴 string Donation form name.

get_price() 공개 메소드

Retrieve the price
부터: 1.0
public get_price ( ) : float
리턴 float Price.

get_prices() 공개 메소드

Retrieve the variable prices
부터: 1.0
public get_prices ( ) : array
리턴 array Variable prices.

get_sales() 공개 메소드

Retrieve the sale count for the donation form
부터: 1.0
public get_sales ( ) : integer
리턴 integer Donation form sale count.

get_type() 공개 메소드

Retrieve the donation form type, set or multi-level
부터: 1.5
public get_type ( ) : string
리턴 string Type of donation form, either 'set' or 'multi'.

has_variable_prices() 공개 메소드

Determine if the donation form has variable prices enabled
부터: 1.0
public has_variable_prices ( ) : boolean
리턴 boolean

increase_earnings() 공개 메소드

Increase the earnings by the given amount
부터: 1.0
public increase_earnings ( integer $amount ) : float | false
$amount integer Amount of donation. Default is 0.
리턴 float | false

increase_sales() 공개 메소드

Increment the sale count by one
부터: 1.0
public increase_sales ( integer $quantity = 1 ) : integer | false
$quantity integer The quantity to increase the donations by. Default is 1.
리턴 integer | false New number of total sales.

is_close_donation_form() 공개 메소드

Form will be close if: a. form has fixed goal b. close form when goal achieved cmb2 setting is set to 'Yes' c. goal has been achieved
부터: 1.4.5
public is_close_donation_form ( ) : boolean
리턴 boolean

is_custom_price_mode() 공개 메소드

Determine if custom price mode is enabled or disabled
부터: 1.6
public is_custom_price_mode ( ) : boolean
리턴 boolean

is_free() 공개 메소드

Determine if the donation is free or if the given price ID is free
부터: 1.0
public is_free ( integer $price_id = false ) : boolean
$price_id integer Price ID. Default is false.
리턴 boolean

is_multi_type_donation_form() 공개 메소드

Get if form type set or not.
부터: 1.6
부터: 1.6
public is_multi_type_donation_form ( ) : boolean
리턴 boolean public function is_set_type_donation_form() { $form_type = $this->get_type(); return ( 'set' === $form_type ? true : false ); } Get if form type multi or not.

is_single_price_mode() 공개 메소드

Determine if single price mode is enabled or disabled
부터: 1.0
public is_single_price_mode ( ) : boolean
리턴 boolean

프로퍼티 상세

$ID 공개적으로 프로퍼티

The donation ID
부터: 1.0
public int $ID
리턴 integer

$comment_count 공개적으로 프로퍼티

The comment count
부터: 1.0
public int $comment_count
리턴 integer

$comment_status 공개적으로 프로퍼티

The comment status
부터: 1.0
public string $comment_status
리턴 string

$filter 공개적으로 프로퍼티

Filtered
부터: 1.0
public string $filter
리턴 string

$guid 공개적으로 프로퍼티

The post GUID
부터: 1.0
public string $guid
리턴 string

$menu_order 공개적으로 프로퍼티

The menu order
부터: 1.0
public int $menu_order
리턴 integer

$ping_status 공개적으로 프로퍼티

The ping status
부터: 1.0
public string $ping_status
리턴 string

$pinged 공개적으로 프로퍼티

Pinged
부터: 1.0
public string $pinged
리턴 string

$post_author 공개적으로 프로퍼티

The post author
부터: 1.0
public int $post_author
리턴 integer

$post_content 공개적으로 프로퍼티

The post content
부터: 1.0
public string $post_content
리턴 string

$post_content_filtered 공개적으로 프로퍼티

The post filtered content
부터: 1.0
public string $post_content_filtered
리턴 string

$post_date 공개적으로 프로퍼티

The post date
부터: 1.0
public string $post_date
리턴 string

$post_date_gmt 공개적으로 프로퍼티

The post GTM date
부터: 1.0
public string $post_date_gmt
리턴 string

$post_excerpt 공개적으로 프로퍼티

The post excerpt
부터: 1.0
public string $post_excerpt
리턴 string

$post_mime_type 공개적으로 프로퍼티

The mime type0
부터: 1.0
public string $post_mime_type
리턴 string

$post_modified 공개적으로 프로퍼티

The post modified date
부터: 1.0
public string $post_modified
리턴 string

$post_modified_gmt 공개적으로 프로퍼티

The post modified GTM date
부터: 1.0
public string $post_modified_gmt
리턴 string

$post_name 공개적으로 프로퍼티

The post name
부터: 1.0
public string $post_name
리턴 string

$post_parent 공개적으로 프로퍼티

The post parent
부터: 1.0
public int $post_parent
리턴 integer

$post_password 공개적으로 프로퍼티

The post password
부터: 1.0
public string $post_password
리턴 string

$post_status 공개적으로 프로퍼티

The post status
부터: 1.0
public string $post_status
리턴 string

$post_title 공개적으로 프로퍼티

The post title
부터: 1.0
public string $post_title
리턴 string

$to_ping 공개적으로 프로퍼티

Ping
부터: 1.0
public string $to_ping
리턴 string