PHP Class The_SEO_Framework\Sitemaps

Handles sitemap output.
Since: 2.7.1
Inheritance: extends Metaboxes
显示文件 Open project: sybrew/the-seo-framework

Protected Properties

Property Type Description
$doing_sitemap Checks if sitemap is being output.
$max_posts Maximum number of posts that show up in the sitemap.xml page.
$pretty_permalinks Checks for pretty permalinks.

Public Methods

Method Description
can_run_sitemap ( ) : boolean Whether we can output sitemap or not based on options.
enqueue_rewrite_activate ( boolean $enqueue = false ) : boolean Enqueue rewrite flush for activation.
enqueue_rewrite_deactivate ( boolean $enqueue = false ) : boolean Enqueue rewrite flush for deactivation.
enqueue_rewrite_flush_other ( boolean $enqueue = false ) : boolean Enqueue rewrite flush for deactivation.
enqueue_sitemap_query_vars ( $vars ) Register the_seo_framework_sitemap to wp_query
flush_rewrite_rules ( ) Initialize and flush rewrite rules.
flush_rewrite_rules_activation ( ) Add and Flush rewrite rules on plugin settings change.
flush_rewrite_rules_deactivation ( ) Flush rewrite rules on settings change.
maybe_flush_rewrite ( ) Flush rewrite rules based on static variables.
maybe_output_sitemap ( ) : void | header+string Maybe Output sitemap.xml 'file' and header.
ping_bing ( ) Ping Bing
ping_google ( ) Ping Google
ping_searchengines ( ) Ping search engines on post publish.
ping_yandex ( ) Ping Yandex
rewrite_rule_sitemap ( $run = false ) Adds rewrite rule to WordPress This rule defines the sitemap.xml output
robots_txt ( $robots_txt = '', $public = '' ) Edits the robots.txt output
setup_sitemap ( $sitemap_content ) : string Create sitemap.xml content transient.

Protected Methods

Method Description
__construct ( ) Constructor, load parent constructor and set up caches.
clean_up_globals ( boolean $get_freed_memory = false ) : integer Destroy unused $GLOBALS.
generate_sitemap ( ) : string Generate sitemap.xml content.
get_sitemap_content ( ) : string Output sitemap.xml content from transient.
output_sitemap ( ) Output sitemap.xml 'file' and header.

Method Details

__construct() protected method

Constructor, load parent constructor and set up caches.
protected __construct ( )

can_run_sitemap() public method

Whether we can output sitemap or not based on options.
Since: 2.6.0
public can_run_sitemap ( ) : boolean
return boolean

clean_up_globals() protected method

Destroy unused $GLOBALS.
Since: 2.6.0
protected clean_up_globals ( boolean $get_freed_memory = false ) : integer
$get_freed_memory boolean Whether to return the freed memory in bytes.
return integer $freed_memory

enqueue_rewrite_activate() public method

Enqueue rewrite flush for activation.
Since: 2.3.0
public enqueue_rewrite_activate ( boolean $enqueue = false ) : boolean
$enqueue boolean Whether to enqueue the flush or return its state.
return boolean Whether to flush.

enqueue_rewrite_deactivate() public method

Enqueue rewrite flush for deactivation.
Since: 2.3.0
public enqueue_rewrite_deactivate ( boolean $enqueue = false ) : boolean
$enqueue boolean Whether to enqueue the flush or return its state.
return boolean Whether to flush.

enqueue_rewrite_flush_other() public method

Enqueue rewrite flush for deactivation.
Since: 2.6.0
public enqueue_rewrite_flush_other ( boolean $enqueue = false ) : boolean
$enqueue boolean Whether to enqueue the flush or return its state.
return boolean Whether to flush.

enqueue_sitemap_query_vars() public method

Register the_seo_framework_sitemap to wp_query
Since: 2.2.9
public enqueue_sitemap_query_vars ( $vars )

flush_rewrite_rules() public method

Initialize and flush rewrite rules.
Since: 2.6.0
public flush_rewrite_rules ( )

flush_rewrite_rules_activation() public method

Add and Flush rewrite rules on plugin settings change.
Since: 2.6.6.1

flush_rewrite_rules_deactivation() public method

Flush rewrite rules on settings change.
Since: 2.6.6.1

generate_sitemap() protected method

Generate sitemap.xml content.
Since: 2.2.9
protected generate_sitemap ( ) : string
return string The sitemap content.

get_sitemap_content() protected method

Output sitemap.xml content from transient.
Since: 2.2.9
protected get_sitemap_content ( ) : string
return string Sitemap XML contents.

maybe_flush_rewrite() public method

Flush rewrite rules based on static variables.
Since: 2.3.0
public maybe_flush_rewrite ( )

maybe_output_sitemap() public method

Maybe Output sitemap.xml 'file' and header.
Since: 2.2.9
public maybe_output_sitemap ( ) : void | header+string
return void | header+string

output_sitemap() protected method

Output sitemap.xml 'file' and header.
Since: 2.2.9
protected output_sitemap ( )

ping_bing() public method

Ping Bing
Since: 2.2.9
public ping_bing ( )

ping_google() public method

Ping Google
Since: 2.2.9
public ping_google ( )

ping_searchengines() public method

Ping search engines on post publish.
Since: 2.2.9
public ping_searchengines ( )

ping_yandex() public method

Ping Yandex
Since: 2.6.0
public ping_yandex ( )

rewrite_rule_sitemap() public method

Adds rewrite rule to WordPress This rule defines the sitemap.xml output
Since: 2.2.9
public rewrite_rule_sitemap ( $run = false )

robots_txt() public method

Requires not to have a robots.txt file in the root directory
Since: 2.2.9
public robots_txt ( $robots_txt = '', $public = '' )

setup_sitemap() public method

Create sitemap.xml content transient.
Since: 2.6.0
public setup_sitemap ( $sitemap_content ) : string
return string The sitemap content.

Property Details

$doing_sitemap protected_oe property

Checks if sitemap is being output.
Since: 2.5.2
protected $doing_sitemap

$max_posts protected_oe property

Maximum number of posts that show up in the sitemap.xml page.
Since: 2.2.9
protected $max_posts