Свойство | Тип | Описание | |
---|---|---|---|
$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 ) |
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. |
public get_extension_url ( string $link_identifier = '' ) : string | ||
$link_identifier | string | |
Результат | string |
public get_product_id ( ) : integer | ||
Результат | integer |
public get_tracking_url ( string $link_identifier = '' ) : string | ||
$link_identifier | string | |
Результат | string | The full URL |
public get_transient_prefix ( ) : string | ||
Результат | string |
public set_extension_url ( string $extension_url ) | ||
$extension_url | string |
public set_license_page_url ( string $license_page_url ) | ||
$license_page_url | string |
public set_product_id ( integer $product_id ) | ||
$product_id | integer | Product ID to set. |
public set_text_domain ( string $text_domain ) | ||
$text_domain | string |
protected $item_url |
protected $license_page_url |
protected $text_domain |