Permalink
Browse files

Initial Commit

  • Loading branch information...
devinsays committed Nov 21, 2010
0 parents commit 822de4b22daffb3c3329064cc73e3e070f1ddc53
Showing with 4,019 additions and 0 deletions.
  1. +24 −0 functions.php
  2. +92 −0 functions/admin-functions.php
  3. +1,025 −0 functions/admin-interface.php
  4. +374 −0 functions/admin-style.css
  5. +177 −0 functions/css/colorpicker.css
  6. BIN functions/images/2cl.png
  7. BIN functions/images/2cr.png
  8. BIN functions/images/3cm.png
  9. BIN functions/images/3cr.png
  10. BIN functions/images/accept.png
  11. BIN functions/images/colorpicker/blank.gif
  12. BIN functions/images/colorpicker/colorpicker_background.png
  13. BIN functions/images/colorpicker/colorpicker_hex.png
  14. BIN functions/images/colorpicker/colorpicker_hsb_b.png
  15. BIN functions/images/colorpicker/colorpicker_hsb_h.png
  16. BIN functions/images/colorpicker/colorpicker_hsb_s.png
  17. BIN functions/images/colorpicker/colorpicker_indic.gif
  18. BIN functions/images/colorpicker/colorpicker_overlay.png
  19. BIN functions/images/colorpicker/colorpicker_rgb_b.png
  20. BIN functions/images/colorpicker/colorpicker_rgb_g.png
  21. BIN functions/images/colorpicker/colorpicker_rgb_r.png
  22. BIN functions/images/colorpicker/colorpicker_select.gif
  23. BIN functions/images/colorpicker/colorpicker_submit.png
  24. BIN functions/images/colorpicker/select.png
  25. BIN functions/images/favicon.ico
  26. BIN functions/images/ico-close.png
  27. BIN functions/images/ico-docs.png
  28. BIN functions/images/icon-add.png
  29. BIN functions/images/icon-edit.png
  30. BIN functions/images/icon_option.png
  31. BIN functions/images/loading-bottom.gif
  32. BIN functions/images/ui-bg_flat_0_aaaaaa_40x100.png
  33. BIN functions/images/warning.png
  34. BIN functions/images/wrench.png
  35. +606 −0 functions/js/ajaxupload.js
  36. +455 −0 functions/js/colorpicker.js
  37. +252 −0 functions/js/jquery.maskedinput-1.2.2.js
  38. +155 −0 functions/theme-functions.php
  39. +261 −0 functions/theme-options.php
  40. +73 −0 layouts/2c-l-fixed.css
  41. +67 −0 layouts/2c-r-fixed.css
  42. +72 −0 layouts/3c-fixed.css
  43. +67 −0 layouts/3c-r-fixed.css
  44. +281 −0 license.txt
  45. +9 −0 readme.txt
  46. BIN screenshot.png
  47. +29 −0 style.css
  48. 0 styles/default.css
  49. 0 styles/style-one.css
  50. 0 styles/style-two.css
@@ -0,0 +1,24 @@
+<?php
+
+/*-----------------------------------------------------------------------------------*/
+/* Options Framework Functions
+/*-----------------------------------------------------------------------------------*/
+
+/* Set path to Options Framework and theme specific functions */
+
+// This path is set for use in a child theme. The code could be updated in a few places
+// to TEMPLATEPATH if this was being used in a parent theme.
+
+$functions_path = STYLESHEETPATH . '/functions/';
+
+/* These files build out the options interface. Likely won't need to edit these. */
+
+require_once ($functions_path . 'admin-functions.php'); // Custom functions and plugins
+require_once ($functions_path . 'admin-interface.php'); // Admin Interfaces (options,framework, seo)
+
+/* These files build out the theme specific options and associated functions. */
+
+require_once ($functions_path . 'theme-options.php'); // Options panel settings and custom settings
+require_once ($functions_path . 'theme-functions.php'); // Theme actions based on options settings
+
+?>
@@ -0,0 +1,92 @@
+<?php
+
+/*-----------------------------------------------------------------------------------*/
+/* Head Hook
+/*-----------------------------------------------------------------------------------*/
+
+function of_head() { do_action( 'of_head' ); }
+
+/*-----------------------------------------------------------------------------------*/
+/* Get the style path currently selected */
+/*-----------------------------------------------------------------------------------*/
+
+function of_style_path() {
+ $style = $_REQUEST[style];
+ if ($style != '') {
+ $style_path = $style;
+ } else {
+ $stylesheet = get_option('of_alt_stylesheet');
+ $style_path = str_replace(".css","",$stylesheet);
+ }
+ if ($style_path == "default")
+ echo 'images';
+ else
+ echo 'styles/'.$style_path;
+}
+
+/*-----------------------------------------------------------------------------------*/
+/* Add default options after activation */
+/*-----------------------------------------------------------------------------------*/
+if (is_admin() && isset($_GET['activated'] ) && $pagenow == "themes.php" ) {
+ //Call action that sets
+ add_action('admin_head','of_option_setup');
+}
+
+function of_option_setup(){
+
+ //Update EMPTY options
+ $of_array = array();
+ add_option('of_options',$of_array);
+
+ $template = get_option('of_template');
+ $saved_options = get_option('of_options');
+
+ foreach($template as $option) {
+ if($option['type'] != 'heading'){
+ $id = $option['id'];
+ $std = $option['std'];
+ $db_option = get_option($id);
+ if(empty($db_option)){
+ if(is_array($option['type'])) {
+ foreach($option['type'] as $child){
+ $c_id = $child['id'];
+ $c_std = $child['std'];
+ update_option($c_id,$c_std);
+ $of_array[$c_id] = $c_std;
+ }
+ } else {
+ update_option($id,$std);
+ $of_array[$id] = $std;
+ }
+ }
+ else { //So just store the old values over again.
+ $of_array[$id] = $db_option;
+ }
+ }
+ }
+ update_option('of_options',$of_array);
+}
+
+/*-----------------------------------------------------------------------------------*/
+/* Admin Backend */
+/*-----------------------------------------------------------------------------------*/
+function optionsframework_admin_head() {
+
+ //Tweaked the message on theme activate
+ ?>
+ <script type="text/javascript">
+ jQuery(function(){
+
+ var message = '<p>This theme comes with an <a href="<?php echo admin_url('admin.php?page=optionsframework'); ?>">options panel</a> to configure settings. This theme also supports widgets, please visit the <a href="<?php echo admin_url('widgets.php'); ?>">widgets settings page</a> to configure them.</p>';
+ jQuery('.themes-php #message2').html(message);
+
+ });
+ </script>
+ <?php
+
+}
+
+add_action('admin_head', 'optionsframework_admin_head');
+
+
+?>
Oops, something went wrong.

0 comments on commit 822de4b

Please sign in to comment.