Метод |
Описание |
|
__construct ( array $item, SyndicatedLink &$source ) |
SyndicatedPost constructor: Given a feed item and the source from
which it was taken, prepare a post that can be inserted into the
WordPress database on request, or updated in place if it has already
been syndicated. |
|
add_rss_meta ( string $new_status, string $old_status, object $post ) |
SyndicatedPost::add_rss_meta: adds interesting meta-data to each entry
using the space for custom keys. The set of keys and values to add is
specified by the keys and values of $post['meta']. This is used to
store anything that the WordPress user might want to access from a
template concerning the post's original source that isn't provided
for by standard WP meta-data (i.e., any interesting data about the
syndicated post other than author, title, timestamp, categories, and
guid). It's also used to hook into WordPress's support for
enclosures. |
|
add_terms ( string $new_status, string $old_status, object $post ) |
SyndicatedPost::add_terms() -- if FeedWordPress is processing an
automatic update, that generally means that wp_insert_post() is being
called under the user credentials of whoever is viewing the blog at
the time -- which usually means no user at all. But wp_insert_post()
checks current_user_can() before assigning any of the terms in a
post's tax_input structure -- which is unfortunate, since
current_user_can() always returns FALSE when there is no current user
logged in. Meaning that automatic updates get no terms assigned. |
|
author ( ) |
* SyndicatedPost::guid() |
|
author_id ( string $unfamiliar_author = 'create' ) : null | integer |
SyndicatedPost::author_id (): get the ID for an author name from
the feed. Create the author if necessary. |
|
category_ids ( 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 |
|
comment_feed ( ) |
|
|
comment_link ( ) |
|
|
content ( $params = [] ) |
* SyndicatedPost::title () |
|
created ( $params = [] ) |
|
|
db_sanitize_post ( $out ) |
* SyndicatedPost::db_sanitize_post_check_encoding () |
|
db_sanitize_post_check_encoding ( $out ) |
|
|
enclosures ( string $type = '/.*/' ) : array |
SyndicatedPost::enclosures: returns an array with any enclosures
that may be attached to this syndicated item. |
|
excerpt ( ) |
* SyndicatedPost::content() |
|
filtered ( ) : boolean |
SyndicatedPost::filtered: check whether or not this post has been
screened out by a registered filter. |
|
fix_post_modified_ts ( string $new_status, string $old_status, object $post ) |
SyndicatedPost::fix_post_modified_ts() -- We would like to set
post_modified and post_modified_gmt to reflect the value of
or equivalent elements on the feed. Unfortunately,
wp_insert_post() refuses to acknowledge explicitly-set post_modified
fields and overwrites them, either with the post_date (if new) or the
current timestamp (if updated). |
|
fix_revision_meta ( integer $revision_id ) |
SyndicatedPost::fix_revision_meta() - Ensures that we get the meta
data (authorship, guid, etc.) that we want when storing revisions of
a syndicated post. |
|
fresh_content_is_update ( ) |
* SyndicatedPost::this_revision_is_current () |
|
fresh_storage_diagnostic ( ) |
* SyndicatedPost::fresh_content_is_update () |
|
fresh_storage_hook ( ) |
* SyndicatedPost::fresh_storage_diagnostic() |
|
freshness ( $format = 'number' ) : integer |
SyndicatedPost::freshness: check whether post is a new post to be
inserted, a previously syndicated post that needs to be updated to
match the latest revision, or a previously syndicated post that is
still up-to-date. |
|
get_categories ( $params = [] ) |
* SyndicatedPost::get_feed_channel_elements() |
|
get_feed_channel_elements ( ) |
* SyndicatedPost::get_feed_root_element() |
|
get_feed_root_element ( ) |
* SyndicatedPost::query() |
|
get_terms_from_feeds ( ) : array |
SyndicatedPost::get_terms_from_feeds(): Return an array of terms to associate with the incoming
post based on the contents of the subscribed feed (atom:category and rss:category elements, dc:subject
elements, tags embedded using microformats in the post content, etc.) |
|
get_terms_from_settings ( ) : array |
SyndicatedPost::get_terms_from_settings(): Return an array of terms to associate with the incoming
post based on the Categories, Tags, and other terms associated with each new post by the user's
settings (global and feed-specific). |
|
guid ( ) |
* SyndicatedPost::normalize_guid() |
|
has_fresh_content ( ) |
* SyndicatedPost::freshness () |
|
inline_tags ( ) : array |
SyndicatedPost::inline_tags: Return a list of all the tags embedded
in post content using the a[@rel="tag"] microformat. |
|
insert_new ( ) |
* function SyndicatedPost::insert_post () |
|
insert_post ( $update = false, $freshness = 2 ) |
* function SyndicatedPost::store () |
|
isTaggedAs ( string $tag ) : boolean |
SyndicatedPost::isTaggedAs: Test whether a feed item is
tagged / categorized with a given string. Case and leading and
trailing whitespace are ignored. |
|
normalize_guid ( $guid ) |
|
|
normalize_guid_prefix ( ) |
* SyndicatedPost::update_hash() |
|
normalize_post ( boolean $new = true ) : array |
SyndicatedPost::normalize_post() |
|
permalink ( ) |
* SyndicatedPost::excerpt() |
|
published ( $params = [], $default = NULL ) |
* SyndicatedPost::created() |
|
query ( string $path ) |
SyndicatedPost::query uses an XPath-like syntax to query arbitrary
elements within the syndicated item. |
|
resolve_relative_uris ( $content, $obj ) |
* function SyndicatedPost::resolve_single_relative_uri() |
|
resolve_single_relative_uri ( $refs ) |
|
|
sanitize_content ( $content, $obj ) |
|
|
source ( $what = NULL ) |
* SyndicatedPost::enclosures() |
|
store ( ) |
|
|
stored_hashes ( $id = NULL ) |
|
|
strip_attribute_from_tag ( $refs ) |
|
|
substitution_function ( $name ) |
##################################### |
|
this_revision_is_current ( $freshness = NULL ) |
|
|
this_revision_needs_original_post ( $freshness = NULL ) |
* SyndicatedPost::has_fresh_content () |
|
title ( $params = [] ) |
|
|
update_existing ( ) |
* SyndicatedPost::insert_new() |
|
update_hash ( $hashed = true ) |
|
|
updated ( $params = [], $default ) |
* SyndicatedPost::published() |
|
validate_post_id ( array $dbpost, $is_update, mixed $ns ) |
SyndicatedPost::validate_post_id() |
|
wp_id ( ) |
################################################# |
|