This repository has been archived by the owner on Aug 5, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
MDG_Vcard_Widget
Dan Holloran edited this page Mar 11, 2014
·
1 revision
Example vCard widget
- Class name: MDG_Vcard_Widget
- Namespace:
- Parent class: WP_Widget
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
mixed MDG_Vcard_Widget::\MDG_Vcard_Widget::__construct()()
Class constructor.
- Visibility: public
Void MDG_Vcard_Widget::\MDG_Vcard_Widget::widget()(array $args, array $instance)
Handles outputting the widget on the front end.
- Visibility: public
- $args array - <p>The widgets configuration arguments.</p>
- $instance array - <p>The widgets content.</p>
array MDG_Vcard_Widget::\MDG_Vcard_Widget::update()(array $new_instance, array $old_instance)
Handles setting/updating the widget options.
- Visibility: public
- $new_instance array - <p>The new widget options.</p>
- $old_instance array - <p>The previous widget options.</p>
Void MDG_Vcard_Widget::\MDG_Vcard_Widget::flush_widget_cache()()
Flushes the widgets cache.
- Visibility: public
Void MDG_Vcard_Widget::\MDG_Vcard_Widget::form()(array $instance)
Ouputs the options form on admin.
- Visibility: public
- $instance array - <p>The widget options</p>
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:
private array $conditionals
WordPress conditional tags to check against.
- Visibility: private
private array $templates
Page template checks (via is_page_template())
- Visibility: private
public boolean $display = true
If the sidebar should be displayed.
- Visibility: public
mixed MDG_Sidebar::\MDG_Sidebar::__construct()(array $conditionals, array $templates)
Class constructor.
- Visibility: public
- $conditionals array - <p>WordPress conditional tags to check against.</p>
- $templates array - <p>Page template checks (via is_page_template())</p>
boolean MDG_Sidebar::\MDG_Sidebar::check_conditional_tag()(string $conditional_tag)
Checks the supplied conditional tag.
- Visibility: private
- $conditional_tag string - <p>The conditional tag to check against.</p>
boolean MDG_Sidebar::\MDG_Sidebar::check_page_template()(string $page_template)
Checks the supplied page template.
- Visibility: private
- $page_template string - <p>Page template to check against.</p>