carawebs / address
A WordPress plugin which allows users to set address & contact data.
Installs: 21
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 1
Type:wordpress-plugin
Requires
- php: >=5.4.0
- composer/installers: ~1.0
This package is not auto-updated.
Last update: 2024-11-15 11:40:20 UTC
README
Work in Progress. Use at your own risk.
Adds an option page to add Physical address data to the options table of the database.
Builds the address data into a HTML block that is properly marked up according to schema.org.
Uses the WP Plugin Boilerplate.
Installation
- Clone this repo to the
/wp-content/plugins/
directory - Activate the plugin through the 'Plugins' menu in WordPress
- Add address data to your site: Dashboard >> Settings >> Address & Contact
- Place
<?php do_action('carawebs_address'); ?>
in your templates - Use the shortcode
[address]
in the content area
Available Filters
Example Filter
The 'carawebs_address_business_name' filter receives two parameters:
'<h3><span itemprop="name">' . $business_name . '</span></h3>'
$business_name
An sample use of this filter within a theme would be:
<?php
add_filter( 'carawebs_address_business_name', __NAMESPACE__ . '\\filter_business_name', 1, 2 );
function filter_business_name( $content, $business_name ){
return '<h4><span itemprop="name">' . $business_name . '</span></h4>';
}
Changelog
1.0
- First Commit.