PHP Class SyndicatedLink, feedwordpress

显示文件 Open project: radgeek/feedwordpress Class Usage Examples

Public Properties

Property Type Description
$id
$link
$magpie
$postmeta * SyndicatedLink::authentication_method ()
$settings
$simplepie

Public Methods

Method Description
__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 ()

Protected Methods

Method Description
get_settings_from_notes ( ) * SyndicatedLink::imploded_settings ()
imploded_settings ( ) * SyndicatedLink::map_name_to_new_user ()
settings_to_notes ( ) * SyndicatedLink::get_settings_from_notes ()

Method Details

__construct() public method

public __construct ( $link )

authentication_method() public method

* SyndicatedLink::password ()

automatic_ttl() public method

* SyndicatedLink::ttl()
public automatic_ttl ( )

category_ids() public method

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
return array

deactivate() public method

* SyndicatedLink::set_uri ()
public deactivate ( )

delete() public method

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() public method

* SyndicatedLink::stale ()
public fetch ( )

flatten_array() public method

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
return array

found() public method

* SyndicatedLink::__construct ()
public found ( )

get_settings_from_notes() protected method

* SyndicatedLink::imploded_settings ()
protected get_settings_from_notes ( )

guid() public method

* SyndicatedLink::name ()
public guid ( )

hardcode() public method

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

homepage() public method

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

id() public method

* SyndicatedLink::found ()
public id ( )

imploded_settings() protected method

* SyndicatedLink::map_name_to_new_user ()
protected imploded_settings ( )

is_non_incremental() public method

* SyndicatedLink::update_setting ()
public is_non_incremental ( )

live_posts() public method

* SyndicatedLink::fetch ()
public live_posts ( )

map_name_to_new_user() public method

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

merge_settings() public method

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

name() public method

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

nuke() public method

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

password() public method

* SyndicatedLink::username ()
public password ( )

poll() public method

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

postmeta() public method

public postmeta ( $params = [] )

process_retirements() public method

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

property_cascade() public method

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

save_settings() public method

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

set_uri() public method

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.
return boolean TRUE on success, FALSE on failure.

setting() public method

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.
return boolean TRUE on success, FALSE on failure.

settings_to_notes() protected method

* SyndicatedLink::get_settings_from_notes ()
protected settings_to_notes ( )

stale() public method

public stale ( )

syndicated_status() public method

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

taxonomies() public method

* SyndicatedLink:syndicated_status ()
public taxonomies ( )

ttl() public method

public ttl ( $return_element = false )

update_setting() public method

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

uri() public method

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

username() public method

* SyndicatedLink::uri ()
public username ( )

Property Details

$id public_oe property

public $id

$magpie public_oe property

public $magpie

$postmeta public_oe property

* SyndicatedLink::authentication_method ()
public $postmeta

$settings public_oe property

public $settings

$simplepie public_oe property

public $simplepie