Skip to content
This repository has been archived by the owner on Aug 5, 2022. It is now read-only.

MDG_Vcard_Widget

Dan Holloran edited this page Mar 11, 2014 · 1 revision

MDG_Vcard_Widget

Example vCard widget

  • Class name: MDG_Vcard_Widget
  • Namespace:
  • Parent class: WP_Widget

Properties

$fields

private array $fields = array('title' => 'Title (optional)', 'street_address' => 'Street Address', 'locality' => 'City/Locality', 'region' => 'State/Region', 'postal_code' => 'Zipcode/Postal Code', 'tel' => 'Telephone', 'email' => 'Email')

The widgets administrator form fields.

  • Visibility: private

Methods

\MDG_Vcard_Widget::__construct()

mixed MDG_Vcard_Widget::\MDG_Vcard_Widget::__construct()()

Class constructor.

  • Visibility: public

\MDG_Vcard_Widget::widget()

Void MDG_Vcard_Widget::\MDG_Vcard_Widget::widget()(array $args, array $instance)

Handles outputting the widget on the front end.

  • Visibility: public

Arguments

  • $args array - <p>The widgets configuration arguments.</p>
  • $instance array - <p>The widgets content.</p>

\MDG_Vcard_Widget::update()

array MDG_Vcard_Widget::\MDG_Vcard_Widget::update()(array $new_instance, array $old_instance)

Handles setting/updating the widget options.

  • Visibility: public

Arguments

  • $new_instance array - <p>The new widget options.</p>
  • $old_instance array - <p>The previous widget options.</p>

\MDG_Vcard_Widget::flush_widget_cache()

Void MDG_Vcard_Widget::\MDG_Vcard_Widget::flush_widget_cache()()

Flushes the widgets cache.

  • Visibility: public

\MDG_Vcard_Widget::form()

Void MDG_Vcard_Widget::\MDG_Vcard_Widget::form()(array $instance)

Ouputs the options form on admin.

  • Visibility: public

Arguments

  • $instance array - <p>The widget options</p>

MDG_Sidebar

Determines whether or not to display the sidebar based on an array of conditional tags or page templates.

If any of the is_* conditional tags or is_page_template(template_file) checks return true, the sidebar will NOT be displayed.

  • Class name: MDG_Sidebar
  • Namespace:

Properties

$conditionals

private array $conditionals

WordPress conditional tags to check against.

  • Visibility: private

$templates

private array $templates

Page template checks (via is_page_template())

  • Visibility: private

$display

public boolean $display = true

If the sidebar should be displayed.

  • Visibility: public

Methods

\MDG_Sidebar::__construct()

mixed MDG_Sidebar::\MDG_Sidebar::__construct()(array $conditionals, array $templates)

Class constructor.

  • Visibility: public

Arguments

  • $conditionals array - <p>WordPress conditional tags to check against.</p>
  • $templates array - <p>Page template checks (via is_page_template())</p>

\MDG_Sidebar::check_conditional_tag()

boolean MDG_Sidebar::\MDG_Sidebar::check_conditional_tag()(string $conditional_tag)

Checks the supplied conditional tag.

  • Visibility: private

Arguments

  • $conditional_tag string - <p>The conditional tag to check against.</p>

\MDG_Sidebar::check_page_template()

boolean MDG_Sidebar::\MDG_Sidebar::check_page_template()(string $page_template)

Checks the supplied page template.

  • Visibility: private

Arguments

  • $page_template string - <p>Page template to check against.</p>
Clone this wiki locally