function retro_metabox_slider_javascript() { wp_enqueue_script(array('jquery-ui-core', 'jquery-ui-widget', 'jquery-ui-cursor', 'jquery-ui-sortable')); wp_enqueue_media(); wp_enqueue_script('media-upload'); wp_enqueue_script('retro-metabox-slider-js', op_config('theme_includes_uri') . '/metabox/includes/metabox-slider.js', '', op_theme_version); wp_localize_script('retro-metabox-slider-js', 'retro_metabox_string', array('add' => __('Assign Image To Slide', 'openframe'), 'title' => __('Title', 'openframe'), 'caption' => __('No Caption', 'openframe'), 'url' => __('No URL', 'openframe'), 'remove' => __('Remove', 'openframe'))); wp_enqueue_style('retro-metabox-slider-css', op_config('theme_includes_uri') . '/metabox/includes/metabox-slider.css', '', op_theme_version); }
function op_panel_opt_store_do() { check_ajax_referer('op-panel-ajax', 'referer'); $form_contents = $_POST; unset($form_contents['action'], $form_contents['referer']); $current_options = get_option(op_config('theme')); if (update_option(op_config('theme'), $form_contents)) { $response = ':)'; } else { $response = ':('; } die($response); }
function op_version_page() { $xml = op_get_version(); $latestver = $xml->version; ?> <div class="wrap"> <h2 style="margin-bottom: .5em;"><strong><?php echo op_config('theme_name'); ?> </strong> <?php _e('Update', 'openframe'); ?> </h2> <p style="font-size: 1.3em;"><?php printf(__('<strong>%s - Version %s</strong> is available to download (you are currently using <strong>Version %s</strong>).', 'openframe'), op_config('theme_name'), $latestver, op_theme_version); ?> </p> <div style="margin-top: 1em;"> <h2><?php _e('How do I update?', 'openframe'); ?> </h2> <p><?php printf(__('Updating a theme is pretty much like installing it. Download it from ThemeForest.net, extract the .zip package, find the theme folder or the theme zip file. Now, if you do not know how to connect via FTP connection to your server, simply delete the current version of "%s" from WordPress and install the new one (Version %s). Otherwise, connect to your server, navigate to the WordPress themes folder and replace the whole theme folder with the new version.', 'openframe'), op_config('theme_name'), $latestver); ?> </p> <p><?php _e('Your themes path is:', 'openframe'); ?> <code><?php echo get_theme_root(); ?> </code></p> <p><?php _e('<strong>IMPORTANT:</strong> <em>If you made changes to the theme files you will probably lose theme settings when updating. In that case we recommend to backup your theme folder first, look at <strong>changes.txt</strong> file contained into the new theme version package and manually update only the files that have been changed.</em>', 'openframe'); ?> </p> <h2><?php _e('Changelog', 'openframe'); ?> </h2> <div><?php echo $xml->changes; ?> </div> </div> </div> <?php }
require_once op_config('theme_includes') . '/custom-types.php'; /* nav walker */ require_once op_config('theme_includes') . '/nav-walker.php'; /* commentlist */ require_once op_config('theme_includes') . '/commentlist.php'; /* ajax */ require_once op_config('theme_includes') . '/ajax.php'; /* contact form */ require_once op_config('theme_includes') . '/contact-form-html.php'; /* retro icons list */ if (is_admin()) { require_once op_config('theme_includes') . '/icons.php'; } /* metaboxes */ if (is_admin()) { require_once op_config('theme_includes') . '/metabox/start.php'; } /* content size */ if (!isset($content_width)) { $content_width = 940; } /* sets google fonts families */ function retro_google_fonts() { if ($body = op_theme_opt('google-fonts-body')) { echo '<style>body, input, textarea, .blog-list .post-title h3, .blog-list h4.post-meta, .portfolio-list ul li h3, .single h2.post-title, .page h2.post-title { font-family: "' . retro_get_font_name($body) . '", sans-serif; }</style>'; } if ($secondary = op_theme_opt('google-fonts-secondary')) { echo '<style>.hentry-content h1, .hentry-content h2, .hentry-content h3, .hentry-content h4, .hentry-content h5, .hentry-content h6, .section-subtitle, .blog-list h4.post-meta, .single h4.post-meta, .widget h3, .comments h3, .comments h4, .comment-author, .more-posts { font-family: "' . retro_get_font_name($secondary) . '", serif; }</style>'; } }
<div id="op-panel" class="wrap"> <div id="icon-options-general" class="icon32"><br></div> <h2><strong><?php echo op_config('theme_name'); ?> </strong> <?php _e('Settings Panel', 'openframe'); ?> </h2> <h2 id="op-panel-menu" class="nav-tab-wrapper"></h2> <form id="op-panel-content"> <?php require_once op_config('theme_op') . '/options.php'; ?> </form> <a id="op-panel-save" data-str-saved="<?php _e('Saved!', 'openframe'); ?> " data-str-saving="<?php _e('Wait a sec..', 'openframe'); ?> " class="button button-primary button-large" href="#"><?php _e('Save Settings', 'openframe'); ?> </a> </div>
function op_version_check() { require_once op_config('includes') . '/update.php'; }
function op_panel_helpers() { require_once op_config('panel_includes') . '/helper.php'; }