Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Some tweaks for Options framework plugin
- *
- * Require Options Framework plugin
- *
- * @package AyoShop
- * @author AyoThemes
- * @license GPL-2.0+
- * @link http://ayothemes.com/go/ayoshop
- */
- /* Exit if accessed directly */
- if ( ! defined( 'ABSPATH' ) ) {
- exit;
- }
- /**
- * Initialize unique ID for options framwework Settings
- *
- * @since 1.0
- */
- function optionsframework_option_name() {
- $optionsframework_settings = get_option( 'optionsframework' );
- $optionsframework_settings['id'] = AYOSHOP_SETTINGS;
- update_option( 'optionsframework', $optionsframework_settings );
- }
- add_filter( 'genesis_export_options', 'ayoshop_export_options' );
- /**
- * Hook AyoShop into Genesis Exporter, allowing AyoShop Setting to be exported.
- *
- * Requires Genesis 1.6+.
- *
- * @since 1.0
- */
- function ayoshop_export_options( $options ) {
- $options['ayoshop'] = array(
- 'label' => __( 'AyoShop Settings', 'ayoshop' ),
- 'settings-field' => AYOSHOP_SETTINGS
- );
- return $options;
- }
- function ayoshop_menu_settings() {
- $menu = array(
- 'page_title' => __( 'AyoShop Settings', 'ayoshop'),
- 'menu_title' => __('AyoShop Settings', 'ayoshop'),
- 'capability' => 'edit_theme_options',
- 'menu_slug' => 'ayoshop-settings'
- );
- return $menu;
- }
- add_filter( 'optionsframework_menu', 'ayoshop_menu_settings' );
- function ayoshop_options() {
- $menu = ayoshop_menu_settings();
- add_submenu_page( 'genesis', $menu['page_title'], $menu['menu_title'], $menu['capability'], 'themes.php?page=ayoshop-settings' );
- }
- add_action( 'admin_menu', 'ayoshop_options' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement