replace options with defaults if ( isset($_REQUEST['page']) && $_REQUEST['page'] == 'optionsframework' ) { if (isset($_REQUEST['of_reset']) && 'reset' == $_REQUEST['of_reset']) { $nonce=$_POST['security']; if (!wp_verify_nonce($nonce, 'of_ajax_nonce') ) { header('Location: themes.php?page=optionsframework&reset=error'); die('Security Check'); } else { $defaults = (array) $pmc_options_machine->Defaults; update_option(OPTIONS,$defaults); generate_options_css($defaults); //generate static css file header('Location: themes.php?page=optionsframework&reset=true'); die($pmc_options_machine->Defaults); } } } } add_action('admin_init','optionsframework_admin_init'); /*-----------------------------------------------------------------------------------*/ /* Options Framework Admin Interface - optionsframework_add_admin */ /*-----------------------------------------------------------------------------------*/ function optionsframework_add_admin() { if ( !is_plugin_active( 'page-builder-pmc/page-builder-pmc.php' ) ) { //plugin is activated $of_page = add_theme_page('Theme Options','Theme Options','edit_theme_options','optionsframework','optionsframework_options_page') ; // Add framework functionaily to the head individually add_action("admin_print_scripts-$of_page", 'of_load_only'); add_action("admin_print_styles-$of_page",'of_style_only'); } } add_action('admin_menu', 'optionsframework_add_admin'); function pmc_add_admin_bar(){ global $wp_admin_bar; $wp_admin_bar->add_menu( array( 'id' => 'pmc_theme_options', 'parent' => 'appearance', 'title' => 'PMC Theme options', 'href' => admin_url('admin.php?page=optionsframework') ) ); } add_action('admin_bar_menu', 'pmc_add_admin_bar', 1000); /*-----------------------------------------------------------------------------------*/ /* Build the Options Page - optionsframework_options_page */ /*-----------------------------------------------------------------------------------*/ function optionsframework_options_page(){ global $pmc_options_machine; /* //for debugging $pmc_data = get_option(OPTIONS); print_r($pmc_data); */ ?>
Options Updated
Options Reset
Error!
'https://premiumcoding.com/', // Site where EDD is hosted 'item_name' => 'Bundler', // Name of theme 'theme_slug' => 'bundler', // Theme slug 'version' => wp_get_theme()->get( 'Version' ), // The current version of this theme 'author' => 'PremiumCoding', // The author of this theme 'download_id' => '', // Optional, used for generating a license renewal link 'renew_url' => '' // Optional, allows for a custom license renewal link ), // Strings $strings = array( 'theme-license' => __( 'Theme License', 'bundler' ), 'enter-key' => __( 'Enter your theme license key.', 'bundler' ), 'license-key' => __( 'License Key', 'bundler' ), 'license-action' => __( 'License Action', 'bundler' ), 'deactivate-license' => __( 'Deactivate License', 'bundler' ), 'activate-license' => __( 'Activate License', 'bundler' ), 'status-unknown' => __( 'License status is unknown.', 'bundler' ), 'renew' => __( 'Renew?', 'bundler' ), 'unlimited' => __( 'unlimited', 'bundler' ), 'license-key-is-active' => __( 'License key is active.', 'bundler' ), 'expires%s' => __( 'Expires %s.', 'bundler' ), '%1$s/%2$-sites' => __( 'You have %1$s / %2$s sites activated.', 'bundler' ), 'license-key-expired-%s' => __( 'License key expired %s.', 'bundler' ), 'license-key-expired' => __( 'License key has expired.', 'bundler' ), 'license-keys-do-not-match' => __( 'License keys do not match.', 'bundler' ), 'license-is-inactive' => __( 'License is inactive.', 'bundler' ), 'license-key-is-disabled' => __( 'License key is disabled.', 'bundler' ), 'site-is-inactive' => __( 'Site is inactive.', 'bundler' ), 'license-status-unknown' => __( 'License status is unknown.', 'bundler' ), 'update-notice' => __( "Updating this theme will lose any customizations you have made. 'Cancel' to stop, 'OK' to update.", 'bundler' ), 'update-available' => __('%1$s %2$s is available. Check out what\'s new or update now.', 'bundler' ) ) ); $updater ->license_page(); ?>

Bundler LIte version

This is lite vesrion of the theme Bundler. If you wish full version just purchase the theme and update licence code above.

With full version you get:
  • Revolutions lider plugin
  • Social share plugin
  • Auto install plugins
  • You can change style(colors....) via theme options
  • You can change Typography (add diffrent google fonts, change font size....) via theme options
  • Tree diffrent blog type
  • Premium support with 24h responce time
  • Updates for 12 months
Expand
Inputs /* Settings */ ?>

Import

IMPORTANT - READ FIRST

  1. We recommend you run our import on a clean WordPress installation to avoid unnecessary complications.
  2. All of your posts and pages will be deleted, so use this only on clean install !!!!
  3. To reset your installation we recommend the following plugin: Wordpress Database Reset
  4. Never run the importer more then once as it will result in extra (double) content.
  5. If you have any doubts whether you should run importer or not, do not hesitate to contact us.
Import Demo
Defaults); die(1); //options reset } die(); } /*-----------------------------------------------------------------------------------*/ /* Class that Generates The Options Within the Panel - optionsframework_machine */ /*-----------------------------------------------------------------------------------*/ class Options_Machine { function __construct($options) { $return = $this->optionsframework_machine($options); $this->Inputs = $return[0]; $this->Menu = $return[1]; $this->Defaults = $return[2]; } /*-----------------------------------------------------------------------------------*/ /* Generates The Options Within the Panel - optionsframework_machine */ /*-----------------------------------------------------------------------------------*/ public static function optionsframework_machine($options) { $pmc_data = get_option(OPTIONS); if(isset($_GET["import"]) && $_GET["import"] == 'start'){ /*import setup*/ defined( 'ABSPATH' ) or die( 'You cannot access this script directly' ); if(!defined('PMC_PATH')) define( 'PMC_PATH', plugin_dir_path(__FILE__) ); global $wpdb; if ( !defined('WP_LOAD_IMPORTERS') ) define('WP_LOAD_IMPORTERS', true); if ( ! class_exists( 'WP_Importer' ) ) { $class_wp_importer = ABSPATH . 'wp-admin/includes/class-wp-importer.php'; if ( file_exists( $class_wp_importer ) ) { include $class_wp_importer; } } if ( ! class_exists('PMC_import_WP') ) { $class_wp_import = PMC_PATH . 'import/plugins/wordpress-importer.php'; if ( file_exists( $class_wp_import ) ) { include $class_wp_import; } } $class_widget_import = PMC_PATH . 'import/plugins/class-widget-data.php'; if ( file_exists( $class_widget_import ) ) { include $class_widget_import; } /*import xml*/ $importer = new PMC_import_WP(); $theme_xml = PMC_PATH . 'import/bundler.xml'; if ( file_exists( $class_wp_importer ) ) { $importer->fetch_attachments = true; ob_start(); $importer->import($theme_xml); ob_end_clean(); } $locations = get_theme_mod( 'nav_menu_locations' ); $menus = wp_get_nav_menus(); if( is_array($menus) ) { foreach($menus as $menu) { // assign menus to theme locations $menu_items = wp_get_nav_menu_object($menu->term_id); switch($menu_items->name){ case 'Main menu': $locations['pmcrespmenu'] = $menu->term_id; $locations['pmcmainmenu'] = $menu->term_id; $locations['pmcscrollmenu'] = $menu->term_id; break; case 'Top Menu': $locations['pmctopmenu'] = $menu->term_id; break; } } } set_theme_mod( 'nav_menu_locations', $locations ); global $wp_rewrite; $wp_rewrite->set_permalink_structure('/%postname%/'); $wp_rewrite->flush_rules(); /*widgets*/ $file_widget = PMC_PATH . '/import/widget.json'; $class_widget_import = new Widget_Data_PMC(); $class_widget_import->ajax_import_widget_data($file_widget); wp_redirect( admin_url( 'themes.php?page=optionsframework&import=true' ) ); } $defaults = array(); $counter = 0; $menu = ''; $output = ''; foreach ($options as $value) { $counter++; $val = ''; if(isset($value['id'])){ //create array of defaults if ($value['type'] == 'multicheck'){ if (is_array($value['std'])){ foreach($value['std'] as $i=>$key){ $defaults[$value['id']][$key] = true; } } else { $defaults[$value['id']][$value['std']] = true; } } else { if (isset($value['id'])) { $defaults[$value['id']] = $value['std']; } } } //Start Heading if ( $value['type'] != "heading" ) { $class = ''; $onclick =''; if(isset( $value['class'] )) { $class = $value['class']; } if(isset( $value['onclick'] )) { $onclick = $value['onclick']; } if($value['type'] != "innerheading"){ $output .= '
'."\n"; $output .= '

'. $value['name'] .'

'."\n"; $output .= '
'."\n" . '
'."\n"; } if($value['type'] == "innerheading"){ $output .= '
'."\n"; $output .= '

'. $value['name'] .'

'."\n"; $output .= '
'."\n" . '
'."\n"; } } //End Heading switch ( $value['type'] ) { case 'innerheading': $output .= '

'. $value['name'] .'

'; break; case 'text': if (!isset($pmc_data[$value['id']])) { $pmc_data[$value['id']] = ''; } $textvalue = str_replace('\\','',$pmc_data[$value['id']]) ; $output .= ''; break; case 'select': if (!isset($pmc_data[$value['id']])) { $pmc_data[$value['id']] = ''; } $output .= '
'; $output .= '
'; break; case 'select2': if (!isset($pmc_data[$value['id']])) { $pmc_data[$value['id']] = ''; } $output .= '
'; $output .= '
'; break; case 'select3': if (!isset($pmc_data[$value['id']])) { $pmc_data[$value['id']] = ''; } global $post; $args = array( 'numberposts' => -1,'post_type' => 'template'); $posts = get_posts($args); $output .= '
'; $output .= '
'; break; case 'textarea': if (!isset($pmc_data[$value['id']])) { $pmc_data[$value['id']] = ''; } $cols = '8'; $ta_value = ''; if(isset($value['options'])){ $ta_options = $value['options']; if(isset($ta_options['cols'])){ $cols = $ta_options['cols']; } } $ta_value = str_replace('\\','',$pmc_data[$value['id']]); $output .= ''; break; case "radio": if (!isset($pmc_data[$value['id']])) { $pmc_data[$value['id']] = ''; } foreach($value['options'] as $option=>$name) { $output .= ''.$name.'
'; } break; case "slidercategory": if (!isset($pmc_data[$value['id']])) { $pmc_data[$value['id']] = ''; } $category = ''; $output .= '
'; $output .= '
' ; //$output .= wp_dropdown_categories('show_option_all=Show all&hierarchical=2&name='.$value["id"].'&taxonomy=sliderocategory&selected='.selected($pmc_data[$value["id"]], $option, false).''); break; case 'checkbox': if (!isset($pmc_data[$value['id']])) { $pmc_data[$value['id']] = ''; } $output .= ''; break; case 'multicheck': if (!isset($pmc_data[$value['id']])) { $pmc_data[$value['id']] = ''; } $multi_stored = $pmc_data[$value['id']]; foreach ($value['options'] as $key => $option) { if (!isset($multi_stored[$key])) {$multi_stored[$key] = '';} $of_key_string = $value['id'] . '_' . $key; $output .= '
'; } break; case 'upload': if (!isset($pmc_data[$value['id']])) { $pmc_data[$value['id']] = ''; } if(!isset($value['mod'])) $value['mod'] = ''; $output .= Options_Machine::optionsframework_uploader_function($value['id'],$value['std'],$value['mod']); break; case 'slider': if (!isset($pmc_data[$value['id']])) { $pmc_data[$value['id']] = ''; } $_id = strip_tags( strtolower($value['id']) ); $int = ''; $int = $_id ; $output .= '
    '; $slides = $pmc_data[$value['id']]; $count = count($slides); if ($count < 2) { $oldorder = 1; $order = 1; $output .= Options_Machine::optionsframework_slider_function($value['id'],$value['std'],$oldorder,$order,$int,$value['social'],$value['menu'],$value['sidebar']); } else { $i = 0; foreach ($slides as $slide) { if(isset( $slide['order'])) $oldorder = $slide['order']; else $oldorder =0; $i++; $order = $i; $output .= Options_Machine::optionsframework_slider_function($value['id'],$value['std'],$oldorder,$order,$int,$value['social'],$value['menu'],$value['sidebar']); } } $output .= '
'; if(!$value['social'] and !$value['menu'] and !$value['sidebar']){ $output .= 'Add New Client
'; } if($value['social']){ $output .= 'Add New Social Icon
'; } if($value['menu']){ $output .= 'Add New Menu
'; } if($value['sidebar']){ $output .= 'Add New Sidebar
'; } break; case 'sorter': if (!isset($pmc_data[$value['id']])) { $pmc_data[$value['id']] = ''; } $sortlists = $pmc_data[$value['id']]; $output .= '
'; if ($sortlists) { foreach ($sortlists as $group=>$sortlist) { $output .= '
    '; $output .= '

    '.$group.'

    '; foreach ($sortlist as $key => $list) { if ($key == "placebo") { $output .= ''; } else { $output .= '
  • '; $output .= ''; $output .= $list; $output .= '
  • '; } } $output .= '
'; } } $output .= '
'; break; case 'color': if (!isset($pmc_data[$value['id']])) { $pmc_data[$value['id']] = ''; } $output .= '
'; $output .= ''; break; case 'colorrgb': if (!isset($pmc_data[$value['id']])) { $pmc_data[$value['id']] = ''; } $output .= '
'; $output .= ''; break; case 'sizeColor': if (!isset($pmc_data[$value['id']])) { $pmc_data[$value['id']] = array('size' => 12, 'color' => '#000000'); } $sizeColor = $pmc_data[$value['id']]; $output .= '
'; $output .= '
'; /* Font Color */ $output .= '
'; $output .= ''; break; case 'font': if (!isset($pmc_data[$value['id']])) { $pmc_data[$value['id']] = array('face' => 'arial'); } $output .= '
'; $output .= '
'; break; case 'typography': if (!isset($pmc_data[$value['id']])) { $pmc_data[$value['id']] = array('size'=>12, 'face' => 'arial', 'color' => '#000000','style'=>'normal'); } $typography_stored = $pmc_data[$value['id']]; /* Font Size */ if(isset($typography_stored['size'])) { $output .= '
'; $output .= '
'; } /* Font Color */ if(isset($typography_stored['color'])) { $output .= '
'; $output .= ''; } /* Font Face */ if(isset($typography_stored['face'])) { $output .= '
'; $output .= '
'; } /* Font Weight */ if(isset($typography_stored['style'])) { $output .= '
'; $output .= '
'; } break; case 'border': if (!isset($pmc_data[$value['id']])) { $pmc_data[$value['id']] = ''; } if(!isset($pmc_data[$value['id'] . '_width'])) $pmc_data[$value['id'] . '_width'] =''; if(!isset($pmc_data[$value['id'] . '_style'])) $pmc_data[$value['id'] . '_style'] =''; if(!isset($pmc_data[$value['id'] . '_color'])) $pmc_data[$value['id'] . '_color'] =''; $border_stored = array('width' => $pmc_data[$value['id'] . '_width'] , 'style' => $pmc_data[$value['id'] . '_style'], 'color' => $pmc_data[$value['id'] . '_color'], ); /* Border Width */ $border_stored = $pmc_data[$value['id']]; $output .= '
'; $output .= '
'; /* Border Style */ $output .= '
'; $output .= '
'; /* Border Color */ $output .= '
'; $output .= ''; break; case 'images': if (!isset($pmc_data[$value['id']])) { $pmc_data[$value['id']] = ''; } $i = 0; $select_value = $pmc_data[$value['id']]; foreach ($value['options'] as $key => $option) { $i++; $checked = ''; $selected = ''; if(NULL!=checked($select_value, $key, false)) { $checked = checked($select_value, $key, false); $selected = 'of-radio-img-selected'; } $output .= ''; $output .= ''; $output .= '
'. $key .'
'; $output .= ''; $output .= '
'; } break; case 'tiles': if (!isset($pmc_data[$value['id']])) { $pmc_data[$value['id']] = ''; } $i = 0; if(isset($pmc_data[$value['id']])) $select_value = $pmc_data[$value['id']]; else $select_value = 1; foreach ($value['options'] as $key => $option) { $i++; $checked = ''; $selected = ''; if(NULL!=checked($select_value, $option, false)) { $checked = checked($select_value, $option, false); $selected = 'of-radio-tile-selected'; } $output .= ''; $output .= ''; $output .= '
'; $output .= '
'; } break; case "info": if (!isset($pmc_data[$value['id']])) { $pmc_data[$value['id']] = ''; } $info_text = $value['std']; $output .= '
'.$info_text.'
'; break; case 'heading': if($counter >= 2){ $output .= '
'."\n"; } $header_class = preg_replace("/[^A-Za-z0-9]/", "", strtolower($value['name']) ); $jquery_click_hook = preg_replace("/[^A-Za-z0-9]/", "", strtolower($value['name']) ); $jquery_click_hook = "of-option-" . $jquery_click_hook; $menu .= '
  • '. $value['name'] .'
  • '; $output .= '

    '.$value['name'].'

    '."\n"; break; } // if TYPE is an array, formatted into smaller inputs... ie smaller values if ( is_array($value['type'])) { foreach($value['type'] as $array){ $id = $array['id']; $std = $array['std']; $saved_std = get_option($id); if($saved_std != $std){$std = $saved_std;} $meta = $array['meta']; if($array['type'] == 'text') { // Only text at this point $output .= ''; $output .= ''.$meta.''; } } } if ( $value['type'] != 'heading' ) { if ( $value['type'] != 'checkbox' ) { $output .= '
    '; } if(!isset($value['desc'])){ $explain_value = ''; } else{ $explain_value = '
    '. $value['desc'] .'
    '."\n"; } $output .= '
    '.$explain_value."\n"; $output .= '
    '."\n"; } } $output .= ''; return array($output,$menu,$defaults); } /*-----------------------------------------------------------------------------------*/ /* Aquagraphite Uploader - optionsframework_uploader_function */ /*-----------------------------------------------------------------------------------*/ public static function optionsframework_uploader_function($id,$std,$mod){ $pmc_data =get_option(OPTIONS); $uploader = ''; $upload = $pmc_data[$id]; $hide = ''; if ($mod == "min") {$hide ='hide';} if ( $upload != "") { $val = $upload; } else {$val = $std;} $uploader .= ''; $uploader .= '
    '._('Upload').''; if(!empty($upload)) {$hide = '';} else { $hide = 'hide';} $uploader .= 'Remove'; $uploader .='
    ' . "\n"; $uploader .= '
    ' . "\n"; if(!empty($upload)){ $uploader .= '
    '; $uploader .= ''; $uploader .= ''; $uploader .= ''; $uploader .= '
    '; } $uploader .= '
    ' . "\n"; return $uploader; } /*-----------------------------------------------------------------------------------*/ /* Aquagraphite Slider - optionsframework_slider_function */ /*-----------------------------------------------------------------------------------*/ public static function optionsframework_slider_function($id,$std,$oldorder,$order,$int, $social = false, $menu = false, $sidebar = false){ $pmc_data = get_option(OPTIONS); $slider = ''; $slide = $pmc_data[$id]; if (isset($slide[$oldorder])) { $val = $slide[$oldorder]; } else {$val = $std;} //initialize all vars $slidevars = array('title','url','link','description','role','icon','facebook','dribble','vimeo','mail','video','top','left','twitter'); foreach ($slidevars as $slidevar) { if (!isset($val[$slidevar])) { $val[$slidevar] = ''; } } //begin slider interface if (!empty($val['title'])) { $slider .= '
  • '.str_replace('\\','',$val['title']).''; } else { if($menu){ $slider .= '
  • Menu '.$order.''; } else if($sidebar){ $slider .= '
  • Sidebar '.$order.''; } else if($social){ $slider .= '
  • Social '.$order.''; } else{ $slider .= '
  • Client '.$order.''; } } $slider .= ''; $slider .= 'Edit
    '; $slider .= '
    '; if ($social){ $slider .= ''; $slider .= ''; } else if ($menu){ $slider .= ''; $slider .= ''; } else if ($sidebar){ $slider .= ''; $slider .= ''; } else{ $slider .= ''; $slider .= ''; } if(!$menu && !$sidebar && !$social){ $slider .= ''; } if(!$menu && !$sidebar && !$social){ $slider .= ''; $slider .= '
    Upload'; if(!empty($val['url'])) {$hide = '';} else { $hide = 'hide';} $slider .= 'Remove'; $slider .='
    ' . "\n"; $slider .= '
    '; if(!empty($val['url'])){ $slider .= ''; if($social){ $slider .= '';} else{ $slider .= '';} $slider .= ''; } $slider .= '
    '; } if ($social){ $slider .= ''; $slider .= ''; } if ($social){ $slider .= ''; } else { if(!$menu && !$sidebar){ $slider .= ''; } } if(!$menu && !$sidebar){ $slider .= ''; } $slider .= 'Delete'; $slider .= '
    ' . "\n"; $slider .= '
    '; $slider .= '
  • '; return $slider; } /*-----------------------------------------------------------------------------------*/ /* End Class /*-----------------------------------------------------------------------------------*/ } //end class ?>