function optionsframework_option_name() { // This gets the theme name from the stylesheet (lowercase and without spaces) $theme = of_get_theme_info(); $themeName = $theme['Name']; $themeName = preg_replace("/\\W/", "", strtolower($themeName)); $optionsframework_settings = get_option('optionsframework'); $optionsframework_settings['id'] = $themeName; update_option('optionsframework', $optionsframework_settings); }
function remove_footer_admin() { $theme = of_get_theme_info(); if ($theme->parent()) { $theme = $theme->parent(); } $themeName = $theme['Name']; $themeVersion = $theme['Version']; $themeDescription = $theme['Description']; echo "<b><a href=http://besttheme.net>{$themeName} - {$themeVersion}</a></b> - {$themeDescription} | <a href=http://besttheme.net/>Designed by Besttheme.net</a> "; }
function remove_footer_admin() { $theme = of_get_theme_info(); if ($theme->parent()) { $parentTheme = $theme->parent(); } $themeName = $theme['Name']; $themeVersion = $theme['Version']; $themeDescription = $theme['Description']; echo "<b><a href=http://www.s5themes.com>{$themeName} - {$themeVersion}</a></b> - {$themeDescription} | <a href=www.s5themes.com/>Designed by S5themes.com</a> "; }
function optionsframework_page() { // Get the theme name so we can display it up top $theme = of_get_theme_info(); if ($theme->parent()) { $theme = $theme->parent(); } $themeName = $theme['Name']; $themeVersion = $theme['Version']; settings_errors(); ?> <div class="wrap"> <?php screen_icon('themes'); ?> <div id="of_container"> <form action="options.php" method="post"> <?php settings_fields('optionsframework'); ?> <div id="header"> <div class="logo"> <h2><?php esc_html_e($themeName); ?> <?php esc_html_e('Options'); ?> <small>(v<?php esc_html_e($themeVersion); ?> )</small></h2> </div> <div class="site5author"> <h2><a href="http://www.s5themes.com"><?php esc_attr_e('A Theme by', 'site5framework'); ?> <strong><?php esc_attr_e('S5themes.com', 'site5framework'); ?> </strong></a></h2> </div> <div class="clear"></div> </div> <div id="main"> <?php $return = optionsframework_fields(); ?> <div id="of-nav"> <ul> <?php echo $return[1]; ?> </ul> </div> <div id="content"> <?php echo $return[0]; /* Settings */ ?> </div> <div class="clear"></div> </div> <div class="of_admin_bar"> <input type="submit" class="button-primary" name="update" value="<?php esc_attr_e('Save Options', 'site5framework'); ?> " /> <input type="submit" class="reset-button button-secondary" name="reset" value="<?php esc_attr_e('Restore Defaults', 'site5framework'); ?> " onclick="return confirm( '<?php print esc_js(__('Click OK to reset. Any theme settings will be lost!', 'site5framework')); ?> ' );" /> </div> <div class="clear"></div> </form> </div> <!-- / #container --> </div> <!-- / .wrap --> <?php }