Properties

$version

$version

$hold_expires_in_secs

$hold_expires_in_secs

$image_sizes

$image_sizes

$views_path

$views_path

$hash

$hash

Methods

response()

response()

Callback to output a server response hooked into template_redirect. For any URL add "?type=json" to return a JSON object instead of standard HTML.

loop()

loop() : array

Prepares items to have all available information retrieved and accessible for templating. Returns an array of associative arrays that is later available as a JSON object.

Returns

array —
  • id integer The post ID.
  • title string The title of the item.
  • type string The type of item such as 'post' or 'fineart'.
  • permalink string The URL to the item.
  • body string The body text of the item if available.
  • date string The datetime of the item in MySQL datetime format.
  • attachments array Available images for the item.
  • pretty_date string The date in human friendly format.
  • pubdate string The date for feeds.
  • author string The name of the author.
  • excerpt string The excerpt for the item.
  • guid string The globally unique identifier for the item.
  • permalink_next string The permalink for the next item.
  • permalink_previous string The Permalink for the previous item.
  • license array The copyright license for the item as associative array.
    • rights array An array of the individual rights such as 'by', 'sa', 'nc', and 'nd'.
    • author string The author's name.
    • author_url string The url of the author's website to attribute.
    • url string The url of the license.
    • jurisdiction string The jurisdiction of the license.
    • title string The title of the license.
  • downloads array The downloads available for the item
    • 'name'
    • 'format'
    • 'size'
    • 'url'
  • attributions array The references and attributions for the item.
    • 'html'
  • details array The dimentional details of the item.
    • 'width'
    • 'height'
    • 'depth'
    • 'description'
  • options array The available options to purchase the item.
    • 'name'
    • 'printing-cost'
    • 'framing-cost'
    • 'production-cost'
    • 'artist-fee'
    • 'weight'
    • 'width'
    • 'height'
    • 'length'
    • 'ondemand'
    • 'quantity'
    • 'available'

post_uri()

post_uri(object $post, boolean $leavename) : string

Gets the permalink for a post.

Parameters

object $post

The post object.

boolean $leavename

Weither or not leave the slug name.

Returns

string —

The permalink for the post.

display()

display(string $path, array $namespace) : 

Includes template from template directory with variables extracted.

Parameters

string $path

Relative path from templates directory.

array $namespace

An associative array of variables for the template.

Returns

static_url()

static_url(string $url) : string

Returns the full URL to the static directory.

Parameters

string $url

Relative URL to static resource.

Returns

string

hash()

hash()

Callback to get the value of the hash from the posts set cookie.

reset_cookie()

reset_cookie()

Callback to reset the cookie for the posts sets.

set_cookie()

set_cookie()

Callback to set the cookie for the posts sets.

scheduled_intervals()

scheduled_intervals(array $schedules) : array

Adds cron intervals to available schedules.

Parameters

array $schedules

Existing schedules array

Returns

array

activate_cron()

activate_cron()

Callback to activate cron schedules

deactivate_cron()

deactivate_cron()

Callback to deactivate cron schedules

update_order_statuses()

update_order_statuses()

Callback to update the status of all post sets on hold.

bitcoin_rates_cron()

bitcoin_rates_cron()

Callback to update bitcoin exchange rates

generate_metadata()

generate_metadata( $meta)

Callback to generate imaginary metadata for images since they will be generate on-the-fly.

Parameters

$meta

image_sizes_advanced()

image_sizes_advanced( $sizes)

Callback to store intermediate image sizes.

Parameters

$sizes

ajax_excerpt_more()

ajax_excerpt_more()

Callback to change excerpt more text.

ajax_excerpt_length()

ajax_excerpt_length()

Callback to change excerpt more length.

initialize()

initialize()

Callback to initialize settings and add callbacks into hooks

flush_rules()

flush_rules()

Callback to flush the rewrite rules.

parse_request()

parse_request( $request)

Callback to parse the request hooked into parse_request

Parameters

$request

parse_query()

parse_query( $query)

Callback to parse the query hooked into parse_query

Parameters

$query

add_query_vars()

add_query_vars( $query_vars)

Callback to add query variables hooked into query_vars

Parameters

$query_vars

generate_rewrite_rules()

generate_rewrite_rules()

Callback to generate rewrite rules hooked into generate_rewrite_rules

page_uri_filter()

page_uri_filter(string $permalink, object $post, object $leavename) : string

Callback to return the uri for pages hooked into page_link

Parameters

string $permalink

The existing permalink.

object $post

The post object.

object $leavename

Weither or not to leave the slug name.

Returns

string —

Permalink for the page.

post_uri_filter()

post_uri_filter(string $permalink, object $post, object $leavename) : string

Callback to return the uri for posts hooked into post_link and post_type_link

Parameters

string $permalink

The existing permalink.

object $post

The post object.

object $leavename

Weither or not to leave the slug name.

Returns

string —

Permalink for the post.