PHP Класс SyndicatedLink, feedwordpress

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$id
$link
$magpie
$postmeta * SyndicatedLink::authentication_method ()
$settings
$simplepie

Открытые методы

Метод Описание
__construct ( $link )
authentication_method ( ) * SyndicatedLink::password ()
automatic_ttl ( ) * SyndicatedLink::ttl()
category_ids ( $post, array $cats, string $unfamiliar_category = 'create', array | null $taxonomies = NULL, $params = [] ) : array category_ids: look up (and create) category ids from a list of categories
deactivate ( ) * SyndicatedLink::set_uri ()
delete ( ) SyndicatedLink::delete() deletes a subscription from the WordPress links table. Any posts that were syndicated through that subscription will still be present in the wp_posts table; but postmeta fields that refer to the syndication feed's numeric id (which will no longer be valid) will be deleted. For most purposes, the posts remaining will be treated as if they were locally authored posts rather than syndicated posts.
fetch ( ) * SyndicatedLink::stale ()
flatten_array ( array $arr, string $prefix = 'feed/', string $separator = '/' ) : array SyndicatedLink::flatten_array (): flatten an array. Useful for hierarchical and namespaced elements.
found ( ) * SyndicatedLink::__construct ()
guid ( ) * SyndicatedLink::name ()
hardcode ( $what ) * SyndicatedLink::flatten_array ()
homepage ( $fromFeed = true ) * SyndicatedLink::property_cascade ()
id ( ) * SyndicatedLink::found ()
is_non_incremental ( ) * SyndicatedLink::update_setting ()
links ( $params = [] )
live_posts ( ) * SyndicatedLink::fetch ()
map_name_to_new_user ( $name, $newuser_name ) * SyndicatedLink::nuke ()
merge_settings ( $data, $prefix, $separator = '/' ) * SyndicatedLink::setting ()
name ( $fromFeed = true ) * SyndicatedLink::homepage ()
nuke ( ) SyndicatedLink::nuke() deletes a subscription AND all of the posts syndicated through that subscription.
password ( ) * SyndicatedLink::username ()
poll ( $crash_ts = NULL ) * SyndicatedLink::live_posts ()
postmeta ( $params = [] )
process_retirements ( $delta ) * SyndicatedLink::poll()
property_cascade ( $fromFeed, $link_field, $setting, $method ) * SyndicatedLink::postmeta ()
save_settings ( $reload = false ) * SyndicatedLink::settings_to_notes ()
set_uri ( string $url ) : boolean Updates the URL for the feed syndicated by this link.
setting ( string $name, mixed $fallback_global = NULL, mixed $fallback_value = NULL, $default = 'default' ) : boolean Retrieves the value of a setting, allowing for a global setting to be used as a fallback, or a constant value, or both.
stale ( )
syndicated_status ( $what, $default, $fallback = true ) * SyndicatedLink::hardcode ()
taxonomies ( ) * SyndicatedLink:syndicated_status ()
ttl ( $return_element = false )
update_setting ( $name, $value, $default = 'default' ) * SyndicatedLink::merge_settings ()
uri ( $params = [] ) * SyndicatedLink::is_non_incremental ()
username ( ) * SyndicatedLink::uri ()

Защищенные методы

Метод Описание
get_settings_from_notes ( ) * SyndicatedLink::imploded_settings ()
imploded_settings ( ) * SyndicatedLink::map_name_to_new_user ()
settings_to_notes ( ) * SyndicatedLink::get_settings_from_notes ()

Описание методов

__construct() публичный Метод

public __construct ( $link )

authentication_method() публичный Метод

* SyndicatedLink::password ()

automatic_ttl() публичный Метод

* SyndicatedLink::ttl()
public automatic_ttl ( )

category_ids() публичный Метод

category_ids: look up (and create) category ids from a list of categories
public category_ids ( $post, array $cats, string $unfamiliar_category = 'create', array | null $taxonomies = NULL, $params = [] ) : array
$cats array
$unfamiliar_category string
$taxonomies array | null
Результат array

deactivate() публичный Метод

* SyndicatedLink::set_uri ()
public deactivate ( )

delete() публичный Метод

SyndicatedLink::delete() deletes a subscription from the WordPress links table. Any posts that were syndicated through that subscription will still be present in the wp_posts table; but postmeta fields that refer to the syndication feed's numeric id (which will no longer be valid) will be deleted. For most purposes, the posts remaining will be treated as if they were locally authored posts rather than syndicated posts.
public delete ( )

fetch() публичный Метод

* SyndicatedLink::stale ()
public fetch ( )

flatten_array() публичный Метод

Given an array which may contain array or object elements in it, return a "flattened" array: a one-dimensional array of scalars containing each of the scalar elements contained within the array structure. Thus, for example, if $a['b']['c']['d'] == 'e', then the returned array for FeedWordPress::flatten_array($a) will contain a key $a['feed/b/c/d'] with value 'e'.
public flatten_array ( array $arr, string $prefix = 'feed/', string $separator = '/' ) : array
$arr array
$prefix string
$separator string
Результат array

found() публичный Метод

* SyndicatedLink::__construct ()
public found ( )

get_settings_from_notes() защищенный Метод

* SyndicatedLink::imploded_settings ()
protected get_settings_from_notes ( )

guid() публичный Метод

* SyndicatedLink::name ()
public guid ( )

hardcode() публичный Метод

* SyndicatedLink::flatten_array ()
public hardcode ( $what )

homepage() публичный Метод

* SyndicatedLink::property_cascade ()
public homepage ( $fromFeed = true )

id() публичный Метод

* SyndicatedLink::found ()
public id ( )

imploded_settings() защищенный Метод

* SyndicatedLink::map_name_to_new_user ()
protected imploded_settings ( )

is_non_incremental() публичный Метод

* SyndicatedLink::update_setting ()
public is_non_incremental ( )

live_posts() публичный Метод

* SyndicatedLink::fetch ()
public live_posts ( )

map_name_to_new_user() публичный Метод

* SyndicatedLink::nuke ()
public map_name_to_new_user ( $name, $newuser_name )

merge_settings() публичный Метод

* SyndicatedLink::setting ()
public merge_settings ( $data, $prefix, $separator = '/' )

name() публичный Метод

* SyndicatedLink::homepage ()
public name ( $fromFeed = true )

nuke() публичный Метод

SyndicatedLink::nuke() deletes a subscription AND all of the posts syndicated through that subscription.
public nuke ( )

password() публичный Метод

* SyndicatedLink::username ()
public password ( )

poll() публичный Метод

* SyndicatedLink::live_posts ()
public poll ( $crash_ts = NULL )

postmeta() публичный Метод

public postmeta ( $params = [] )

process_retirements() публичный Метод

* SyndicatedLink::poll()
public process_retirements ( $delta )

property_cascade() публичный Метод

* SyndicatedLink::postmeta ()
public property_cascade ( $fromFeed, $link_field, $setting, $method )

save_settings() публичный Метод

* SyndicatedLink::settings_to_notes ()
public save_settings ( $reload = false )

set_uri() публичный Метод

Updates the URL for the feed syndicated by this link.
public set_uri ( string $url ) : boolean
$url string The new feed URL to use for this source.
Результат boolean TRUE on success, FALSE on failure.

setting() публичный Метод

Retrieves the value of a setting, allowing for a global setting to be used as a fallback, or a constant value, or both.
public setting ( string $name, mixed $fallback_global = NULL, mixed $fallback_value = NULL, $default = 'default' ) : boolean
$name string The link setting key
$fallback_global mixed If the link setting is nonexistent or marked as a use-default value, fall back to the value of this global setting.
$fallback_value mixed If the link setting and the global setting are nonexistent or marked as a use-default value, fall back to this constant value.
Результат boolean TRUE on success, FALSE on failure.

settings_to_notes() защищенный Метод

* SyndicatedLink::get_settings_from_notes ()
protected settings_to_notes ( )

stale() публичный Метод

public stale ( )

syndicated_status() публичный Метод

* SyndicatedLink::hardcode ()
public syndicated_status ( $what, $default, $fallback = true )

taxonomies() публичный Метод

* SyndicatedLink:syndicated_status ()
public taxonomies ( )

ttl() публичный Метод

public ttl ( $return_element = false )

update_setting() публичный Метод

* SyndicatedLink::merge_settings ()
public update_setting ( $name, $value, $default = 'default' )

uri() публичный Метод

* SyndicatedLink::is_non_incremental ()
public uri ( $params = [] )

username() публичный Метод

* SyndicatedLink::uri ()
public username ( )

Описание свойств

$id публичное свойство

public $id

$magpie публичное свойство

public $magpie

$postmeta публичное свойство

* SyndicatedLink::authentication_method ()
public $postmeta

$settings публичное свойство

public $settings

$simplepie публичное свойство

public $simplepie