Skip to content

Instantly share code, notes, and snippets.

@NateWr
Created September 7, 2015 08:17
Show Gist options
  • Save NateWr/17402282adce7c0284cf to your computer and use it in GitHub Desktop.
Save NateWr/17402282adce7c0284cf to your computer and use it in GitHub Desktop.
Modifies the Business Profile plugin to include a new business type option from the Schema.org collection.
<?php
/**
* Plugin Name: Add Business Type Option for Business Profile
* Plugin URI: http://themeofthecrop.com
* Description: Modifies the Business Profile plugin to include a new business type option from the Schema.org collection.
* Version: 0.0.1
* Author: Theme of the Crop
* Author URI: http://themeofthecrop.com
* License: GNU General Public License v2.0 or later
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
*
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
* General Public License as published by the Free Software Foundation; either version 2 of the License,
* or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* You should have received a copy of the GNU General Public License along with this program; if not, write
* to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
if ( ! defined( 'ABSPATH' ) )
exit;
/**
* Add Schema option
*/
if ( !function_exists( 'abt_extend_schema' ) ) {
function abt_extend_schema( $sap ) {
$sap->pages['bpfwp-settings']->sections['bpfwp-seo']->settings['schema_type']->options['MotorcycleDealer'] = 'Motorcycle Dealer';
return $sap;
}
add_filter( 'bpfwp_settings_page', 'abt_extend_schema', 100 );
} // endif;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment