Overview

Namespaces

  • None
  • PHP

Classes

  • Sidecar
  • Sidecar_Admin_Page
  • Sidecar_Admin_Tab
  • Sidecar_Field
  • Sidecar_Form
  • Sidecar_Form_Settings
  • Sidecar_Plugin_Base
  • Sidecar_Plugin_Settings
  • Sidecar_Settings_Base
  • Sidecar_Shortcode
  • Sidecar_Singleton_Base

Functions

  • body
  • format_gmt_string
  • headers
  • output_css
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo
  • Download

Class Sidecar_Shortcode

Located at classes/class-shortcode.php
Methods summary
public
# __construct( mixed $shortcode_name, array $args = array() )

Parameters

$shortcode_name
mixed
$shortcode_name
$args
array
$args
public null|string
# do_shortcode( array $attributes, string $content = null )

Parameters

$attributes
array
$attributes
$content
string
$content

Returns

null|string
public
# add_the_content_filter( )

This allows Sidecar_Plugin_Base to add a hook for this shortcode to monitor the content for shortcodes.

This allows Sidecar_Plugin_Base to add a hook for this shortcode to monitor the content for shortcodes.

public string
# the_content( string $content )

Parameters

$content
string
$content

Returns

string
public
# add_attribute( mixed $attribute_name, mixed $args )

Parameters

$attribute_name
mixed
$attribute_name
$args
mixed
$args
public array
# get_attributes( )

Returns

array
public array
# has_attribute( string $attribute_name )

Parameters

$attribute_name
string
$attribute_name

Returns

array
public boolean
# get_maybe_has_shortcode( integer $post_id )

Test to see if a given post needs externals by checking to see if shortcode was ever run.

Test to see if a given post needs externals by checking to see if shortcode was ever run.

Parameters

$post_id
integer
$post_id

Returns

boolean
public
# delete_has_shortcode( integer $post_id )

Remove the has shortcode flag. Used by Sidecar_Plugin_Base to clear on a Post Save.

Remove the has shortcode flag. Used by Sidecar_Plugin_Base to clear on a Post Save.

Parameters

$post_id
integer
$post_id
public boolean
# update_has_shortcode( integer $post_id, boolean $has_shortcodes )

Test to see if a given post has this shortcode.

Test to see if a given post has this shortcode.

Parameters

$post_id
integer
$post_id
$has_shortcodes
boolean
$has_shortcodes

Returns

boolean
Properties summary
public Sidecar_Plugin_Base $plugin
#
public string $shortcode_name
#
protected array $_attributes array()
#
public boolean $initialized false
#
public string $used 'no'
#

'yes'/'no' vs. true/false as get_post_meta() returns '' for false and not found.

'yes'/'no' vs. true/false as get_post_meta() returns '' for false and not found.

API documentation generated by ApiGen 2.8.0