PHP 클래스 Yoast_Product

파일 보기 프로젝트 열기: yoast/license-manager 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$api_url The URL of the shop running the EDD API.
$author The item author
$extension_url URL referring to the extension page
$file Relative file path to the plugin.
$item_name The item name in the EDD shop.
$item_url The absolute url on which users can purchase a license
$license_page_url Absolute admin URL on which users can enter their license key.
$product_id Product ID in backend system for quick lookup
$slug The theme slug or plugin file
$text_domain The text domain used for translating strings
$version The version number of the item

공개 메소드들

메소드 설명
__construct ( string $api_url, string $item_name, string $slug, string $version, string $item_url = '', string $license_page_url = '#', string $text_domain = 'yoast', string $author = 'Yoast', string $file = '', integer $product_id ) Yoast_Product constructor.
get_api_url ( ) : string
get_author ( ) : string
get_extension_url ( string $link_identifier = '' ) : string Returns the extension url if set, otherwise it will be the tracking url.
get_file ( ) : string Returns the file path relative to the plugins folder
get_item_name ( ) : string
get_item_url ( ) : string
get_license_page_url ( ) : string
get_product_id ( ) : integer Return the Product ID
get_slug ( ) : string
get_text_domain ( ) : string
get_tracking_url ( string $link_identifier = '' ) : string Gets a Google Analytics Campaign url for this product
get_transient_prefix ( ) : string Returns the dirname of the slug and limits it to 15 chars
get_version ( ) : string
set_api_url ( string $api_url )
set_author ( string $author )
set_extension_url ( string $extension_url ) Sets the extension url.
set_file ( string $file ) Sets the file path relative to the plugins folder
set_item_name ( string $item_name )
set_item_url ( string $item_url )
set_license_page_url ( string $license_page_url )
set_product_id ( integer $product_id ) Set the product ID
set_slug ( string $slug )
set_text_domain ( string $text_domain )
set_version ( string $version )

비공개 메소드들

메소드 설명
add_campaign_attributes ( $url, $link_identifier )

메소드 상세

__construct() 공개 메소드

Yoast_Product constructor.
public __construct ( string $api_url, string $item_name, string $slug, string $version, string $item_url = '', string $license_page_url = '#', string $text_domain = 'yoast', string $author = 'Yoast', string $file = '', integer $product_id )
$api_url string The URL of the shop running the EDD API.
$item_name string The item name in the EDD shop.
$slug string The slug of the plugin, for shiny updates this needs to be a valid HTML id.
$version string The version number of the item.
$item_url string The absolute url on which users can purchase a license.
$license_page_url string Absolute admin URL on which users can enter their license key.
$text_domain string The text domain used for translating strings.
$author string The item author.
$file string The relative file path to the plugin.
$product_id integer The ID of the product in the backend system.

get_api_url() 공개 메소드

public get_api_url ( ) : string
리턴 string

get_author() 공개 메소드

public get_author ( ) : string
리턴 string

get_extension_url() 공개 메소드

Returns the extension url if set, otherwise it will be the tracking url.
public get_extension_url ( string $link_identifier = '' ) : string
$link_identifier string
리턴 string

get_file() 공개 메소드

Returns the file path relative to the plugins folder
public get_file ( ) : string
리턴 string

get_item_name() 공개 메소드

public get_item_name ( ) : string
리턴 string

get_item_url() 공개 메소드

public get_item_url ( ) : string
리턴 string

get_license_page_url() 공개 메소드

public get_license_page_url ( ) : string
리턴 string

get_product_id() 공개 메소드

Return the Product ID
public get_product_id ( ) : integer
리턴 integer

get_slug() 공개 메소드

public get_slug ( ) : string
리턴 string

get_text_domain() 공개 메소드

public get_text_domain ( ) : string
리턴 string

get_tracking_url() 공개 메소드

Gets a Google Analytics Campaign url for this product
public get_tracking_url ( string $link_identifier = '' ) : string
$link_identifier string
리턴 string The full URL

get_transient_prefix() 공개 메소드

Returns the dirname of the slug and limits it to 15 chars
public get_transient_prefix ( ) : string
리턴 string

get_version() 공개 메소드

public get_version ( ) : string
리턴 string

set_api_url() 공개 메소드

public set_api_url ( string $api_url )
$api_url string

set_author() 공개 메소드

public set_author ( string $author )
$author string

set_extension_url() 공개 메소드

Sets the extension url.
public set_extension_url ( string $extension_url )
$extension_url string

set_file() 공개 메소드

Sets the file path relative to the plugins folder
public set_file ( string $file )
$file string Relative file path to the plugin.

set_item_name() 공개 메소드

public set_item_name ( string $item_name )
$item_name string

set_item_url() 공개 메소드

public set_item_url ( string $item_url )
$item_url string

set_license_page_url() 공개 메소드

public set_license_page_url ( string $license_page_url )
$license_page_url string

set_product_id() 공개 메소드

Set the product ID
public set_product_id ( integer $product_id )
$product_id integer Product ID to set.

set_slug() 공개 메소드

public set_slug ( string $slug )
$slug string

set_text_domain() 공개 메소드

public set_text_domain ( string $text_domain )
$text_domain string

set_version() 공개 메소드

public set_version ( string $version )
$version string

프로퍼티 상세

$api_url 보호되어 있는 프로퍼티

The URL of the shop running the EDD API.
protected $api_url

$author 보호되어 있는 프로퍼티

The item author
protected $author

$extension_url 보호되어 있는 프로퍼티

URL referring to the extension page
protected $extension_url

$file 보호되어 있는 프로퍼티

Relative file path to the plugin.
protected $file

$item_name 보호되어 있는 프로퍼티

The item name in the EDD shop.
protected $item_name

$item_url 보호되어 있는 프로퍼티

The absolute url on which users can purchase a license
protected $item_url

$license_page_url 보호되어 있는 프로퍼티

Absolute admin URL on which users can enter their license key.
protected $license_page_url

$product_id 보호되어 있는 프로퍼티

Product ID in backend system for quick lookup
protected $product_id

$slug 보호되어 있는 프로퍼티

The theme slug or plugin file
protected $slug

$text_domain 보호되어 있는 프로퍼티

The text domain used for translating strings
protected $text_domain

$version 보호되어 있는 프로퍼티

The version number of the item
protected $version