├── readme.txt ├── images ├── 1col.png ├── 2cl.png └── 2cr.png ├── screenshot.png ├── admin ├── images │ └── ico-delete.png ├── js │ ├── options-custom.js │ └── media-uploader.js ├── options-framework.php ├── includes │ ├── class-options-media-uploader.php │ ├── class-options-framework.php │ ├── class-options-framework-admin.php │ ├── class-options-sanitization.php │ └── class-options-interface.php └── css │ └── optionsframework.css ├── library ├── fonts │ ├── genericons-regular-webfont.eot │ ├── genericons-regular-webfont.ttf │ ├── genericons-regular-webfont.woff │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.ttf │ └── glyphicons-halflings-regular.woff ├── css │ ├── login.css │ └── ie.css ├── shortcodes.php ├── js │ ├── scripts.js │ └── modernizr.custom.min.js ├── wp_bootstrap_navwalker.php └── bones.php ├── .gitignore ├── README.md ├── sidebar.php ├── editor-style.css ├── 404.php ├── footer.php ├── page.php ├── page-full-width.php ├── page-left-sidebar.php ├── attachment.php ├── search.php ├── single.php ├── index.php ├── header.php ├── author.php ├── archive.php ├── comments.php ├── page-homepage.php ├── image.php ├── options.php └── LICENSE /readme.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /images/1col.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColorlibHQ/infinitum/master/images/1col.png -------------------------------------------------------------------------------- /images/2cl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColorlibHQ/infinitum/master/images/2cl.png -------------------------------------------------------------------------------- /images/2cr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColorlibHQ/infinitum/master/images/2cr.png -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColorlibHQ/infinitum/master/screenshot.png -------------------------------------------------------------------------------- /admin/images/ico-delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColorlibHQ/infinitum/master/admin/images/ico-delete.png -------------------------------------------------------------------------------- /library/fonts/genericons-regular-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColorlibHQ/infinitum/master/library/fonts/genericons-regular-webfont.eot -------------------------------------------------------------------------------- /library/fonts/genericons-regular-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColorlibHQ/infinitum/master/library/fonts/genericons-regular-webfont.ttf -------------------------------------------------------------------------------- /library/fonts/genericons-regular-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColorlibHQ/infinitum/master/library/fonts/genericons-regular-webfont.woff -------------------------------------------------------------------------------- /library/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColorlibHQ/infinitum/master/library/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /library/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColorlibHQ/infinitum/master/library/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /library/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColorlibHQ/infinitum/master/library/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .htaccess 2 | wp-config.php 3 | wp-content/uploads/ 4 | wp-content/blogs.dir/ 5 | wp-content/upgrade/ 6 | wp-content/backup-db/ 7 | wp-content/advanced-cache.php 8 | wp-content/wp-cache-config.php 9 | sitemap.xml 10 | *.log 11 | wp-content/cache/ 12 | wp-content/backups/ 13 | sitemap.xml.gz 14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | infinitum 2 | ========= 3 | 4 | ![Infinitum preview](http://i.imgur.com/OVNVjEs.png) 5 | 6 | 7 | WordPress theme based on Bootstrap 3, Bones and Options Framework 8 | 9 | Coming soon: 10 | - Translation files and optimization for translation 11 | - WooCommerce support for full-width pages 12 | 13 | 14 | Meanwhile you can check my work at http://colorlib.com/ 15 | -------------------------------------------------------------------------------- /sidebar.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /editor-style.css: -------------------------------------------------------------------------------- 1 | p { 2 | margin: 0 0 9px; 3 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 4 | font-size: 14px; 5 | line-height: 18px; 6 | } 7 | p small { 8 | font-size: 11px; 9 | color: #999999; 10 | } 11 | h1, 12 | h2, 13 | h3, 14 | h4, 15 | h5, 16 | h6 { 17 | margin: 0; 18 | font-weight: bold; 19 | color: #333333; 20 | text-rendering: optimizelegibility; 21 | } 22 | h1 small, 23 | h2 small, 24 | h3 small, 25 | h4 small, 26 | h5 small, 27 | h6 small { 28 | font-weight: normal; 29 | color: #999999; 30 | } 31 | h1 { 32 | font-size: 30px; 33 | line-height: 36px; 34 | } 35 | h1 small { 36 | font-size: 18px; 37 | } 38 | h2 { 39 | font-size: 24px; 40 | line-height: 36px; 41 | } 42 | h2 small { 43 | font-size: 18px; 44 | } 45 | h3 { 46 | line-height: 27px; 47 | font-size: 18px; 48 | } 49 | h3 small { 50 | font-size: 14px; 51 | } 52 | h4, h5, h6 { 53 | line-height: 18px; 54 | } 55 | h4 { 56 | font-size: 14px; 57 | } 58 | h4 small { 59 | font-size: 12px; 60 | } 61 | h5 { 62 | font-size: 12px; 63 | } 64 | h6 { 65 | font-size: 11px; 66 | color: #999999; 67 | text-transform: uppercase; 68 | } -------------------------------------------------------------------------------- /404.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |
6 | 7 |
8 | 9 |
10 | 11 |
12 | 13 |
14 | 15 |

16 | 17 |
18 | 19 |
20 | 21 |
22 | 23 |

24 | 25 |
26 | 27 | 40 | 41 | 46 | 47 |
48 | 49 |
50 | 51 |
52 | 53 |
54 | 55 | -------------------------------------------------------------------------------- /footer.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /page.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |
6 | 7 | 8 | 9 |
role="article" itemscope itemtype="http://schema.org/BlogPosting"> 10 | 11 |
12 | 13 |

14 | 15 |
16 | 17 |
18 | 19 | 20 |
21 | 22 |
23 | ' . __( 'Tags:', 'infinitum' ) . ' ', ', ', '' ); ?> 24 | 25 |
26 | 27 | 28 | 29 |
30 | 31 | 32 | 33 | 34 | 35 |
36 |
37 |

38 |
39 |
40 |

41 |
42 |
43 | 44 | 45 | 46 |
47 | 48 | 49 | 50 |
51 | 52 | -------------------------------------------------------------------------------- /page-full-width.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 |
10 | 11 |
12 | 13 | 14 | 15 |
role="article"> 16 | 17 |
18 | 19 | 20 | 21 |
22 | 23 |
24 | 25 | 26 |
27 | 28 |
29 | 30 |

' . __("Tags","infinitum") . ': ', ', ', ''); ?>

31 | 32 |
33 | 34 |
35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 |
43 |
44 |

45 |
46 |
47 |

48 |
49 |
50 |
51 |
52 | 53 | 54 | 55 |
56 | 57 |
58 | 59 | -------------------------------------------------------------------------------- /page-left-sidebar.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 |
role="article"> 18 | 19 |
20 | 21 | 22 | 23 |
24 | 25 |
26 | 27 | 28 |
29 | 30 |
31 | 32 |

' . __("Tags","infinitum") . ': ', ', ', ''); ?>

33 | 34 |
35 | 36 |
37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 |
45 |
46 |

47 |
48 |
49 |

50 |
51 |
52 |
53 |
54 | 55 | 56 | 57 |
58 | 59 |
60 | 61 | -------------------------------------------------------------------------------- /library/css/login.css: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | Site Name: 3 | Author: 4 | 5 | Stylesheet: Login Stylesheet 6 | 7 | This stylesheet is loaded (if admin.php is setup in your 8 | functions file) on the login page. This way you can style 9 | the login page. It won't affect any other page, admin or front-end. 10 | 11 | For more info, check out the codex: 12 | http://codex.wordpress.org/Creating_Admin_Themes 13 | 14 | ******************************************************************/ 15 | /* the form box */ 16 | /* 17 | This is the Wordpress logo in the admin area. 18 | You'll have to load your own images and mess 19 | with the width and height. 20 | */ 21 | .login h1 a { 22 | background: url(../images/login-logo.png) no-repeat top center; 23 | /* make sure to replace this! */ 24 | width: 326px; 25 | height: 67px; 26 | text-indent: -9999px; 27 | overflow: hidden; 28 | padding-bottom: 15px; 29 | display: block; } 30 | 31 | form { 32 | margin-left: 8px; 33 | padding: 26px 24px 46px; 34 | font-weight: normal; 35 | background: white; 36 | border: 1px solid #E5E5E5; 37 | border-radius: 3px; 38 | box-shadow: none; } 39 | 40 | body form .input { 41 | font-family: "HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue",sans-serif; 42 | font-weight: 200; 43 | font-size: 24px; 44 | width: 97%; 45 | padding: 3px; 46 | margin-top: 2px; 47 | margin-right: 6px; 48 | margin-bottom: 16px; 49 | border: 1px solid #E5E5E5; 50 | background: #FBFBFB; 51 | outline: none; 52 | box-shadow: inset 1px 1px 2px rgba(200, 200, 200, 0.2); } 53 | 54 | /* 55 | You'll have to override some of the default styles 56 | but since we're referencing the id, it should be easy. 57 | */ 58 | /* login button*/ 59 | -------------------------------------------------------------------------------- /attachment.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |
6 | 7 | 8 | 9 |
role="article" itemscope itemtype="http://schema.org/BlogPosting"> 10 | 11 |
12 | 13 | 14 | 15 |

& .

16 | 17 |
18 | 19 |
20 | 21 | 22 | 23 |
24 | 25 |
26 | 27 | ' . __("Tags","infinitum") . ': ', ' ', '

'); ?> 28 | 29 |
30 | 31 |
32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 |
40 |
41 |

Not Found

42 |
43 |
44 |

Sorry, but the requested resource was not found on this site.

45 |
46 |
47 |
48 |
49 | 50 | 51 | 52 |
53 | 54 | 55 | 56 |
57 | 58 | -------------------------------------------------------------------------------- /admin/js/options-custom.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Custom scripts needed for the colorpicker, image button selectors, 3 | * and navigation tabs. 4 | */ 5 | 6 | jQuery(document).ready(function($) { 7 | 8 | // Loads the color pickers 9 | $('.of-color').wpColorPicker(); 10 | 11 | // Image Options 12 | $('.of-radio-img-img').click(function(){ 13 | $(this).parent().parent().find('.of-radio-img-img').removeClass('of-radio-img-selected'); 14 | $(this).addClass('of-radio-img-selected'); 15 | }); 16 | 17 | $('.of-radio-img-label').hide(); 18 | $('.of-radio-img-img').show(); 19 | $('.of-radio-img-radio').hide(); 20 | 21 | // Loads tabbed sections if they exist 22 | if ( $('.nav-tab-wrapper').length > 0 ) { 23 | options_framework_tabs(); 24 | } 25 | 26 | function options_framework_tabs() { 27 | 28 | // Hides all the .group sections to start 29 | $('.group').hide(); 30 | 31 | // Find if a selected tab is saved in localStorage 32 | var active_tab = ''; 33 | if ( typeof(localStorage) != 'undefined' ) { 34 | active_tab = localStorage.getItem("active_tab"); 35 | } 36 | 37 | // If active tab is saved and exists, load it's .group 38 | if (active_tab != '' && $(active_tab).length ) { 39 | $(active_tab).fadeIn(); 40 | $(active_tab + '-tab').addClass('nav-tab-active'); 41 | } else { 42 | $('.group:first').fadeIn(); 43 | $('.nav-tab-wrapper a:first').addClass('nav-tab-active'); 44 | } 45 | 46 | // Bind tabs clicks 47 | $('.nav-tab-wrapper a').click(function(evt) { 48 | 49 | evt.preventDefault(); 50 | 51 | // Remove active class from all tabs 52 | $('.nav-tab-wrapper a').removeClass('nav-tab-active'); 53 | 54 | $(this).addClass('nav-tab-active').blur(); 55 | 56 | var group = $(this).attr('href'); 57 | 58 | if (typeof(localStorage) != 'undefined' ) { 59 | localStorage.setItem("active_tab", $(this).attr('href') ); 60 | } 61 | 62 | $('.group').hide(); 63 | $(group).fadeIn(); 64 | 65 | // Editor height sometimes needs adjustment when unhidden 66 | $('.wp-editor-wrap').each(function() { 67 | var editor_iframe = $(this).find('iframe'); 68 | if ( editor_iframe.height() < 30 ) { 69 | editor_iframe.css({'height':'auto'}); 70 | } 71 | }); 72 | 73 | }); 74 | } 75 | 76 | }); -------------------------------------------------------------------------------- /search.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 |
role="article"> 12 | 13 |
14 | 15 |

16 | 19 | 20 |
21 | 22 |
23 | ' . __("Read more on","infinitum") . ' "'.the_title('', '', false).'" »'); ?> 24 | 25 |
26 | 27 |
28 | 29 |
30 | 31 |
32 | 33 | 34 | 35 | 36 | 37 | 38 | 44 | 45 | 46 | 47 | 48 |
49 |
50 |

51 |
52 |
53 |

54 |
55 |
56 | 57 | 58 | 59 |
60 | 61 | 62 | 63 |
64 | 65 | -------------------------------------------------------------------------------- /admin/options-framework.php: -------------------------------------------------------------------------------- 1 | 7 | * @license GPL-2.0+ 8 | * @link http://wptheming.com 9 | * @copyright 2013 WP Theming 10 | * 11 | * @wordpress-plugin 12 | * Plugin Name: Options Framework 13 | * Plugin URI: http://wptheming.com 14 | * Description: A framework for building theme options. 15 | * Version: 1.7.1 16 | * Author: Devin Price 17 | * Author URI: http://wptheming.com 18 | * License: GPL-2.0+ 19 | * License URI: http://www.gnu.org/licenses/gpl-2.0.txt 20 | * Text Domain: optionsframework 21 | * Domain Path: /languages 22 | */ 23 | 24 | // If this file is called directly, abort. 25 | if ( ! defined( 'WPINC' ) ) { 26 | die; 27 | } 28 | 29 | if ( ! class_exists( 'Options_Framework' ) ) : 30 | 31 | function optionsframework_init() { 32 | 33 | // If user can't edit theme options, exit 34 | if ( !current_user_can( 'edit_theme_options' ) ) 35 | return; 36 | 37 | // Loads the required Options Framework classes. 38 | require plugin_dir_path( __FILE__ ) . 'includes/class-options-framework.php'; 39 | require plugin_dir_path( __FILE__ ) . 'includes/class-options-framework-admin.php'; 40 | require plugin_dir_path( __FILE__ ) . 'includes/class-options-interface.php'; 41 | require plugin_dir_path( __FILE__ ) . 'includes/class-options-media-uploader.php'; 42 | require plugin_dir_path( __FILE__ ) . 'includes/class-options-sanitization.php'; 43 | 44 | // Instantiate the main plugin class. 45 | $options_framework = new Options_Framework; 46 | $options_framework->init(); 47 | 48 | // Instantiate the options page. 49 | $options_framework_admin = new Options_Framework_Admin; 50 | $options_framework_admin->init(); 51 | 52 | // Instantiate the media uploader class 53 | $options_framework_media_uploader = new Options_Framework_Media_Uploader; 54 | $options_framework_media_uploader->init(); 55 | 56 | } 57 | 58 | add_action( 'init', 'optionsframework_init', 20 ); 59 | 60 | endif; 61 | 62 | 63 | /** 64 | * Helper function to return the theme option value. 65 | * If no value has been saved, it returns $default. 66 | * Needed because options are saved as serialized strings. 67 | * 68 | * Not in a class to support backwards compatibility in themes. 69 | */ 70 | 71 | if ( ! function_exists( 'of_get_option' ) ) : 72 | 73 | function of_get_option( $name, $default = false ) { 74 | $config = get_option( 'optionsframework' ); 75 | 76 | if ( ! isset( $config['id'] ) ) { 77 | return $default; 78 | } 79 | 80 | $options = get_option( $config['id'] ); 81 | 82 | if ( isset( $options[$name] ) ) { 83 | return $options[$name]; 84 | } 85 | 86 | return $default; 87 | } 88 | 89 | endif; -------------------------------------------------------------------------------- /single.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |
6 | 7 | 8 | 9 |
role="article" itemscope itemtype="http://schema.org/BlogPosting"> 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 |

.

18 | 19 |
20 | 21 |
22 | 23 | 24 | 25 | 26 |
27 | 28 |
29 | 40 | 0 ) { 43 | ?> 44 | 45 | 46 | 47 |
48 | 49 |
50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 |
58 |
59 |

60 |
61 |
62 |

63 |
64 |
65 |
66 |
67 | 68 | 69 | 70 |
71 | 72 | 73 | 74 |
75 | 76 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 |
8 |
9 | 10 |

11 | 12 |

13 | 14 |
15 |
16 | 19 | 20 |
21 | 22 |
23 | 24 | 25 | 26 |
role="article"> 27 | 28 |
29 | 30 | 31 | 32 | 33 | 34 |

.

35 | 36 |
37 | 38 |
39 | 40 |
41 | 42 |
43 | 44 |
45 | 46 |
47 | 48 | 49 | 50 | 51 | 52 | 53 | 59 | 60 | 61 | 62 | 63 |
64 |
65 |

66 |
67 |
68 |

69 |
70 |
71 | 72 | 73 | 74 |
75 | 76 | 77 | 78 |
79 | 80 | -------------------------------------------------------------------------------- /header.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | class="no-js"> 7 | 8 | 9 | 10 | 11 | 12 | <?php bloginfo('name'); ?> <?php wp_title(); ?> 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | > 38 | 39 | 73 | 74 |
75 | -------------------------------------------------------------------------------- /admin/js/media-uploader.js: -------------------------------------------------------------------------------- 1 | jQuery(document).ready(function($){ 2 | 3 | var optionsframework_upload; 4 | var optionsframework_selector; 5 | 6 | function optionsframework_add_file(event, selector) { 7 | 8 | var upload = $(".uploaded-file"), frame; 9 | var $el = $(this); 10 | optionsframework_selector = selector; 11 | 12 | event.preventDefault(); 13 | 14 | // If the media frame already exists, reopen it. 15 | if ( optionsframework_upload ) { 16 | optionsframework_upload.open(); 17 | } else { 18 | // Create the media frame. 19 | optionsframework_upload = wp.media.frames.optionsframework_upload = wp.media({ 20 | // Set the title of the modal. 21 | title: $el.data('choose'), 22 | 23 | // Customize the submit button. 24 | button: { 25 | // Set the text of the button. 26 | text: $el.data('update'), 27 | // Tell the button not to close the modal, since we're 28 | // going to refresh the page when the image is selected. 29 | close: false 30 | } 31 | }); 32 | 33 | // When an image is selected, run a callback. 34 | optionsframework_upload.on( 'select', function() { 35 | // Grab the selected attachment. 36 | var attachment = optionsframework_upload.state().get('selection').first(); 37 | optionsframework_upload.close(); 38 | optionsframework_selector.find('.upload').val(attachment.attributes.url); 39 | if ( attachment.attributes.type == 'image' ) { 40 | optionsframework_selector.find('.screenshot').empty().hide().append('Remove').slideDown('fast'); 41 | } 42 | optionsframework_selector.find('.upload-button').unbind().addClass('remove-file').removeClass('upload-button').val(optionsframework_l10n.remove); 43 | optionsframework_selector.find('.of-background-properties').slideDown(); 44 | optionsframework_selector.find('.remove-image, .remove-file').on('click', function() { 45 | optionsframework_remove_file( $(this).parents('.section') ); 46 | }); 47 | }); 48 | 49 | } 50 | 51 | // Finally, open the modal. 52 | optionsframework_upload.open(); 53 | } 54 | 55 | function optionsframework_remove_file(selector) { 56 | selector.find('.remove-image').hide(); 57 | selector.find('.upload').val(''); 58 | selector.find('.of-background-properties').hide(); 59 | selector.find('.screenshot').slideUp(); 60 | selector.find('.remove-file').unbind().addClass('upload-button').removeClass('remove-file').val(optionsframework_l10n.upload); 61 | // We don't display the upload button if .upload-notice is present 62 | // This means the user doesn't have the WordPress 3.5 Media Library Support 63 | if ( $('.section-upload .upload-notice').length > 0 ) { 64 | $('.upload-button').remove(); 65 | } 66 | selector.find('.upload-button').on('click', function(event) { 67 | optionsframework_add_file(event, $(this).parents('.section')); 68 | }); 69 | } 70 | 71 | $('.remove-image, .remove-file').on('click', function() { 72 | optionsframework_remove_file( $(this).parents('.section') ); 73 | }); 74 | 75 | $('.upload-button').click( function( event ) { 76 | optionsframework_add_file(event, $(this).parents('.section')); 77 | }); 78 | 79 | }); -------------------------------------------------------------------------------- /author.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |
6 | 7 | 22 | 23 | 24 | 25 |
role="article"> 26 | 27 |
28 | 29 |

30 | 31 |

& .

32 | 33 |
34 | 35 |
36 | 37 | 38 | 39 | 40 | 41 |
42 | 43 |
44 | 45 |
46 | 47 |
48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 62 | 63 | 64 | 65 | 66 | 67 |
68 |
69 |

70 |
71 |
72 |

73 |
74 |
75 | 76 | 77 | 78 |
79 | 80 | 81 | 82 |
83 | 84 | -------------------------------------------------------------------------------- /library/shortcodes.php: -------------------------------------------------------------------------------- 1 | 'attachment', 'numberposts' => -1, 'post_status' => null, 'post_parent' => $post->ID ); 17 | $attachments = get_posts($args); 18 | if ($attachments) { 19 | $output = '
'; 27 | } 28 | 29 | return $output; 30 | } 31 | 32 | 33 | 34 | // Buttons 35 | function buttons( $atts, $content = null ) { 36 | extract( shortcode_atts( array( 37 | 'type' => 'default', /* primary, default, info, success, danger, warning, inverse */ 38 | 'size' => 'default', /* mini, small, default, large */ 39 | 'url' => '', 40 | 'text' => '', 41 | ), $atts ) ); 42 | 43 | if($type == "default"){ 44 | $type = ""; 45 | } 46 | else{ 47 | $type = "btn-" . $type; 48 | } 49 | 50 | if($size == "default"){ 51 | $size = ""; 52 | } 53 | else{ 54 | $size = "btn-" . $size; 55 | } 56 | 57 | $output = ''; 58 | $output .= $text; 59 | $output .= ''; 60 | 61 | return $output; 62 | } 63 | 64 | add_shortcode('button', 'buttons'); 65 | 66 | // Alerts 67 | function alerts( $atts, $content = null ) { 68 | extract( shortcode_atts( array( 69 | 'type' => 'alert-info', /* alert-info, alert-success, alert-error */ 70 | 'close' => 'false', /* display close link */ 71 | 'text' => '', 72 | ), $atts ) ); 73 | 74 | $output = '
'; 75 | if($close == 'true') { 76 | $output .= 'x'; 77 | } 78 | $output .= $text . '
'; 79 | 80 | return $output; 81 | } 82 | 83 | add_shortcode('alert', 'alerts'); 84 | 85 | // Block Messages 86 | function block_messages( $atts, $content = null ) { 87 | extract( shortcode_atts( array( 88 | 'type' => 'alert-info', /* alert-info, alert-success, alert-error */ 89 | 'close' => 'false', /* display close link */ 90 | 'text' => '', 91 | ), $atts ) ); 92 | 93 | $output = '
'; 94 | if($close == 'true') { 95 | $output .= 'x'; 96 | } 97 | $output .= '

' . $text . '

'; 98 | 99 | return $output; 100 | } 101 | 102 | add_shortcode('block-message', 'block_messages'); 103 | 104 | // Block Messages 105 | function blockquotes( $atts, $content = null ) { 106 | extract( shortcode_atts( array( 107 | 'float' => '', /* left, right */ 108 | 'cite' => '', /* text for cite */ 109 | ), $atts ) ); 110 | 111 | $output = ''; 119 | 120 | if($cite){ 121 | $output .= '' . $cite . ''; 122 | } 123 | 124 | $output .= ''; 125 | 126 | return $output; 127 | } 128 | 129 | add_shortcode('blockquote', 'blockquotes'); 130 | 131 | 132 | 133 | 134 | ?> -------------------------------------------------------------------------------- /archive.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |
6 | 7 |
8 | 9 | 10 |

11 | 12 |

13 | 14 | 15 |

16 | 17 |

18 | 19 | post_author; 22 | ?> 23 |

24 | 25 | 26 | 27 |

28 | 29 |

30 | 31 |

32 | 33 | 34 |

35 | 36 |

37 | 38 | 39 |

40 | 41 |

42 | 43 | 44 | 45 | 46 |
role="article"> 47 | 48 |
49 | 50 |

51 | 52 |

.

53 | 54 |
55 | 56 |
57 | 58 | 59 | 60 | 61 | 62 |
63 | 64 |
65 | 66 |
67 | 68 |
69 | 70 | 71 | 72 | 73 | 74 | 75 | 81 | 82 | 83 | 84 | 85 |
86 |
87 |

88 |
89 |
90 |

91 |
92 |
93 | 94 | 95 | 96 |
97 | 98 | 99 | 100 |
101 | 102 |
103 | 104 | -------------------------------------------------------------------------------- /comments.php: -------------------------------------------------------------------------------- 1 | 11 |

This post is password protected. Enter the password to view comments.

12 | 16 | 17 | 18 | 19 | 20 |

21 | 22 | 26 | 27 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 'commentform', 49 | 'id_submit' => 'submit', 50 | 'title_reply' => __( 'Leave a Reply', 'infinitum' ), 51 | 'title_reply_to' => __( 'Leave a Reply to %s', 'infinitum' ), 52 | 'cancel_reply_link' => __( 'Cancel Reply', 'infinitum' ), 53 | 'label_submit' => __( 'Submit Comment', 'infinitum' ), 54 | 55 | 'comment_field' => '
', 56 | 57 | 'must_log_in' => '', 62 | 63 | 'logged_in_as' => '

' . 64 | sprintf( 65 | __( 'Logged in as %2$s. Log out?', 'infinitum' ), 66 | admin_url( 'profile.php' ), 67 | $user_identity, 68 | wp_logout_url( apply_filters( 'the_permalink', get_permalink( ) ) ) 69 | ) . '

', 70 | 71 | 'comment_notes_before' => '

' . 72 | __( 'Your email address will not be published.', 'infinitum' ) . ( $req ? $required_text : '' ) . 73 | '

', 74 | 75 | 'comment_notes_after' => '', 76 | 77 | 'fields' => apply_filters( 'comment_form_default_fields', array( 78 | 79 | 'author' => 80 | '
' . 81 | ' ' . 83 | '
', 85 | 86 | 'email' => 87 | '
' . 89 | '
', 91 | 92 | 'url' => 93 | '
' . 95 | '
' 97 | ) 98 | ), 99 | ); 100 | 101 | comment_form($args); 102 | 103 | endif; // if you delete this the sky will fall on your head ?> -------------------------------------------------------------------------------- /library/js/scripts.js: -------------------------------------------------------------------------------- 1 | /* 2 | Infinitum Scripts File 3 | */ 4 | 5 | // IE8 ployfill for GetComputed Style (for Responsive Script below) 6 | if (!window.getComputedStyle) { 7 | window.getComputedStyle = function(el, pseudo) { 8 | this.el = el; 9 | this.getPropertyValue = function(prop) { 10 | var re = /(\-([a-z]){1})/g; 11 | if (prop == 'float') prop = 'styleFloat'; 12 | if (re.test(prop)) { 13 | prop = prop.replace(re, function () { 14 | return arguments[2].toUpperCase(); 15 | }); 16 | } 17 | return el.currentStyle[prop] ? el.currentStyle[prop] : null; 18 | } 19 | return this; 20 | } 21 | } 22 | 23 | 24 | // as the page loads, call these scripts 25 | jQuery(document).ready(function($) { 26 | 27 | /* 28 | Responsive jQuery is a tricky thing. 29 | There's a bunch of different ways to handle 30 | it, so be sure to research and find the one 31 | that works for you best. 32 | */ 33 | 34 | /* getting viewport width */ 35 | var responsive_viewport = $(window).width(); 36 | 37 | /* if is below 481px */ 38 | if (responsive_viewport < 481) { 39 | 40 | } /* end smallest screen */ 41 | 42 | /* if is larger than 481px */ 43 | if (responsive_viewport > 481) { 44 | 45 | } /* end larger than 481px */ 46 | 47 | /* if is above or equal to 768px */ 48 | if (responsive_viewport >= 768) { 49 | 50 | /* load gravatars */ 51 | $('.comment img[data-gravatar]').each(function(){ 52 | $(this).attr('src',$(this).attr('data-gravatar')); 53 | }); 54 | 55 | } 56 | 57 | /* off the bat large screen actions */ 58 | if (responsive_viewport > 1030) { 59 | 60 | } 61 | 62 | 63 | // add all your scripts here 64 | 65 | 66 | }); /* end of as page load scripts */ 67 | 68 | 69 | /*! A fix for the iOS orientationchange zoom bug. 70 | Script by @scottjehl, rebound by @wilto. 71 | MIT License. 72 | */ 73 | (function(w){ 74 | // This fix addresses an iOS bug, so return early if the UA claims it's something else. 75 | if( !( /iPhone|iPad|iPod/.test( navigator.platform ) && navigator.userAgent.indexOf( "AppleWebKit" ) > -1 ) ){ return; } 76 | var doc = w.document; 77 | if( !doc.querySelector ){ return; } 78 | var meta = doc.querySelector( "meta[name=viewport]" ), 79 | initialContent = meta && meta.getAttribute( "content" ), 80 | disabledZoom = initialContent + ",maximum-scale=1", 81 | enabledZoom = initialContent + ",maximum-scale=10", 82 | enabled = true, 83 | x, y, z, aig; 84 | if( !meta ){ return; } 85 | function restoreZoom(){ 86 | meta.setAttribute( "content", enabledZoom ); 87 | enabled = true; } 88 | function disableZoom(){ 89 | meta.setAttribute( "content", disabledZoom ); 90 | enabled = false; } 91 | function checkTilt( e ){ 92 | aig = e.accelerationIncludingGravity; 93 | x = Math.abs( aig.x ); 94 | y = Math.abs( aig.y ); 95 | z = Math.abs( aig.z ); 96 | // If portrait orientation and in one of the danger zones 97 | if( !w.orientation && ( x > 7 || ( ( z > 6 && y < 8 || z < 8 && y > 6 ) && x > 5 ) ) ){ 98 | if( enabled ){ disableZoom(); } } 99 | else if( !enabled ){ restoreZoom(); } } 100 | w.addEventListener( "orientationchange", restoreZoom, false ); 101 | w.addEventListener( "devicemotion", checkTilt, false ); 102 | })( this ); 103 | 104 | // Other scripts 105 | 106 | jQuery(document).ready(function($) { 107 | 108 | $('.wpcf7-form input.button').addClass('btn btn-primary'); 109 | $('.sfw-reply a').addClass('btn btn-small btn-primary').removeClass('comment-reply-link'); 110 | $('.sfw-edit-link a').addClass('btn btn-mini').removeClass('comment-edit-link'); 111 | $('#commentform .sfw-form-submit input#submit').addClass('btn btn-inverse'); 112 | $('.wp-caption').addClass('thumbnail caption'); 113 | $('.wpcf7-form-control').addClass('form-control'); 114 | $('input[type="submit"]').addClass('btn btn-block btn-primary'); 115 | $('.more-link').addClass('btn btn-primary'); 116 | $('select').addClass('form-control'); 117 | 118 | 119 | // Edit Button 120 | $('p.edit-link').addClass('btn btn-warning btn-xs'); 121 | 122 | 123 | // Comments - Media Object 124 | $('a.comment-reply-link').addClass('btn btn-xs btn-primary'); 125 | 126 | 127 | }); 128 | -------------------------------------------------------------------------------- /admin/includes/class-options-media-uploader.php: -------------------------------------------------------------------------------- 1 | 5 | * @license GPL-2.0+ 6 | * @link http://wptheming.com 7 | * @copyright 2013 WP Theming 8 | */ 9 | 10 | class Options_Framework_Media_Uploader { 11 | 12 | /** 13 | * Initialize the media uploader class 14 | * 15 | * @since 1.7.0 16 | */ 17 | public function init() { 18 | add_action( 'admin_enqueue_scripts', array( $this, 'optionsframework_media_scripts' ) ); 19 | } 20 | 21 | /** 22 | * Media Uploader Using the WordPress Media Library. 23 | * 24 | * Parameters: 25 | * 26 | * string $_id - A token to identify this field (the name). 27 | * string $_value - The value of the field, if present. 28 | * string $_desc - An optional description of the field. 29 | * 30 | */ 31 | 32 | static function optionsframework_uploader( $_id, $_value, $_desc = '', $_name = '' ) { 33 | 34 | $optionsframework_settings = get_option( 'optionsframework' ); 35 | 36 | // Gets the unique option id 37 | $option_name = $optionsframework_settings['id']; 38 | 39 | $output = ''; 40 | $id = ''; 41 | $class = ''; 42 | $int = ''; 43 | $value = ''; 44 | $name = ''; 45 | 46 | $id = strip_tags( strtolower( $_id ) ); 47 | 48 | // If a value is passed and we don't have a stored value, use the value that's passed through. 49 | if ( $_value != '' && $value == '' ) { 50 | $value = $_value; 51 | } 52 | 53 | if ($_name != '') { 54 | $name = $_name; 55 | } 56 | else { 57 | $name = $option_name.'['.$id.']'; 58 | } 59 | 60 | if ( $value ) { 61 | $class = ' has-file'; 62 | } 63 | $output .= '' . "\n"; 64 | if ( function_exists( 'wp_enqueue_media' ) ) { 65 | if ( ( $value == '' ) ) { 66 | $output .= '' . "\n"; 67 | } else { 68 | $output .= '' . "\n"; 69 | } 70 | } else { 71 | $output .= '

' . __( 'Upgrade your version of WordPress for full media support.', 'optionsframework' ) . '

'; 72 | } 73 | 74 | if ( $_desc != '' ) { 75 | $output .= '' . $_desc . '' . "\n"; 76 | } 77 | 78 | $output .= '
' . "\n"; 79 | 80 | if ( $value != '' ) { 81 | $remove = 'Remove'; 82 | $image = preg_match( '/(^.*\.jpg|jpeg|png|gif|ico*)/i', $value ); 83 | if ( $image ) { 84 | $output .= '' . $remove; 85 | } else { 86 | $parts = explode( "/", $value ); 87 | for( $i = 0; $i < sizeof( $parts ); ++$i ) { 88 | $title = $parts[$i]; 89 | } 90 | 91 | // No output preview if it's not an image. 92 | $output .= ''; 93 | 94 | // Standard generic output if it's not an image. 95 | $title = __( 'View File', 'optionsframework' ); 96 | $output .= ''; 97 | } 98 | } 99 | $output .= '
' . "\n"; 100 | return $output; 101 | } 102 | 103 | /** 104 | * Enqueue scripts for file uploader 105 | */ 106 | function optionsframework_media_scripts( $hook ) { 107 | 108 | $menu = Options_Framework_Admin::menu_settings(); 109 | 110 | if ( 'appearance_page_' . $menu['menu_slug'] != $hook ) 111 | return; 112 | 113 | if ( function_exists( 'wp_enqueue_media' ) ) 114 | wp_enqueue_media(); 115 | 116 | wp_register_script( 'of-media-uploader', OPTIONS_FRAMEWORK_DIRECTORY .'js/media-uploader.js', array( 'jquery' ), Options_Framework::VERSION ); 117 | wp_enqueue_script( 'of-media-uploader' ); 118 | wp_localize_script( 'of-media-uploader', 'optionsframework_l10n', array( 119 | 'upload' => __( 'Upload', 'optionsframework' ), 120 | 'remove' => __( 'Remove', 'optionsframework' ) 121 | ) ); 122 | } 123 | } -------------------------------------------------------------------------------- /admin/includes/class-options-framework.php: -------------------------------------------------------------------------------- 1 | 5 | * @license GPL-2.0+ 6 | * @link http://wptheming.com 7 | * @copyright 2013 WP Theming 8 | */ 9 | 10 | class Options_Framework { 11 | 12 | /** 13 | * Plugin version, used for cache-busting of style and script file references. 14 | * 15 | * @since 1.7.0 16 | * @type string 17 | */ 18 | const VERSION = '1.7.1'; 19 | 20 | /** 21 | * Initialize the plugin. 22 | * 23 | * @since 1.7.0 24 | */ 25 | public function init() { 26 | 27 | // Load plugin text domain 28 | add_action( 'init', array( $this, 'load_plugin_textdomain' ) ); 29 | 30 | // Needs to run every time in case theme has been changed 31 | add_action( 'admin_init', array( $this, 'set_theme_option' ) ); 32 | 33 | } 34 | 35 | /** 36 | * Load the plugin text domain for translation. 37 | * 38 | * @since 1.7.0 39 | */ 40 | public function load_plugin_textdomain() { 41 | $domain = 'optionsframework'; 42 | $locale = apply_filters( 'plugin_locale', get_locale(), $domain ); 43 | 44 | load_textdomain( $domain, trailingslashit( WP_LANG_DIR ) . $domain . '/' . $domain . '-' . $locale . '.mo' ); 45 | load_plugin_textdomain( $domain, FALSE, basename( dirname( __FILE__ ) ) . '/languages' ); 46 | } 47 | 48 | /** 49 | * Sets option defaults 50 | * 51 | * @since 1.7.0 52 | */ 53 | function set_theme_option() { 54 | 55 | // Load settings 56 | $optionsframework_settings = get_option( 'optionsframework' ); 57 | 58 | // Updates the unique option id in the database if it has changed 59 | if ( function_exists( 'optionsframework_option_name' ) ) { 60 | optionsframework_option_name(); 61 | } 62 | elseif ( has_action( 'optionsframework_option_name' ) ) { 63 | do_action( 'optionsframework_option_name' ); 64 | } 65 | // If the developer hasn't explicitly set an option id, we'll use a default 66 | else { 67 | $default_themename = get_option( 'stylesheet' ); 68 | $default_themename = preg_replace( "/\W/", "_", strtolower($default_themename ) ); 69 | $default_themename = 'optionsframework_' . $default_themename; 70 | if ( isset( $optionsframework_settings['id'] ) ) { 71 | if ( $optionsframework_settings['id'] == $default_themename ) { 72 | // All good, using default theme id 73 | } else { 74 | $optionsframework_settings['id'] = $default_themename; 75 | update_option( 'optionsframework', $optionsframework_settings ); 76 | } 77 | } 78 | else { 79 | $optionsframework_settings['id'] = $default_themename; 80 | update_option( 'optionsframework', $optionsframework_settings ); 81 | } 82 | } 83 | 84 | } 85 | 86 | /** 87 | * Wrapper for optionsframework_options() 88 | * 89 | * Allows for manipulating or setting options via 'of_options' filter 90 | * For example: 91 | * 92 | * 93 | * add_filter( 'of_options', function( $options ) { 94 | * $options[] = array( 95 | * 'name' => 'Input Text Mini', 96 | * 'desc' => 'A mini text input field.', 97 | * 'id' => 'example_text_mini', 98 | * 'std' => 'Default', 99 | * 'class' => 'mini', 100 | * 'type' => 'text' 101 | * ); 102 | * 103 | * return $options; 104 | * }); 105 | * 106 | * 107 | * Also allows for setting options via a return statement in the 108 | * options.php file. For example (in options.php): 109 | * 110 | * 111 | * return array(...); 112 | * 113 | * 114 | * @return array (by reference) 115 | */ 116 | static function &_optionsframework_options() { 117 | static $options = null; 118 | 119 | if ( !$options ) { 120 | // Load options from options.php file (if it exists) 121 | $location = apply_filters( 'options_framework_location', array('options.php') ); 122 | if ( $optionsfile = locate_template( $location ) ) { 123 | $maybe_options = require_once $optionsfile; 124 | if ( is_array( $maybe_options ) ) { 125 | $options = $maybe_options; 126 | } else if ( function_exists( 'optionsframework_options' ) ) { 127 | $options = optionsframework_options(); 128 | } 129 | } 130 | 131 | // Allow setting/manipulating options via filters 132 | $options = apply_filters( 'of_options', $options ); 133 | } 134 | 135 | return $options; 136 | } 137 | 138 | } -------------------------------------------------------------------------------- /admin/css/optionsframework.css: -------------------------------------------------------------------------------- 1 | /* Options Framework Admin Styles */ 2 | 3 | #optionsframework { 4 | max-width:840px; 5 | background:#fff; 6 | } 7 | #optionsframework h3 { 8 | cursor: default; 9 | background-color: #f1f1f1; 10 | border-bottom: 1px solid #ddd; 11 | } 12 | #optionsframework p { 13 | margin-bottom:0; 14 | padding-bottom:10px; 15 | } 16 | #optionsframework .section { 17 | padding:10px 10px 0; 18 | } 19 | #optionsframework .group { 20 | padding-bottom:40px; 21 | } 22 | #optionsframework .section .controls { 23 | float: left; 24 | min-width:350px; 25 | width: 54%; 26 | padding-right:2%; 27 | } 28 | #optionsframework .section .explain { 29 | max-width:38%; 30 | float: left; 31 | font-size: 12px; 32 | line-height:16px; 33 | color: #777; 34 | } 35 | #optionsframework .section-checkbox .controls { 36 | width: 98%; 37 | } 38 | #optionsframework .section-checkbox .explain { 39 | max-width:94%; 40 | } 41 | #optionsframework .controls select, #optionsframework .controls textarea { 42 | margin-bottom:10px; 43 | width:100%; 44 | } 45 | #optionsframework .section-radio label, #optionsframework .section-multicheck label { 46 | float:left; 47 | max-width:90%; 48 | line-height: 16px; 49 | margin-bottom: 5px; 50 | } 51 | #optionsframework input.checkbox, #optionsframework input.of-radio { 52 | margin: 0 10px 5px 0; 53 | float:left; 54 | clear:both; 55 | } 56 | #optionsframework .section-typography .controls { 57 | float:none; 58 | width:auto; 59 | } 60 | #optionsframework .section-typography .explain { 61 | float:none; 62 | width:auto; 63 | } 64 | #optionsframework .controls .of-typography-size { 65 | width:80px; 66 | float:left 67 | } 68 | #optionsframework .controls .of-typography-unit { 69 | width:50px; 70 | margin-left:5px; 71 | float:left 72 | } 73 | #optionsframework .controls .of-typography-face { 74 | width:100px; 75 | margin-left:5px; 76 | float:left 77 | } 78 | #optionsframework .controls .of-typography-style { 79 | width:80px; 80 | margin-left:5px; 81 | margin-right:5px; 82 | float:left 83 | } 84 | #optionsframework .of-background-properties { 85 | clear:both; 86 | margin-top: 18px; 87 | } 88 | #optionsframework .controls .of-background-repeat { 89 | width:125px; 90 | margin-right:5px; 91 | float:left 92 | } 93 | #optionsframework .controls .of-background-position { 94 | width:125px; 95 | margin-right:5px; 96 | float:left 97 | } 98 | #optionsframework .controls .of-background-attachment { 99 | width:125px; 100 | margin-right:5px; 101 | float:left 102 | } 103 | #optionsframework .section-background .wp-picker-container { 104 | margin-bottom:10px; 105 | } 106 | #optionsframework .controls .of-radio-img-img { 107 | border:3px solid #f9f9f9; 108 | margin:0 5px 10px 0; 109 | display:none; 110 | cursor:pointer; 111 | float:left; 112 | } 113 | #optionsframework .controls .of-radio-img-selected { 114 | border:3px solid #ccc 115 | } 116 | #optionsframework .controls .of-radio-img-img:hover { 117 | opacity:.8; 118 | } 119 | #optionsframework .controls .of-border-width { 120 | width:80px; 121 | float:left 122 | } 123 | #optionsframework .controls .of-border-style { 124 | width:120px; 125 | float:left 126 | } 127 | #optionsframework .hide { 128 | display:none; 129 | } 130 | #optionsframework .of-option-image { 131 | max-width:340px; 132 | margin:3px 0 18px 0; 133 | } 134 | #optionsframework .mini .controls select, #optionsframework .section .mini .controls { 135 | width: 140px; 136 | } 137 | #optionsframework .mini .controls input, #optionsframework .mini .controls { 138 | min-width:140px; 139 | width: 140px; 140 | } 141 | #optionsframework .mini .explain { 142 | max-width:74%; 143 | } 144 | 145 | /* Editor */ 146 | 147 | #optionsframework .section-editor .explain { 148 | max-width: 98%; 149 | float:none; 150 | margin-bottom:5px; 151 | } 152 | 153 | /* Image Uploader */ 154 | 155 | #optionsframework .controls input.upload { 156 | width:80%; 157 | } 158 | #optionsframework .screenshot { 159 | float:left; 160 | margin-left:1px; 161 | position:relative; 162 | width:344px; 163 | margin-top:3px; 164 | } 165 | #optionsframework .screenshot img { 166 | background:#fafafa; 167 | border-color:#ccc #eee #eee #ccc; 168 | border-style:solid; 169 | border-width:1px; 170 | float:left; 171 | max-width:334px; 172 | padding:4px; 173 | margin-bottom:10px; 174 | } 175 | #optionsframework .screenshot .remove-image { 176 | background:url("../images/ico-delete.png") no-repeat; 177 | border:medium none; 178 | bottom:4px; 179 | display:block; 180 | float:left; 181 | height:16px; 182 | padding:0; 183 | position:absolute; 184 | left:-4px; 185 | text-indent:-9999px; 186 | width:16px; 187 | } 188 | #optionsframework .screenshot .no_image .file_link { 189 | margin-left: 20px; 190 | } 191 | #optionsframework .screenshot .no_image .remove-button { 192 | bottom: 0px; 193 | } 194 | #optionsframework .reset-button { 195 | float:left; 196 | cursor:pointer; 197 | } 198 | 199 | /* Bottom Section */ 200 | 201 | #optionsframework-submit { 202 | padding: 7px 10px; 203 | border-top: 1px solid #ddd; 204 | background-color: #f1f1f1; 205 | } 206 | #optionsframework .button-primary { 207 | float:right; 208 | } 209 | #optionsframework .section:after { 210 | content: ""; 211 | display: table; 212 | } 213 | #optionsframework .section:after { 214 | clear: both; 215 | } 216 | 217 | /* Custom styles */ 218 | 219 | #optionsframework .mini .controls input, 220 | #optionsframework .mini .controls { 221 | width: 330px; 222 | } -------------------------------------------------------------------------------- /page-homepage.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 |
10 | 11 |
12 | 13 | 19 | 20 | 72 | 73 | 74 | 75 | 76 | 77 |
role="article"> 78 | 79 |
80 | 81 | ID ) ): ?> 82 | ID ), 'infinitum-featured-home' ); 83 | $image = $background_image[0]; ?> 84 | 85 | 86 | 87 |
88 | 89 | ID, 'custom_tagline' , true);?> 90 | 91 |
92 | 93 |
94 | 95 |
96 | 97 |
98 | 99 | 100 | 101 |
102 | 103 |
104 | 105 |
106 | 107 |
108 | 109 |
110 | 111 |
112 | 113 |
114 | 115 |
116 | 117 |
118 | 119 |
120 | 121 |
122 | 123 |

' . __("Tags","infinitum") . ': ', ', ', ''); ?>

124 | 125 |
126 | 127 |
128 | 129 | 133 | 134 | 135 | 136 | 137 | 138 |
139 |
140 |

141 |
142 |
143 |

144 |
145 |
146 |
147 |
148 | 149 | 150 | 151 |
152 | 153 |
154 | 155 | -------------------------------------------------------------------------------- /image.php: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 | 13 |
14 | 15 | 16 | 17 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 |
66 |
67 |

68 |
69 |
70 |

71 |
72 |
73 |
74 |
75 | 76 | 77 | 78 |
79 | 80 | 136 | 137 |
138 | 139 | -------------------------------------------------------------------------------- /library/wp_bootstrap_navwalker.php: -------------------------------------------------------------------------------- 1 | \n"; 25 | } 26 | 27 | /** 28 | * @see Walker::start_el() 29 | * @since 3.0.0 30 | * 31 | * @param string $output Passed by reference. Used to append additional content. 32 | * @param object $item Menu item data object. 33 | * @param int $depth Depth of menu item. Used for padding. 34 | * @param int $current_page Menu item ID. 35 | * @param object $args 36 | */ 37 | public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) { 38 | $indent = ( $depth ) ? str_repeat( "\t", $depth ) : ''; 39 | 40 | /** 41 | * Dividers, Headers or Disabled 42 | * ============================= 43 | * Determine whether the item is a Divider, Header, Disabled or regular 44 | * menu item. To prevent errors we use the strcasecmp() function to so a 45 | * comparison that is not case sensitive. The strcasecmp() function returns 46 | * a 0 if the strings are equal. 47 | */ 48 | if ( strcasecmp( $item->attr_title, 'divider' ) == 0 && $depth === 1 ) { 49 | $output .= $indent . ''; 197 | $fb_output .= ''; 198 | 199 | if ( $container ) 200 | $fb_output .= ''; 201 | 202 | echo $fb_output; 203 | } 204 | } 205 | } 206 | -------------------------------------------------------------------------------- /admin/includes/class-options-framework-admin.php: -------------------------------------------------------------------------------- 1 | 5 | * @license GPL-2.0+ 6 | * @link http://wptheming.com 7 | * @copyright 2013 WP Theming 8 | */ 9 | 10 | class Options_Framework_Admin { 11 | 12 | /** 13 | * Page hook for the options screen 14 | * 15 | * @since 1.7.0 16 | * @type string 17 | */ 18 | protected $options_screen = null; 19 | 20 | /** 21 | * Hook in the scripts and styles 22 | * 23 | * @since 1.7.0 24 | */ 25 | public function init() { 26 | 27 | // Gets options to load 28 | $options = & Options_Framework::_optionsframework_options(); 29 | 30 | // Checks if options are available 31 | if ( $options ) { 32 | 33 | // Add the options page and menu item. 34 | add_action( 'admin_menu', array( $this, 'add_options_page' ) ); 35 | 36 | // Add the required scripts and styles 37 | add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_styles' ) ); 38 | add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ) ); 39 | 40 | // Settings need to be registered after admin_init 41 | add_action( 'admin_init', array( $this, 'settings_init' ) ); 42 | 43 | // Adds options menu to the admin bar 44 | add_action( 'wp_before_admin_bar_render', array( $this, 'optionsframework_admin_bar' ) ); 45 | 46 | } else { 47 | // Display a notice if options aren't present in the theme 48 | add_action( 'admin_notices', array( $this, 'options_notice' ) ); 49 | add_action( 'admin_init', array( $this, 'options_notice_ignore' ) ); 50 | } 51 | 52 | } 53 | 54 | /** 55 | * Let's the user know that options aren't available for their theme 56 | */ 57 | function options_notice() { 58 | global $pagenow; 59 | if ( !is_multisite() && ( $pagenow == 'plugins.php' || $pagenow == 'themes.php' ) ) { 60 | global $current_user ; 61 | $user_id = $current_user->ID; 62 | if ( ! get_user_meta($user_id, 'optionsframework_ignore_notice') ) { 63 | echo '

'; 64 | printf( __('Your current theme does not have support for the Options Framework plugin. Learn More | Hide Notice', 'optionsframework'), 'http://wptheming.com/options-framework-plugin', '?optionsframework_nag_ignore=0'); 65 | echo "

"; 66 | } 67 | } 68 | } 69 | 70 | /** 71 | * Allows the user to hide the options notice 72 | */ 73 | function options_notice_ignore() { 74 | global $current_user; 75 | $user_id = $current_user->ID; 76 | if ( isset( $_GET['optionsframework_nag_ignore'] ) && '0' == $_GET['optionsframework_nag_ignore'] ) { 77 | add_user_meta( $user_id, 'optionsframework_ignore_notice', 'true', true ); 78 | } 79 | } 80 | 81 | /** 82 | * Registers the settings 83 | * 84 | * @since 1.7.0 85 | */ 86 | function settings_init() { 87 | 88 | // Load Options Framework Settings 89 | $optionsframework_settings = get_option( 'optionsframework' ); 90 | 91 | // Registers the settings fields and callback 92 | register_setting( 'optionsframework', $optionsframework_settings['id'], array ( $this, 'validate_options' ) ); 93 | 94 | // Displays notice after options save 95 | add_action( 'optionsframework_after_validate', array( $this, 'save_options_notice' ) ); 96 | 97 | } 98 | 99 | /* 100 | * Define menu options (still limited to appearance section) 101 | * 102 | * Examples usage: 103 | * 104 | * add_filter( 'optionsframework_menu', function( $menu ) { 105 | * $menu['page_title'] = 'The Options'; 106 | * $menu['menu_title'] = 'The Options'; 107 | * return $menu; 108 | * }); 109 | * 110 | * @since 1.7.0 111 | * 112 | */ 113 | static function menu_settings() { 114 | 115 | $menu = array( 116 | 'page_title' => __( 'Theme Options', 'optionsframework'), 117 | 'menu_title' => __('Theme Options', 'optionsframework'), 118 | 'capability' => 'edit_theme_options', 119 | 'menu_slug' => 'options-framework' 120 | ); 121 | 122 | return apply_filters( 'optionsframework_menu', $menu ); 123 | } 124 | 125 | /** 126 | * Add a subpage called "Theme Options" to the appearance menu. 127 | * 128 | * @since 1.7.0 129 | */ 130 | function add_options_page() { 131 | 132 | $menu = $this->menu_settings(); 133 | $this->options_screen = add_theme_page( $menu['page_title'], $menu['menu_title'], $menu['capability'], $menu['menu_slug'], array( $this, 'options_page' ) ); 134 | 135 | } 136 | 137 | /** 138 | * Loads the required stylesheets 139 | * 140 | * @since 1.7.0 141 | */ 142 | function enqueue_admin_styles() { 143 | wp_enqueue_style( 'optionsframework', OPTIONS_FRAMEWORK_DIRECTORY . 'css/optionsframework.css', array(), Options_Framework::VERSION ); 144 | wp_enqueue_style( 'wp-color-picker' ); 145 | } 146 | 147 | /** 148 | * Loads the required javascript 149 | * 150 | * @since 1.7.0 151 | */ 152 | function enqueue_admin_scripts( $hook ) { 153 | 154 | $menu = $this->menu_settings(); 155 | 156 | if ( 'appearance_page_' . $menu['menu_slug'] != $hook ) 157 | return; 158 | 159 | // Enqueue custom option panel JS 160 | wp_enqueue_script( 'options-custom', OPTIONS_FRAMEWORK_DIRECTORY . 'js/options-custom.js', array( 'jquery','wp-color-picker' ), Options_Framework::VERSION ); 161 | 162 | // Inline scripts from options-interface.php 163 | add_action( 'admin_head', array( $this, 'of_admin_head' ) ); 164 | } 165 | 166 | function of_admin_head() { 167 | // Hook to add custom scripts 168 | do_action( 'optionsframework_custom_scripts' ); 169 | } 170 | 171 | /** 172 | * Builds out the options panel. 173 | * 174 | * If we were using the Settings API as it was intended we would use 175 | * do_settings_sections here. But as we don't want the settings wrapped in a table, 176 | * we'll call our own custom optionsframework_fields. See options-interface.php 177 | * for specifics on how each individual field is generated. 178 | * 179 | * Nonces are provided using the settings_fields() 180 | * 181 | * @since 1.7.0 182 | */ 183 | function options_page() { ?> 184 | 185 |
186 | 187 | menu_settings(); ?> 188 |

189 | 190 | 193 | 194 | 195 | 196 |
197 |
198 |
199 | 200 | 201 |
202 | 203 | 204 |
205 |
206 |
207 |
208 |
209 | 210 |
211 | 212 | get_default_values(); 236 | } 237 | 238 | /* 239 | * Update Settings 240 | * 241 | * This used to check for $_POST['update'], but has been updated 242 | * to be compatible with the theme customizer introduced in WordPress 3.4 243 | */ 244 | 245 | $clean = array(); 246 | $options = & Options_Framework::_optionsframework_options(); 247 | foreach ( $options as $option ) { 248 | 249 | if ( ! isset( $option['id'] ) ) { 250 | continue; 251 | } 252 | 253 | if ( ! isset( $option['type'] ) ) { 254 | continue; 255 | } 256 | 257 | $id = preg_replace( '/[^a-zA-Z0-9._\-]/', '', strtolower( $option['id'] ) ); 258 | 259 | // Set checkbox to false if it wasn't sent in the $_POST 260 | if ( 'checkbox' == $option['type'] && ! isset( $input[$id] ) ) { 261 | $input[$id] = false; 262 | } 263 | 264 | // Set each item in the multicheck to false if it wasn't sent in the $_POST 265 | if ( 'multicheck' == $option['type'] && ! isset( $input[$id] ) ) { 266 | foreach ( $option['options'] as $key => $value ) { 267 | $input[$id][$key] = false; 268 | } 269 | } 270 | 271 | // For a value to be submitted to database it must pass through a sanitization filter 272 | if ( has_filter( 'of_sanitize_' . $option['type'] ) ) { 273 | $clean[$id] = apply_filters( 'of_sanitize_' . $option['type'], $input[$id], $option ); 274 | } 275 | } 276 | 277 | // Hook to run after validation 278 | do_action( 'optionsframework_after_validate', $clean ); 279 | 280 | return $clean; 281 | } 282 | 283 | /** 284 | * Display message when options have been saved 285 | */ 286 | 287 | function save_options_notice() { 288 | add_settings_error( 'options-framework', 'save_options', __( 'Options saved.', 'optionsframework' ), 'updated fade' ); 289 | } 290 | 291 | /** 292 | * Get the default values for all the theme options 293 | * 294 | * Get an array of all default values as set in 295 | * options.php. The 'id','std' and 'type' keys need 296 | * to be defined in the configuration array. In the 297 | * event that these keys are not present the option 298 | * will not be included in this function's output. 299 | * 300 | * @return array Re-keyed options configuration array. 301 | * 302 | */ 303 | 304 | function get_default_values() { 305 | $output = array(); 306 | $config = & Options_Framework::_optionsframework_options(); 307 | foreach ( (array) $config as $option ) { 308 | if ( ! isset( $option['id'] ) ) { 309 | continue; 310 | } 311 | if ( ! isset( $option['std'] ) ) { 312 | continue; 313 | } 314 | if ( ! isset( $option['type'] ) ) { 315 | continue; 316 | } 317 | if ( has_filter( 'of_sanitize_' . $option['type'] ) ) { 318 | $output[$option['id']] = apply_filters( 'of_sanitize_' . $option['type'], $option['std'], $option ); 319 | } 320 | } 321 | return $output; 322 | } 323 | 324 | /** 325 | * Add options menu item to admin bar 326 | */ 327 | 328 | function optionsframework_admin_bar() { 329 | 330 | $menu = $this->menu_settings(); 331 | global $wp_admin_bar; 332 | 333 | $wp_admin_bar->add_menu( array( 334 | 'parent' => 'appearance', 335 | 'id' => 'of_theme_options', 336 | 'title' => __( 'Theme Options', 'optionsframework' ), 337 | 'href' => admin_url( 'themes.php?page=' . $menu['menu_slug'] ) 338 | ) ); 339 | } 340 | 341 | } -------------------------------------------------------------------------------- /admin/includes/class-options-sanitization.php: -------------------------------------------------------------------------------- 1 | 5 | * @license GPL-2.0+ 6 | * @link http://wptheming.com 7 | * @copyright 2013 WP Theming 8 | */ 9 | 10 | /* Text */ 11 | 12 | add_filter( 'of_sanitize_text', 'sanitize_text_field' ); 13 | 14 | /* Password */ 15 | 16 | add_filter( 'of_sanitize_password', 'sanitize_text_field' ); 17 | 18 | /* Textarea */ 19 | 20 | function of_sanitize_textarea( $input) { 21 | global $allowedposttags; 22 | $output = wp_kses( $input, $allowedposttags); 23 | return $output; 24 | } 25 | 26 | add_filter( 'of_sanitize_textarea', 'of_sanitize_textarea' ); 27 | 28 | /* Select */ 29 | 30 | add_filter( 'of_sanitize_select', 'of_sanitize_enum', 10, 2); 31 | 32 | /* Radio */ 33 | 34 | add_filter( 'of_sanitize_radio', 'of_sanitize_enum', 10, 2); 35 | 36 | /* Images */ 37 | 38 | add_filter( 'of_sanitize_images', 'of_sanitize_enum', 10, 2); 39 | 40 | /* Checkbox */ 41 | 42 | function of_sanitize_checkbox( $input ) { 43 | if ( $input ) { 44 | $output = '1'; 45 | } else { 46 | $output = false; 47 | } 48 | return $output; 49 | } 50 | add_filter( 'of_sanitize_checkbox', 'of_sanitize_checkbox' ); 51 | 52 | /* Multicheck */ 53 | 54 | function of_sanitize_multicheck( $input, $option ) { 55 | $output = ''; 56 | if ( is_array( $input ) ) { 57 | foreach( $option['options'] as $key => $value ) { 58 | $output[$key] = false; 59 | } 60 | foreach( $input as $key => $value ) { 61 | if ( array_key_exists( $key, $option['options'] ) && $value ) { 62 | $output[$key] = "1"; 63 | } 64 | } 65 | } 66 | return $output; 67 | } 68 | add_filter( 'of_sanitize_multicheck', 'of_sanitize_multicheck', 10, 2 ); 69 | 70 | /* Color Picker */ 71 | 72 | add_filter( 'of_sanitize_color', 'of_sanitize_hex' ); 73 | 74 | /* Uploader */ 75 | 76 | function of_sanitize_upload( $input ) { 77 | $output = ''; 78 | $filetype = wp_check_filetype($input); 79 | if ( $filetype["ext"] ) { 80 | $output = $input; 81 | } 82 | return $output; 83 | } 84 | add_filter( 'of_sanitize_upload', 'of_sanitize_upload' ); 85 | 86 | /* Editor */ 87 | 88 | function of_sanitize_editor($input) { 89 | if ( current_user_can( 'unfiltered_html' ) ) { 90 | $output = $input; 91 | } 92 | else { 93 | global $allowedtags; 94 | $output = wpautop(wp_kses( $input, $allowedtags)); 95 | } 96 | return $output; 97 | } 98 | add_filter( 'of_sanitize_editor', 'of_sanitize_editor' ); 99 | 100 | /* Allowed Tags */ 101 | 102 | function of_sanitize_allowedtags( $input ) { 103 | global $allowedtags; 104 | $output = wpautop( wp_kses( $input, $allowedtags ) ); 105 | return $output; 106 | } 107 | 108 | /* Allowed Post Tags */ 109 | 110 | function of_sanitize_allowedposttags( $input ) { 111 | global $allowedposttags; 112 | $output = wpautop(wp_kses( $input, $allowedposttags)); 113 | return $output; 114 | } 115 | add_filter( 'of_sanitize_info', 'of_sanitize_allowedposttags' ); 116 | 117 | /* Check that the key value sent is valid */ 118 | 119 | function of_sanitize_enum( $input, $option ) { 120 | $output = ''; 121 | if ( array_key_exists( $input, $option['options'] ) ) { 122 | $output = $input; 123 | } 124 | return $output; 125 | } 126 | 127 | /* Background */ 128 | 129 | function of_sanitize_background( $input ) { 130 | $output = wp_parse_args( $input, array( 131 | 'color' => '', 132 | 'image' => '', 133 | 'repeat' => 'repeat', 134 | 'position' => 'top center', 135 | 'attachment' => 'scroll' 136 | ) ); 137 | 138 | $output['color'] = apply_filters( 'of_sanitize_hex', $input['color'] ); 139 | $output['image'] = apply_filters( 'of_sanitize_upload', $input['image'] ); 140 | $output['repeat'] = apply_filters( 'of_background_repeat', $input['repeat'] ); 141 | $output['position'] = apply_filters( 'of_background_position', $input['position'] ); 142 | $output['attachment'] = apply_filters( 'of_background_attachment', $input['attachment'] ); 143 | 144 | return $output; 145 | } 146 | add_filter( 'of_sanitize_background', 'of_sanitize_background' ); 147 | 148 | function of_sanitize_background_repeat( $value ) { 149 | $recognized = of_recognized_background_repeat(); 150 | if ( array_key_exists( $value, $recognized ) ) { 151 | return $value; 152 | } 153 | return apply_filters( 'of_default_background_repeat', current( $recognized ) ); 154 | } 155 | add_filter( 'of_background_repeat', 'of_sanitize_background_repeat' ); 156 | 157 | function of_sanitize_background_position( $value ) { 158 | $recognized = of_recognized_background_position(); 159 | if ( array_key_exists( $value, $recognized ) ) { 160 | return $value; 161 | } 162 | return apply_filters( 'of_default_background_position', current( $recognized ) ); 163 | } 164 | add_filter( 'of_background_position', 'of_sanitize_background_position' ); 165 | 166 | function of_sanitize_background_attachment( $value ) { 167 | $recognized = of_recognized_background_attachment(); 168 | if ( array_key_exists( $value, $recognized ) ) { 169 | return $value; 170 | } 171 | return apply_filters( 'of_default_background_attachment', current( $recognized ) ); 172 | } 173 | add_filter( 'of_background_attachment', 'of_sanitize_background_attachment' ); 174 | 175 | 176 | /* Typography */ 177 | 178 | function of_sanitize_typography( $input, $option ) { 179 | 180 | $output = wp_parse_args( $input, array( 181 | 'size' => '', 182 | 'face' => '', 183 | 'style' => '', 184 | 'color' => '' 185 | ) ); 186 | 187 | if ( isset( $option['options']['faces'] ) && isset( $input['face'] ) ) { 188 | if ( !( array_key_exists( $input['face'], $option['options']['faces'] ) ) ) { 189 | $output['face'] = ''; 190 | } 191 | } 192 | else { 193 | $output['face'] = apply_filters( 'of_font_face', $output['face'] ); 194 | } 195 | 196 | $output['size'] = apply_filters( 'of_font_size', $output['size'] ); 197 | $output['style'] = apply_filters( 'of_font_style', $output['style'] ); 198 | $output['color'] = apply_filters( 'of_sanitize_color', $output['color'] ); 199 | return $output; 200 | } 201 | add_filter( 'of_sanitize_typography', 'of_sanitize_typography', 10, 2 ); 202 | 203 | function of_sanitize_font_size( $value ) { 204 | $recognized = of_recognized_font_sizes(); 205 | $value_check = preg_replace('/px/','', $value); 206 | if ( in_array( (int) $value_check, $recognized ) ) { 207 | return $value; 208 | } 209 | return apply_filters( 'of_default_font_size', $recognized ); 210 | } 211 | add_filter( 'of_font_size', 'of_sanitize_font_size' ); 212 | 213 | 214 | function of_sanitize_font_style( $value ) { 215 | $recognized = of_recognized_font_styles(); 216 | if ( array_key_exists( $value, $recognized ) ) { 217 | return $value; 218 | } 219 | return apply_filters( 'of_default_font_style', current( $recognized ) ); 220 | } 221 | add_filter( 'of_font_style', 'of_sanitize_font_style' ); 222 | 223 | 224 | function of_sanitize_font_face( $value ) { 225 | $recognized = of_recognized_font_faces(); 226 | if ( array_key_exists( $value, $recognized ) ) { 227 | return $value; 228 | } 229 | return apply_filters( 'of_default_font_face', current( $recognized ) ); 230 | } 231 | add_filter( 'of_font_face', 'of_sanitize_font_face' ); 232 | 233 | /** 234 | * Get recognized background repeat settings 235 | * 236 | * @return array 237 | * 238 | */ 239 | function of_recognized_background_repeat() { 240 | $default = array( 241 | 'no-repeat' => __( 'No Repeat', 'optionsframework' ), 242 | 'repeat-x' => __( 'Repeat Horizontally', 'optionsframework' ), 243 | 'repeat-y' => __( 'Repeat Vertically', 'optionsframework' ), 244 | 'repeat' => __( 'Repeat All', 'optionsframework' ), 245 | ); 246 | return apply_filters( 'of_recognized_background_repeat', $default ); 247 | } 248 | 249 | /** 250 | * Get recognized background positions 251 | * 252 | * @return array 253 | * 254 | */ 255 | function of_recognized_background_position() { 256 | $default = array( 257 | 'top left' => __( 'Top Left', 'optionsframework' ), 258 | 'top center' => __( 'Top Center', 'optionsframework' ), 259 | 'top right' => __( 'Top Right', 'optionsframework' ), 260 | 'center left' => __( 'Middle Left', 'optionsframework' ), 261 | 'center center' => __( 'Middle Center', 'optionsframework' ), 262 | 'center right' => __( 'Middle Right', 'optionsframework' ), 263 | 'bottom left' => __( 'Bottom Left', 'optionsframework' ), 264 | 'bottom center' => __( 'Bottom Center', 'optionsframework' ), 265 | 'bottom right' => __( 'Bottom Right', 'optionsframework') 266 | ); 267 | return apply_filters( 'of_recognized_background_position', $default ); 268 | } 269 | 270 | /** 271 | * Get recognized background attachment 272 | * 273 | * @return array 274 | * 275 | */ 276 | function of_recognized_background_attachment() { 277 | $default = array( 278 | 'scroll' => __( 'Scroll Normally', 'optionsframework' ), 279 | 'fixed' => __( 'Fixed in Place', 'optionsframework') 280 | ); 281 | return apply_filters( 'of_recognized_background_attachment', $default ); 282 | } 283 | 284 | /** 285 | * Sanitize a color represented in hexidecimal notation. 286 | * 287 | * @param string Color in hexidecimal notation. "#" may or may not be prepended to the string. 288 | * @param string The value that this function should return if it cannot be recognized as a color. 289 | * @return string 290 | * 291 | */ 292 | 293 | function of_sanitize_hex( $hex, $default = '' ) { 294 | if ( of_validate_hex( $hex ) ) { 295 | return $hex; 296 | } 297 | return $default; 298 | } 299 | 300 | /** 301 | * Get recognized font sizes. 302 | * 303 | * Returns an indexed array of all recognized font sizes. 304 | * Values are integers and represent a range of sizes from 305 | * smallest to largest. 306 | * 307 | * @return array 308 | */ 309 | 310 | function of_recognized_font_sizes() { 311 | $sizes = range( 9, 71 ); 312 | $sizes = apply_filters( 'of_recognized_font_sizes', $sizes ); 313 | $sizes = array_map( 'absint', $sizes ); 314 | return $sizes; 315 | } 316 | 317 | /** 318 | * Get recognized font faces. 319 | * 320 | * Returns an array of all recognized font faces. 321 | * Keys are intended to be stored in the database 322 | * while values are ready for display in in html. 323 | * 324 | * @return array 325 | * 326 | */ 327 | function of_recognized_font_faces() { 328 | $default = array( 329 | 'arial' => 'Arial', 330 | 'verdana' => 'Verdana, Geneva', 331 | 'trebuchet' => 'Trebuchet', 332 | 'georgia' => 'Georgia', 333 | 'times' => 'Times New Roman', 334 | 'tahoma' => 'Tahoma, Geneva', 335 | 'palatino' => 'Palatino', 336 | 'helvetica' => 'Helvetica*' 337 | ); 338 | return apply_filters( 'of_recognized_font_faces', $default ); 339 | } 340 | 341 | /** 342 | * Get recognized font styles. 343 | * 344 | * Returns an array of all recognized font styles. 345 | * Keys are intended to be stored in the database 346 | * while values are ready for display in in html. 347 | * 348 | * @return array 349 | * 350 | */ 351 | function of_recognized_font_styles() { 352 | $default = array( 353 | 'normal' => __( 'Normal', 'optionsframework' ), 354 | 'italic' => __( 'Italic', 'optionsframework' ), 355 | 'bold' => __( 'Bold', 'optionsframework' ), 356 | 'bold italic' => __( 'Bold Italic', 'optionsframework' ) 357 | ); 358 | return apply_filters( 'of_recognized_font_styles', $default ); 359 | } 360 | 361 | /** 362 | * Is a given string a color formatted in hexidecimal notation? 363 | * 364 | * @param string Color in hexidecimal notation. "#" may or may not be prepended to the string. 365 | * @return bool 366 | * 367 | */ 368 | 369 | function of_validate_hex( $hex ) { 370 | $hex = trim( $hex ); 371 | /* Strip recognized prefixes. */ 372 | if ( 0 === strpos( $hex, '#' ) ) { 373 | $hex = substr( $hex, 1 ); 374 | } 375 | elseif ( 0 === strpos( $hex, '%23' ) ) { 376 | $hex = substr( $hex, 3 ); 377 | } 378 | /* Regex match. */ 379 | if ( 0 === preg_match( '/^[0-9a-fA-F]{6}$/', $hex ) ) { 380 | return false; 381 | } 382 | else { 383 | return true; 384 | } 385 | } -------------------------------------------------------------------------------- /library/bones.php: -------------------------------------------------------------------------------- 1 | '#ffffff', 68 | ) ); 69 | 70 | // rss thingy 71 | add_theme_support('automatic-feed-links'); 72 | 73 | // wp menus 74 | add_theme_support( 'menus' ); 75 | 76 | // registering WP menus 77 | register_nav_menus( 78 | array( 79 | 'main-nav' => __( 'The Main Menu', 'infinitum' ), // main nav in header 80 | 'footer-links' => __( 'Footer Links', 'infinitum' ) // secondary nav in footer 81 | ) 82 | ); 83 | } /* end infinitum theme support */ 84 | 85 | /********************* 86 | WP_HEAD GOODNESS 87 | Let's clean it up by removing all the junk we don't need. 88 | *********************/ 89 | 90 | function infinitum_head_cleanup() { 91 | 92 | // EditURI link 93 | remove_action( 'wp_head', 'rsd_link' ); 94 | // windows live writer 95 | remove_action( 'wp_head', 'wlwmanifest_link' ); 96 | // index link 97 | remove_action( 'wp_head', 'index_rel_link' ); 98 | // previous link 99 | remove_action( 'wp_head', 'parent_post_rel_link', 10, 0 ); 100 | // start link 101 | remove_action( 'wp_head', 'start_post_rel_link', 10, 0 ); 102 | // links for adjacent posts 103 | remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0 ); 104 | // WP version 105 | remove_action( 'wp_head', 'wp_generator' ); 106 | // remove WP version from css 107 | add_filter( 'style_loader_src', 'infinitum_remove_wp_ver_css_js', 9999 ); 108 | // remove Wp version from scripts 109 | add_filter( 'script_loader_src', 'infinitum_remove_wp_ver_css_js', 9999 ); 110 | 111 | } /* end infinitum head cleanup */ 112 | 113 | // remove WP version from RSS 114 | function infinitum_rss_version() { return ''; } 115 | 116 | // remove WP version from scripts 117 | function infinitum_remove_wp_ver_css_js( $src ) { 118 | if ( strpos( $src, 'ver=' ) ) 119 | $src = remove_query_arg( 'ver', $src ); 120 | return $src; 121 | } 122 | 123 | // remove injected CSS from gallery 124 | function infinitum_gallery_style($css) { 125 | return preg_replace( "!!s", '', $css ); 126 | } 127 | 128 | 129 | /********************* 130 | SCRIPTS & ENQUEUEING 131 | *********************/ 132 | 133 | // loading modernizr and jquery, and reply script 134 | function infinitum_scripts_and_styles() { 135 | global $wp_styles; // call global $wp_styles variable to add conditional wrapper around ie stylesheet the WordPress way 136 | if (!is_admin()) { 137 | 138 | // modernizr (without media query polyfill) 139 | wp_register_script( 'infinitum-modernizr', get_stylesheet_directory_uri() . '/library/js/modernizr.custom.min.js', array(), '2.7.0', false ); 140 | 141 | // register main stylesheet 142 | wp_register_style( 'infinitum-stylesheet', get_stylesheet_directory_uri() . '/style.css', array(), '', 'all' ); 143 | 144 | // register bootstrap stylesheet 145 | wp_register_style( 'bootstrap', get_template_directory_uri() . '/library/css/bootstrap.css', array(), '3.0.2', 'all' ); 146 | 147 | // ie-only style sheet 148 | wp_register_style( 'infinitum-ie-only', get_stylesheet_directory_uri() . '/library/css/ie.css', array(), '' ); 149 | 150 | // adding scripts file in the footer 151 | wp_register_script( 'infinitum-js', get_stylesheet_directory_uri() . '/library/js/scripts.js', array( 'jquery' ), '', true ); 152 | 153 | // register bootsrap scripts 154 | wp_register_script( 'bootstrap-scripts', get_template_directory_uri().'/library/js/bootstrap.min.js', array(), '3.0.2', true ); 155 | 156 | if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { 157 | wp_enqueue_script( 'comment-reply' ); 158 | } 159 | 160 | // enqueue styles and scripts 161 | wp_enqueue_script( 'infinitum-modernizr' ); 162 | wp_enqueue_style( 'bootstrap' ); 163 | wp_enqueue_style( 'infinitum-stylesheet' ); 164 | wp_enqueue_style( 'infinitum-ie-only' ); 165 | wp_enqueue_script( 'bootstrap-scripts' ); 166 | 167 | $wp_styles->add_data( 'infinitum-ie-only', 'conditional', 'lt IE 9' ); // add conditional wrapper around ie stylesheet 168 | 169 | wp_enqueue_script( 'jquery' ); 170 | wp_enqueue_script( 'infinitum-js' ); 171 | 172 | } 173 | } 174 | 175 | /********************* 176 | MENUS & NAVIGATION 177 | *********************/ 178 | 179 | function infinitum_main_nav() { 180 | // display the wp3 menu if available 181 | wp_nav_menu( 182 | array( 183 | 'menu' => 'main-nav', 184 | 'theme_location' => 'main-nav', 185 | 'depth' => 2, 186 | 'container' => 'div', 187 | 'container_class' => 'collapse navbar-collapse navbar-ex1-collapse', 188 | 'menu_class' => 'nav navbar-nav', 189 | 'fallback_cb' => 'wp_bootstrap_navwalker::fallback', 190 | 'walker' => new wp_bootstrap_navwalker() 191 | ) 192 | ); 193 | } 194 | 195 | // the footer menu (should you choose to use one) 196 | function infinitum_footer_links() { 197 | // display the wp3 menu if available 198 | wp_nav_menu(array( 199 | 'container' => '', // remove nav container 200 | 'container_class' => 'footer-links clearfix', // class of container (should you choose to use it) 201 | 'menu' => __( 'Footer Links', 'infinitum' ), // nav name 202 | 'menu_class' => 'nav footer-nav clearfix', // adding custom nav class 203 | 'theme_location' => 'footer-links', // where it's located in the theme 204 | 'before' => '', // before the menu 205 | 'after' => '', // after the menu 206 | 'link_before' => '', // before each link 207 | 'link_after' => '', // after each link 208 | 'depth' => 0, // limit the depth of the nav 209 | 'fallback_cb' => 'infinitum_footer_links_fallback' // fallback function 210 | )); 211 | } /* end infinitum footer link */ 212 | 213 | // this is the fallback for header menu 214 | function infinitum_main_nav_fallback() { 215 | //wp_page_menu( 'show_home=Home&menu_class=nav' ); 216 | } 217 | 218 | // this is the fallback for footer menu 219 | function infinitum_footer_links_fallback() { 220 | /* you can put a default here if you like */ 221 | } 222 | 223 | /********************* 224 | PAGE NAVI 225 | *********************/ 226 | 227 | // Numeric Page Navi (built into the theme by default) 228 | function infinitum_page_navi($before = '', $after = '') { 229 | global $wpdb, $wp_query; 230 | $request = $wp_query->request; 231 | $posts_per_page = intval(get_query_var('posts_per_page')); 232 | $paged = intval(get_query_var('paged')); 233 | $numposts = $wp_query->found_posts; 234 | $max_page = $wp_query->max_num_pages; 235 | if ( $numposts <= $posts_per_page ) { return; } 236 | if(empty($paged) || $paged == 0) { 237 | $paged = 1; 238 | } 239 | $pages_to_show = 7; 240 | $pages_to_show_minus_1 = $pages_to_show-1; 241 | $half_page_start = floor($pages_to_show_minus_1/2); 242 | $half_page_end = ceil($pages_to_show_minus_1/2); 243 | $start_page = $paged - $half_page_start; 244 | if($start_page <= 0) { 245 | $start_page = 1; 246 | } 247 | $end_page = $paged + $half_page_end; 248 | if(($end_page - $start_page) != $pages_to_show_minus_1) { 249 | $end_page = $start_page + $pages_to_show_minus_1; 250 | } 251 | if($end_page > $max_page) { 252 | $start_page = $max_page - $pages_to_show_minus_1; 253 | $end_page = $max_page; 254 | } 255 | if($start_page <= 0) { 256 | $start_page = 1; 257 | } 258 | 259 | echo $before.''.$after.""; 284 | } 285 | 286 | 287 | 288 | /********************* 289 | RANDOM CLEANUP ITEMS 290 | *********************/ 291 | 292 | // remove the p from around imgs (http://css-tricks.com/snippets/wordpress/remove-paragraph-tags-from-around-images/) 293 | function infinitum_filter_ptags_on_images($content){ 294 | return preg_replace('/

\s*()?\s*()\s*(<\/a>)?\s*<\/p>/iU', '\1\2\3', $content); 295 | } 296 | 297 | // This removes the annoying […] to a Read More link 298 | function infinitum_excerpt_more($more) { 299 | global $post; 300 | // edit here if you like 301 | return '... '. __( 'Read more »', 'infinitum' ) .''; 302 | } 303 | 304 | add_action( 'infinitum_footer', 'infinitum_footer_info', 30 ); 305 | /** 306 | * function to show the footer info, copyright information 307 | */ 308 | function infinitum_footer_info() { 309 | $output = ' WordPress theme by Colorlib.

'; 310 | echo $output; 311 | } 312 | 313 | // Custom Backend Footer 314 | add_filter('admin_footer_text', 'infinitum_custom_admin_footer'); 315 | function infinitum_custom_admin_footer() { 316 | echo 'Developed and designed by Colorlib.'; 317 | } 318 | 319 | // adding it to the admin area 320 | add_filter('admin_footer_text', 'infinitum_custom_admin_footer'); 321 | 322 | /****************************************************************************************/ 323 | 324 | ?> 325 | -------------------------------------------------------------------------------- /library/js/modernizr.custom.min.js: -------------------------------------------------------------------------------- 1 | /* Modernizr 2.7.0 (Custom Build) | MIT & BSD 2 | * Build: http://modernizr.com/download/#-fontface-backgroundsize-borderimage-flexbox-hsla-multiplebgs-opacity-rgba-textshadow-cssanimations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-applicationcache-hashchange-history-audio-video-input-inputtypes-localstorage-websockets-geolocation-svg-svgclippaths-touch-webgl-shiv-mq-cssclasses-addtest-prefixed-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-css_mediaqueries-css_regions-css_supports-load 3 | */ 4 | ;window.Modernizr=function(a,b,c){function D(a){j.cssText=a}function E(a,b){return D(n.join(a+";")+(b||""))}function F(a,b){return typeof a===b}function G(a,b){return!!~(""+a).indexOf(b)}function H(a,b){for(var d in a){var e=a[d];if(!G(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function I(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:F(f,"function")?f.bind(d||b):f}return!1}function J(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+p.join(d+" ")+d).split(" ");return F(b,"string")||F(b,"undefined")?H(e,b):(e=(a+" "+q.join(d+" ")+d).split(" "),I(e,b,c))}function K(){e.input=function(c){for(var d=0,e=c.length;d',a,""].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},z=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b).matches;var d;return y("@media "+b+" { #"+h+" { position: absolute; } }",function(b){d=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle)["position"]=="absolute"}),d},A=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;return f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=F(e[d],"function"),F(e[d],"undefined")||(e[d]=c),e.removeAttribute(d))),e=null,f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),B={}.hasOwnProperty,C;!F(B,"undefined")&&!F(B.call,"undefined")?C=function(a,b){return B.call(a,b)}:C=function(a,b){return b in a&&F(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=w.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(w.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(w.call(arguments)))};return e}),s.flexbox=function(){return J("flexWrap")},s.webgl=function(){return!!a.WebGLRenderingContext},s.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:y(["@media (",n.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},s.geolocation=function(){return"geolocation"in navigator},s.hashchange=function(){return A("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},s.history=function(){return!!a.history&&!!history.pushState},s.websockets=function(){return"WebSocket"in a||"MozWebSocket"in a},s.rgba=function(){return D("background-color:rgba(150,255,150,.5)"),G(j.backgroundColor,"rgba")},s.hsla=function(){return D("background-color:hsla(120,40%,100%,.5)"),G(j.backgroundColor,"rgba")||G(j.backgroundColor,"hsla")},s.multiplebgs=function(){return D("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(j.background)},s.backgroundsize=function(){return J("backgroundSize")},s.borderimage=function(){return J("borderImage")},s.textshadow=function(){return b.createElement("div").style.textShadow===""},s.opacity=function(){return E("opacity:.55"),/^0.55$/.test(j.opacity)},s.cssanimations=function(){return J("animationName")},s.csscolumns=function(){return J("columnCount")},s.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";return D((a+"-webkit- ".split(" ").join(b+a)+n.join(c+a)).slice(0,-a.length)),G(j.backgroundImage,"gradient")},s.cssreflections=function(){return J("boxReflect")},s.csstransforms=function(){return!!J("transform")},s.csstransforms3d=function(){var a=!!J("perspective");return a&&"webkitPerspective"in g.style&&y("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b,c){a=b.offsetLeft===9&&b.offsetHeight===3}),a},s.csstransitions=function(){return J("transition")},s.fontface=function(){var a;return y('@font-face {font-family:"font";src:url("https://")}',function(c,d){var e=b.getElementById("smodernizr"),f=e.sheet||e.styleSheet,g=f?f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"":"";a=/src/i.test(g)&&g.indexOf(d.split(" ")[0])===0}),a},s.generatedcontent=function(){var a;return y(["#",h,"{font:0/0 a}#",h,':after{content:"',l,'";visibility:hidden;font:3px/1 a}'].join(""),function(b){a=b.offsetHeight>=3}),a},s.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}catch(d){}return c},s.audio=function(){var a=b.createElement("audio"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),c.mp3=a.canPlayType("audio/mpeg;").replace(/^no$/,""),c.wav=a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),c.m4a=(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,"")}catch(d){}return c},s.localstorage=function(){try{return localStorage.setItem(h,h),localStorage.removeItem(h),!0}catch(a){return!1}},s.applicationcache=function(){return!!a.applicationCache},s.svg=function(){return!!b.createElementNS&&!!b.createElementNS(r.svg,"svg").createSVGRect},s.svgclippaths=function(){return!!b.createElementNS&&/SVGClipPath/.test(m.call(b.createElementNS(r.svg,"clipPath")))};for(var L in s)C(s,L)&&(x=L.toLowerCase(),e[x]=s[L](),v.push((e[x]?"":"no-")+x));return e.input||K(),e.addTest=function(a,b){if(typeof a=="object")for(var d in a)C(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},D(""),i=k=null,function(a,b){function l(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function m(){var a=s.elements;return typeof a=="string"?a.split(" "):a}function n(a){var b=j[a[h]];return b||(b={},i++,a[h]=i,j[i]=b),b}function o(a,c,d){c||(c=b);if(k)return c.createElement(a);d||(d=n(c));var g;return d.cache[a]?g=d.cache[a].cloneNode():f.test(a)?g=(d.cache[a]=d.createElem(a)).cloneNode():g=d.createElem(a),g.canHaveChildren&&!e.test(a)&&!g.tagUrn?d.frag.appendChild(g):g}function p(a,c){a||(a=b);if(k)return a.createDocumentFragment();c=c||n(a);var d=c.frag.cloneNode(),e=0,f=m(),g=f.length;for(;e",g="hidden"in a,k=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){g=!0,k=!0}})();var s={elements:d.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:c,shivCSS:d.shivCSS!==!1,supportsUnknownElements:k,shivMethods:d.shivMethods!==!1,type:"default",shivDocument:r,createElement:o,createDocumentFragment:p};a.html5=s,r(b)}(this,b),e._version=d,e._prefixes=n,e._domPrefixes=q,e._cssomPrefixes=p,e.mq=z,e.hasEvent=A,e.testProp=function(a){return H([a])},e.testAllProps=J,e.testStyles=y,e.prefixed=function(a,b,c){return b?J(a,b,c):J(a,"pfx")},g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+v.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f __('One', 'options_framework_theme'), 31 | 'two' => __('Two', 'options_framework_theme'), 32 | 'three' => __('Three', 'options_framework_theme'), 33 | 'four' => __('Four', 'options_framework_theme'), 34 | 'five' => __('Five', 'options_framework_theme') 35 | ); 36 | 37 | // Multicheck Array 38 | $multicheck_array = array( 39 | 'one' => __('French Toast', 'options_framework_theme'), 40 | 'two' => __('Pancake', 'options_framework_theme'), 41 | 'three' => __('Omelette', 'options_framework_theme'), 42 | 'four' => __('Crepe', 'options_framework_theme'), 43 | 'five' => __('Waffle', 'options_framework_theme') 44 | ); 45 | 46 | // Multicheck Defaults 47 | $multicheck_defaults = array( 48 | 'one' => '1', 49 | 'five' => '1' 50 | ); 51 | 52 | // Background Defaults 53 | $background_defaults = array( 54 | 'color' => '', 55 | 'image' => '', 56 | 'repeat' => 'repeat', 57 | 'position' => 'top center', 58 | 'attachment'=>'scroll' ); 59 | 60 | // Typography Defaults 61 | $typography_defaults = array( 62 | 'size' => '14px', 63 | 'face' => 'Helvetica Neue', 64 | 'style' => 'normal', 65 | 'color' => '#111111' ); 66 | 67 | // Body Typography Defaults 68 | $heading_defaults = array( 69 | 'size' => '36px', 70 | 'face' => 'Helvetica Neue', 71 | 'style' => 'normal', 72 | 'color' => '#111111' ); 73 | 74 | // Title Typography Defaults 75 | $title_defaults = array( 76 | 'size' => '18px', 77 | 'face' => 'Helvetica Neue', 78 | 'style' => 'normal', 79 | 'color' => '#ffffff' ); 80 | 81 | // Typography Options 82 | $typography_options = array( 83 | 'sizes' => array( '6','10','12','14','16','18','20','24','28','32','36','42','48' ), 84 | 'faces' => array( 85 | 'arial' => 'Arial', 86 | 'verdana' => 'Verdana, Geneva', 87 | 'trebuchet' => 'Trebuchet', 88 | 'georgia' => 'Georgia', 89 | 'times' => 'Times New Roman', 90 | 'tahoma' => 'Tahoma, Geneva', 91 | 'palatino' => 'Palatino', 92 | 'helvetica' => 'Helvetica', 93 | 'Helvetica Neue' => 'Helvetica Neue' 94 | ), 95 | 'styles' => array( 'normal' => 'Normal','bold' => 'Bold' ), 96 | 'color' => true 97 | ); 98 | 99 | // Pull all the categories into an array 100 | $options_categories = array(); 101 | $options_categories_obj = get_categories(); 102 | foreach ($options_categories_obj as $category) { 103 | $options_categories[$category->cat_ID] = $category->cat_name; 104 | } 105 | 106 | // Pull all tags into an array 107 | $options_tags = array(); 108 | $options_tags_obj = get_tags(); 109 | foreach ( $options_tags_obj as $tag ) { 110 | $options_tags[$tag->term_id] = $tag->name; 111 | } 112 | 113 | 114 | // Pull all the pages into an array 115 | $options_pages = array(); 116 | $options_pages_obj = get_pages('sort_column=post_parent,menu_order'); 117 | $options_pages[''] = 'Select a page:'; 118 | foreach ($options_pages_obj as $page) { 119 | $options_pages[$page->ID] = $page->post_title; 120 | } 121 | 122 | // If using image radio buttons, define a directory path 123 | $imagepath = get_template_directory_uri() . '/images/'; 124 | 125 | 126 | // fixed or scroll position 127 | $fixed_scroll = array("scroll" => "Scroll", "fixed" => "Fixed"); 128 | 129 | $options = array(); 130 | 131 | $options[] = array( "name" => __('Main', 'infinitum'), 132 | "type" => "heading"); 133 | 134 | $options[] = array( "name" => __('Slider carousel on homepage', 'infinitum'), 135 | "desc" => __('Display the bootstrap slider carousel on homepage page template. This uses the WordPress featured images', 'infinitum'), 136 | "id" => "showhidden_slideroptions", 137 | "std" => "0", 138 | "type" => "checkbox"); 139 | 140 | $options[] = array( "name" => __('Slider options', 'infinitum'), 141 | "desc" => __('Number of posts to show', 'infinitum'), 142 | "id" => "slider_options", 143 | "class" => "mini hidden", 144 | "std" => "3", 145 | "type" => "text"); 146 | 147 | $options[] = array( "name" => __('Element color', 'infinitum'), 148 | "desc" => __('Default used if no color is selected', 'infinitum'), 149 | "id" => "element_color", 150 | "std" => "", 151 | "type" => "color"); 152 | 153 | $options[] = array( "name" => __('Element color on hover', 'infinitum'), 154 | "desc" => __('Default used if no color is selected', 'infinitum'), 155 | "id" => "element_color_hover", 156 | "std" => "", 157 | "type" => "color"); 158 | 159 | $options[] = array( "name" => __('Boxed Layout', 'infinitum'), 160 | "desc" => __('Show boxed layout for article body', 'infinitum'), 161 | "id" => "box_ardound_content", 162 | "std" => "1", 163 | "type" => "checkbox"); 164 | 165 | $options[] = array( "name" => __('Custom Favicon', 'infinitum'), 166 | "desc" => __('Upload a 32px x 32px PNG/GIF image that will represent your websites favicon', 'infinitum'), 167 | "id" => "custom_favicon", 168 | "std" => "", 169 | "type" => "upload"); 170 | 171 | $options[] = array( "name" => __('Typography', 'infinitum'), 172 | "type" => "heading"); 173 | 174 | $options[] = array( 'name' => __('Headings', 'infinitum'), 175 | 'desc' => __('Used for H1 tag', 'infinitum'), 176 | 'id' => "heading_typography", 177 | "std" => $heading_defaults, 178 | "type" => "typography", 179 | "options" => $typography_options ); 180 | 181 | $options[] = array( "name" => __('Main Body Text', 'infinitum'), 182 | "desc" => __('Used in P tags', 'infinitum'), 183 | "id" => "main_body_typography", 184 | "std" => $typography_defaults, 185 | "type" => "typography", 186 | "options" => $typography_options ); 187 | 188 | $options[] = array( "name" => __('Website Title Color', 'infinitum'), 189 | "desc" => __('Used for website title in top navigation', 'infinitum'), 190 | "id" => "title_typography", 191 | "std" => $title_defaults, 192 | "type" => "typography", 193 | "options" => $typography_options ); 194 | 195 | $options[] = array( "name" => __('Link Color', 'infinitum'), 196 | "desc" => __('Default used if no color is selected', 'infinitum'), 197 | "id" => "link_color", 198 | "std" => "", 199 | "type" => "color"); 200 | 201 | $options[] = array( "name" => __('Link:hover Color', 'infinitum'), 202 | "desc" => __('Default used if no color is selected', 'infinitum'), 203 | "id" => "link_hover_color", 204 | "std" => "", 205 | "type" => "color"); 206 | 207 | $options[] = array( "name" => __('Link:active Color', 'infinitum'), 208 | "desc" => __('Default used if no color is selected', 'infinitum'), 209 | "id" => "link_active_color", 210 | "std" => "", 211 | "type" => "color"); 212 | 213 | $options[] = array( "name" => __('Top Nav', 'infinitum'), 214 | "type" => "heading"); 215 | 216 | $options[] = array( "name" => __('Position', 'infinitum'), 217 | "desc" => __('Fixed to the top of the window or scroll with content', 'infinitum'), 218 | "id" => "nav_position", 219 | "std" => "", 220 | "type" => "select", 221 | "class" => "mini", //mini, tiny, small 222 | "options" => $fixed_scroll); 223 | 224 | $options[] = array( "name" => __('Top nav background color', 'infinitum'), 225 | "desc" => __('Default used if no color is selected.', 'infinitum'), 226 | "id" => "top_nav_bg_color", 227 | "std" => "", 228 | "type" => "color"); 229 | 230 | $options[] = array( "name" => __('Top nav background color on hover', 'infinitum'), 231 | "desc" => __('Default used if no color is selected', 'infinitum'), 232 | "id" => "top_nav_bg_hover_color", 233 | "std" => "", 234 | "type" => "color"); 235 | 236 | $options[] = array( "name" => __('Bottom gradient color', 'infinitum'), 237 | "desc" => __('Top nav background color used as top gradient color', 'infinitum'), 238 | "id" => "top_nav_bottom_gradient_color", 239 | "std" => "", 240 | "class" => "hidden", 241 | "type" => "color"); 242 | 243 | $options[] = array( "name" => __('Top nav item color', 'infinitum'), 244 | "desc" => __('Link color', 'infinitum'), 245 | "id" => "top_nav_link_color", 246 | "std" => "", 247 | "type" => "color"); 248 | 249 | $options[] = array( "name" => __('Top nav item hover color', 'infinitum'), 250 | "desc" => __('Link hover color', 'infinitum'), 251 | "id" => "top_nav_link_hover_color", 252 | "std" => "", 253 | "type" => "color"); 254 | 255 | $options[] = array( "name" => __('Top nav dropdown item color', 'infinitum'), 256 | "desc" => __('Dropdown item color', 'infinitum'), 257 | "id" => "top_nav_dropdown_item", 258 | "std" => "", 259 | "type" => "color"); 260 | 261 | $options[] = array( "name" => __('Top nav dropdown item hover bg color', 'infinitum'), 262 | "desc" => __('Background of dropdown item hover color', 'infinitum'), 263 | "id" => "top_nav_dropdown_hover_bg", 264 | "std" => "", 265 | "type" => "color"); 266 | 267 | $options[] = array( "name" => __('Footer', 'infinitum'), 268 | "type" => "heading"); 269 | 270 | $options[] = array( "name" => __('Footer background', 'infinitum'), 271 | "desc" => __('Footer area background color', 'infinitum'), 272 | "id" => "footer_background_color", 273 | "std" => "", 274 | "type" => "color"); 275 | 276 | $options[] = array( "name" => __('Footer text color', 'infinitum'), 277 | "desc" => __('Footer area text color', 'infinitum'), 278 | "id" => "footer_text_color", 279 | "std" => "", 280 | "type" => "color"); 281 | 282 | $options[] = array( 'name' => __('Footer information', 'infinitum'), 283 | 'desc' => __('Copyright text in footer', 'infinitum'), 284 | 'id' => 'custom_footer_text', 285 | 'std' => '' . get_bloginfo( 'name', 'display' ) . '. All rights reserved.', 286 | 'class' => 'mini', 287 | 'type' => 'textarea'); 288 | 289 | $options[] = array( "name" => __('Social', 'infinitum'), 290 | "type" => "heading"); 291 | 292 | $options[] = array( "name" => __('Social Icon Color', 'infinitum'), 293 | "desc" => __('Default used if no color is selected', 'infinitum'), 294 | "id" => "social_color", 295 | "std" => "", 296 | "type" => "color"); 297 | 298 | $options[] = array( "name" => __('Social Icon:hover Color', 'infinitum'), 299 | "desc" => __('Default used if no color is selected', 'infinitum'), 300 | "id" => "social_hover_color", 301 | "std" => "", 302 | "type" => "color"); 303 | 304 | $options[] = array( 'name' => __('Add full URL for your social network profiles', 'infinitum'), 305 | 'desc' => __('Facebook', 'infinitum'), 306 | 'id' => 'social_facebook', 307 | 'std' => '', 308 | 'class' => 'mini', 309 | 'type' => 'text'); 310 | 311 | $options[] = array( 'id' => 'social_twitter', 312 | 'desc' => __('Twitter', 'infinitum'), 313 | 'std' => '', 314 | 'class' => 'mini', 315 | 'type' => 'text'); 316 | 317 | $options[] = array( 'id' => 'social_google', 318 | 'desc' => __('Google+', 'infinitum'), 319 | 'std' => '', 320 | 'class' => 'mini', 321 | 'type' => 'text'); 322 | 323 | $options[] = array( 'id' => 'social_youtube', 324 | 'desc' => __('Youtube', 'infinitum'), 325 | 'std' => '', 326 | 'class' => 'mini', 327 | 'type' => 'text'); 328 | 329 | $options[] = array( 'id' => 'social_linkedin', 330 | 'desc' => __('LinkedIn', 'infinitum'), 331 | 'std' => '', 332 | 'class' => 'mini', 333 | 'type' => 'text'); 334 | 335 | $options[] = array( 'id' => 'social_pinterest', 336 | 'desc' => __('Pinterest', 'infinitum'), 337 | 'std' => '', 338 | 'class' => 'mini', 339 | 'type' => 'text'); 340 | 341 | $options[] = array( 'id' => 'social_feed', 342 | 'desc' => __('RSS Feed', 'infinitum'), 343 | 'std' => '', 344 | 'class' => 'mini', 345 | 'type' => 'text'); 346 | 347 | $options[] = array( 'id' => 'social_tumblr', 348 | 'desc' => __('Tumblr', 'infinitum'), 349 | 'std' => '', 350 | 'class' => 'mini', 351 | 'type' => 'text'); 352 | 353 | $options[] = array( 'id' => 'social_flickr', 354 | 'desc' => __('Flickr', 'infinitum'), 355 | 'std' => '', 356 | 'class' => 'mini', 357 | 'type' => 'text'); 358 | 359 | $options[] = array( 'id' => 'social_instagram', 360 | 'desc' => __('Instagram', 'infinitum'), 361 | 'std' => '', 362 | 'class' => 'mini', 363 | 'type' => 'text'); 364 | 365 | $options[] = array( 'id' => 'social_dribbble', 366 | 'desc' => __('Dribbble', 'infinitum'), 367 | 'std' => '', 368 | 'class' => 'mini', 369 | 'type' => 'text'); 370 | 371 | $options[] = array( 'id' => 'social_skype', 372 | 'desc' => __('Skype', 'infinitum'), 373 | 'std' => '', 374 | 'class' => 'mini', 375 | 'type' => 'text'); 376 | 377 | $options[] = array( "name" => __('Other', 'infinitum'), 378 | "type" => "heading"); 379 | 380 | $options[] = array( "name" => __('Homepage jumbotron background color', 'infinitum'), 381 | "desc" => __('Default used if no color is selected', 'infinitum'), 382 | "id" => "jumbotron_bg_color", 383 | "std" => "", 384 | "type" => "color"); 385 | 386 | $options[] = array( "name" => __('Homepage jumbotron text color', 'infinitum'), 387 | "desc" => __('Default used if no color is selected', 'infinitum'), 388 | "id" => "jumbotext_color", 389 | "std" => "", 390 | "type" => "color"); 391 | 392 | $options[] = array( "name" => __('Blog page jumbotron', 'infinitum'), 393 | "desc" => __('Display blog page jumbotron', 'infinitum'), 394 | "id" => "blog_hero", 395 | "std" => "0", 396 | "type" => "checkbox"); 397 | 398 | $options[] = array( "name" => __('Custom CSS', 'infinitum'), 399 | "desc" => __('Additional CSS', 'infinitum'), 400 | "id" => "custom_css", 401 | "std" => "", 402 | "type" => "textarea"); 403 | 404 | 405 | return $options; 406 | } -------------------------------------------------------------------------------- /admin/includes/class-options-interface.php: -------------------------------------------------------------------------------- 1 | 5 | * @license GPL-2.0+ 6 | * @link http://wptheming.com 7 | * @copyright 2013 WP Theming 8 | */ 9 | 10 | class Options_Framework_Interface { 11 | 12 | /** 13 | * Generates the tabs that are used in the options menu 14 | */ 15 | static function optionsframework_tabs() { 16 | $counter = 0; 17 | $options = & Options_Framework::_optionsframework_options(); 18 | $menu = ''; 19 | 20 | foreach ( $options as $value ) { 21 | // Heading for Navigation 22 | if ( $value['type'] == "heading" ) { 23 | $counter++; 24 | $class = ''; 25 | $class = ! empty( $value['id'] ) ? $value['id'] : $value['name']; 26 | $class = preg_replace( '/[^a-zA-Z0-9._\-]/', '', strtolower($class) ) . '-tab'; 27 | $menu .= '' . esc_html( $value['name'] ) . ''; 28 | } 29 | } 30 | 31 | return $menu; 32 | } 33 | 34 | /** 35 | * Generates the options fields that are used in the form. 36 | */ 37 | static function optionsframework_fields() { 38 | 39 | global $allowedtags; 40 | $optionsframework_settings = get_option( 'optionsframework' ); 41 | 42 | // Gets the unique option id 43 | if ( isset( $optionsframework_settings['id'] ) ) { 44 | $option_name = $optionsframework_settings['id']; 45 | } 46 | else { 47 | $option_name = 'optionsframework'; 48 | }; 49 | 50 | $settings = get_option($option_name); 51 | $options = & Options_Framework::_optionsframework_options(); 52 | 53 | $counter = 0; 54 | $menu = ''; 55 | 56 | foreach ( $options as $value ) { 57 | 58 | $val = ''; 59 | $select_value = ''; 60 | $output = ''; 61 | 62 | // Wrap all options 63 | if ( ( $value['type'] != "heading" ) && ( $value['type'] != "info" ) ) { 64 | 65 | // Keep all ids lowercase with no spaces 66 | $value['id'] = preg_replace('/[^a-zA-Z0-9._\-]/', '', strtolower($value['id']) ); 67 | 68 | $id = 'section-' . $value['id']; 69 | 70 | $class = 'section'; 71 | if ( isset( $value['type'] ) ) { 72 | $class .= ' section-' . $value['type']; 73 | } 74 | if ( isset( $value['class'] ) ) { 75 | $class .= ' ' . $value['class']; 76 | } 77 | 78 | $output .= '
'."\n"; 79 | if ( isset( $value['name'] ) ) { 80 | $output .= '

' . esc_html( $value['name'] ) . '

' . "\n"; 81 | } 82 | if ( $value['type'] != 'editor' ) { 83 | $output .= '
' . "\n" . '
' . "\n"; 84 | } 85 | else { 86 | $output .= '
' . "\n" . '
' . "\n"; 87 | } 88 | } 89 | 90 | // Set default value to $val 91 | if ( isset( $value['std'] ) ) { 92 | $val = $value['std']; 93 | } 94 | 95 | // If the option is already saved, override $val 96 | if ( ( $value['type'] != 'heading' ) && ( $value['type'] != 'info') ) { 97 | if ( isset( $settings[($value['id'])]) ) { 98 | $val = $settings[($value['id'])]; 99 | // Striping slashes of non-array options 100 | if ( !is_array($val) ) { 101 | $val = stripslashes( $val ); 102 | } 103 | } 104 | } 105 | 106 | // If there is a description save it for labels 107 | $explain_value = ''; 108 | if ( isset( $value['desc'] ) ) { 109 | $explain_value = $value['desc']; 110 | } 111 | 112 | if ( has_filter( 'optionsframework_' . $value['type'] ) ) { 113 | $output .= apply_filters( 'optionsframework_' . $value['type'], $option_name, $value, $val ); 114 | } 115 | 116 | 117 | switch ( $value['type'] ) { 118 | 119 | // Basic text input 120 | case 'text': 121 | $output .= ''; 122 | break; 123 | 124 | // Password input 125 | case 'password': 126 | $output .= ''; 127 | break; 128 | 129 | // Textarea 130 | case 'textarea': 131 | $rows = '8'; 132 | 133 | if ( isset( $value['settings']['rows'] ) ) { 134 | $custom_rows = $value['settings']['rows']; 135 | if ( is_numeric( $custom_rows ) ) { 136 | $rows = $custom_rows; 137 | } 138 | } 139 | 140 | $val = stripslashes( $val ); 141 | $output .= ''; 142 | break; 143 | 144 | // Select Box 145 | case 'select': 146 | $output .= ''; 152 | break; 153 | 154 | 155 | // Radio Box 156 | case "radio": 157 | $name = $option_name .'['. $value['id'] .']'; 158 | foreach ($value['options'] as $key => $option) { 159 | $id = $option_name . '-' . $value['id'] .'-'. $key; 160 | $output .= ''; 161 | } 162 | break; 163 | 164 | // Image Selectors 165 | case "images": 166 | $name = $option_name .'['. $value['id'] .']'; 167 | foreach ( $value['options'] as $key => $option ) { 168 | $selected = ''; 169 | if ( $val != '' && ($val == $key) ) { 170 | $selected = ' of-radio-img-selected'; 171 | } 172 | $output .= ''; 173 | $output .= '
' . esc_html( $key ) . '
'; 174 | $output .= '' . $option .''; 175 | } 176 | break; 177 | 178 | // Checkbox 179 | case "checkbox": 180 | $output .= ''; 181 | $output .= ''; 182 | break; 183 | 184 | // Multicheck 185 | case "multicheck": 186 | foreach ($value['options'] as $key => $option) { 187 | $checked = ''; 188 | $label = $option; 189 | $option = preg_replace('/[^a-zA-Z0-9._\-]/', '', strtolower($key)); 190 | 191 | $id = $option_name . '-' . $value['id'] . '-'. $option; 192 | $name = $option_name . '[' . $value['id'] . '][' . $option .']'; 193 | 194 | if ( isset($val[$option]) ) { 195 | $checked = checked($val[$option], 1, false); 196 | } 197 | 198 | $output .= ''; 199 | } 200 | break; 201 | 202 | // Color picker 203 | case "color": 204 | $default_color = ''; 205 | if ( isset($value['std']) ) { 206 | if ( $val != $value['std'] ) 207 | $default_color = ' data-default-color="' .$value['std'] . '" '; 208 | } 209 | $output .= ''; 210 | 211 | break; 212 | 213 | // Uploader 214 | case "upload": 215 | $output .= Options_Framework_Media_Uploader::optionsframework_uploader( $value['id'], $val, null ); 216 | 217 | break; 218 | 219 | // Typography 220 | case 'typography': 221 | 222 | unset( $font_size, $font_style, $font_face, $font_color ); 223 | 224 | $typography_defaults = array( 225 | 'size' => '', 226 | 'face' => '', 227 | 'style' => '', 228 | 'color' => '' 229 | ); 230 | 231 | $typography_stored = wp_parse_args( $val, $typography_defaults ); 232 | 233 | $typography_options = array( 234 | 'sizes' => of_recognized_font_sizes(), 235 | 'faces' => of_recognized_font_faces(), 236 | 'styles' => of_recognized_font_styles(), 237 | 'color' => true 238 | ); 239 | 240 | if ( isset( $value['options'] ) ) { 241 | $typography_options = wp_parse_args( $value['options'], $typography_options ); 242 | } 243 | 244 | // Font Size 245 | if ( $typography_options['sizes'] ) { 246 | $font_size = ''; 253 | } 254 | 255 | // Font Face 256 | if ( $typography_options['faces'] ) { 257 | $font_face = ''; 263 | } 264 | 265 | // Font Styles 266 | if ( $typography_options['styles'] ) { 267 | $font_style = ''; 273 | } 274 | 275 | // Font Color 276 | if ( $typography_options['color'] ) { 277 | $default_color = ''; 278 | if ( isset($value['std']['color']) ) { 279 | if ( $val != $value['std']['color'] ) 280 | $default_color = ' data-default-color="' .$value['std']['color'] . '" '; 281 | } 282 | $font_color = ''; 283 | } 284 | 285 | // Allow modification/injection of typography fields 286 | $typography_fields = compact( 'font_size', 'font_face', 'font_style', 'font_color' ); 287 | $typography_fields = apply_filters( 'of_typography_fields', $typography_fields, $typography_stored, $option_name, $value ); 288 | $output .= implode( '', $typography_fields ); 289 | 290 | break; 291 | 292 | // Background 293 | case 'background': 294 | 295 | $background = $val; 296 | 297 | // Background Color 298 | $default_color = ''; 299 | if ( isset( $value['std']['color'] ) ) { 300 | if ( $val != $value['std']['color'] ) 301 | $default_color = ' data-default-color="' .$value['std']['color'] . '" '; 302 | } 303 | $output .= ''; 304 | 305 | // Background Image 306 | if ( !isset($background['image']) ) { 307 | $background['image'] = ''; 308 | } 309 | 310 | $output .= Options_Framework_Media_Uploader::optionsframework_uploader( $value['id'], $background['image'], null, esc_attr( $option_name . '[' . $value['id'] . '][image]' ) ); 311 | 312 | $class = 'of-background-properties'; 313 | if ( '' == $background['image'] ) { 314 | $class .= ' hide'; 315 | } 316 | $output .= '
'; 317 | 318 | // Background Repeat 319 | $output .= ''; 326 | 327 | // Background Position 328 | $output .= ''; 335 | 336 | // Background Attachment 337 | $output .= ''; 344 | $output .= '
'; 345 | 346 | break; 347 | 348 | // Editor 349 | case 'editor': 350 | $output .= '
' . wp_kses( $explain_value, $allowedtags ) . '
'."\n"; 351 | echo $output; 352 | $textarea_name = esc_attr( $option_name . '[' . $value['id'] . ']' ); 353 | $default_editor_settings = array( 354 | 'textarea_name' => $textarea_name, 355 | 'media_buttons' => false, 356 | 'tinymce' => array( 'plugins' => 'wordpress' ) 357 | ); 358 | $editor_settings = array(); 359 | if ( isset( $value['settings'] ) ) { 360 | $editor_settings = $value['settings']; 361 | } 362 | $editor_settings = array_merge( $default_editor_settings, $editor_settings ); 363 | wp_editor( $val, $value['id'], $editor_settings ); 364 | $output = ''; 365 | break; 366 | 367 | // Info 368 | case "info": 369 | $id = ''; 370 | $class = 'section'; 371 | if ( isset( $value['id'] ) ) { 372 | $id = 'id="' . esc_attr( $value['id'] ) . '" '; 373 | } 374 | if ( isset( $value['type'] ) ) { 375 | $class .= ' section-' . $value['type']; 376 | } 377 | if ( isset( $value['class'] ) ) { 378 | $class .= ' ' . $value['class']; 379 | } 380 | 381 | $output .= '
' . "\n"; 382 | if ( isset($value['name']) ) { 383 | $output .= '

' . esc_html( $value['name'] ) . '

' . "\n"; 384 | } 385 | if ( $value['desc'] ) { 386 | $output .= apply_filters('of_sanitize_info', $value['desc'] ) . "\n"; 387 | } 388 | $output .= '
' . "\n"; 389 | break; 390 | 391 | // Heading for Navigation 392 | case "heading": 393 | $counter++; 394 | if ( $counter >= 2 ) { 395 | $output .= '
'."\n"; 396 | } 397 | $class = ''; 398 | $class = ! empty( $value['id'] ) ? $value['id'] : $value['name']; 399 | $class = preg_replace('/[^a-zA-Z0-9._\-]/', '', strtolower($class) ); 400 | $output .= '
'; 401 | $output .= '

' . esc_html( $value['name'] ) . '

' . "\n"; 402 | break; 403 | } 404 | 405 | if ( ( $value['type'] != "heading" ) && ( $value['type'] != "info" ) ) { 406 | $output .= '
'; 407 | if ( ( $value['type'] != "checkbox" ) && ( $value['type'] != "editor" ) ) { 408 | $output .= '
' . wp_kses( $explain_value, $allowedtags) . '
'."\n"; 409 | } 410 | $output .= '
'."\n"; 411 | } 412 | 413 | echo $output; 414 | } 415 | 416 | // Outputs closing div if there tabs 417 | if ( Options_Framework_Interface::optionsframework_tabs() != '' ) { 418 | echo '
'; 419 | } 420 | } 421 | 422 | } -------------------------------------------------------------------------------- /library/css/ie.css: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | Site Name: 3 | Author: 4 | 5 | Stylesheet: IE Stylesheet 6 | 7 | So instead of using the respond.js file to add media query support 8 | to IE, we're going to use SASS to create an easily readable css file. 9 | Here, we import all the styles the standard stylesheet gets, only 10 | without the media queries. No need to worry about editing anything! 11 | 12 | ******************************************************************/ 13 | /* 14 | Remember, all the BASE styles are called already since IE can 15 | read those. Below, we need to import only the stuff IE can't 16 | understand (what's inside the media queries). We also need to 17 | import the mixins file so SASS can understand the variables. 18 | */ 19 | /* import mixins */ 20 | /****************************************************************** 21 | Site Name: 22 | Author: 23 | 24 | Stylesheet: Mixins & Constants Stylesheet 25 | 26 | This is where you can take advantage of Sass' great features: 27 | Mixins & Constants. I won't go in-depth on how they work exactly, 28 | there are a few articles below that will help do that. What I will 29 | tell you is that this will help speed up simple changes like 30 | changing a color or adding CSS3 techniques gradients. 31 | 32 | A WORD OF WARNING: It's very easy to overdo it here. Be careful and 33 | remember less is more. 34 | 35 | ******************************************************************/ 36 | /********************* 37 | CLEARFIXIN' 38 | *********************/ 39 | .clearfix { 40 | zoom: 1; } 41 | .clearfix:before, .clearfix:after { 42 | content: ""; 43 | display: table; } 44 | .clearfix:after { 45 | clear: both; } 46 | 47 | /********************* 48 | TOOLS 49 | *********************/ 50 | * { 51 | -webkit-box-sizing: border-box; 52 | -moz-box-sizing: border-box; 53 | box-sizing: border-box; } 54 | 55 | .image-replacement { 56 | text-indent: 100%; 57 | white-space: nowrap; 58 | overflow: hidden; } 59 | 60 | /********************* 61 | COLORS 62 | Need help w/ choosing your colors? Try this site out: 63 | http://0to255.com/ 64 | *********************/ 65 | /* 66 | Here's a great tutorial on how to 67 | use color variables properly: 68 | http://sachagreif.com/sass-color-variables/ 69 | */ 70 | /********************* 71 | TYPOGRAPHY 72 | *********************/ 73 | /* To embed your own fonts, use this syntax 74 | and place your fonts inside the 75 | library/fonts folder. For more information 76 | on embedding fonts, go to: 77 | http://www.fontsquirrel.com/ 78 | Be sure to remove the comment brackets. 79 | */ 80 | /* @font-face { 81 | font-family: 'Font Name'; 82 | src: url('library/fonts/font-name.eot'); 83 | src: url('library/fonts/font-name.eot?#iefix') format('embedded-opentype'), 84 | url('library/fonts/font-name.woff') format('woff'), 85 | url('library/fonts/font-name.ttf') format('truetype'), 86 | url('library/fonts/font-name.svg#font-name') format('svg'); 87 | font-weight: normal; 88 | font-style: normal; 89 | } 90 | */ 91 | /* 92 | use the best ampersand 93 | http://simplebits.com/notebook/2008/08/14/ampersands-2/ 94 | */ 95 | span.amp { 96 | font-family: Baskerville,'Goudy Old Style',Palatino,'Book Antiqua',serif !important; 97 | font-style: italic; } 98 | 99 | .text-left { 100 | text-align: left; } 101 | 102 | .text-center { 103 | text-align: center; } 104 | 105 | .text-right { 106 | text-align: right; } 107 | 108 | .alert-help, .alert-info, .alert-error, .alert-success { 109 | margin: 10px; 110 | padding: 5px 18px; 111 | border: 1px solid; } 112 | 113 | .alert-help { 114 | border-color: #e8dc59; 115 | background: #ebe16f; } 116 | 117 | .alert-info { 118 | border-color: #bfe4f4; 119 | background: #d5edf8; } 120 | 121 | .alert-error { 122 | border-color: #f8cdce; 123 | background: #fbe3e4; } 124 | 125 | .alert-success { 126 | border-color: #deeaae; 127 | background: #e6efc2; } 128 | 129 | /********************* 130 | TRANSITION 131 | *********************/ 132 | /* 133 | I totally rewrote this to be cleaner and easier to use. 134 | You'll need to be using Sass 3.2+ for these to work. 135 | Thanks to @anthonyshort for the inspiration on these. 136 | USAGE: @include transition(all 0.2s ease-in-out); 137 | */ 138 | /********************* 139 | CSS3 GRADIENTS 140 | Be careful with these since they can 141 | really slow down your CSS. Don't overdue it. 142 | *********************/ 143 | /* @include css-gradient(#dfdfdf,#f8f8f8); */ 144 | /********************* 145 | BOX SIZING 146 | *********************/ 147 | /* @include box-sizing(border-box); */ 148 | /* NOTE: value of "padding-box" is only supported in Gecko. So 149 | probably best not to use it. I mean, were you going to anyway? */ 150 | /********************* 151 | BUTTONS 152 | *********************/ 153 | .button, .button:visited { 154 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 155 | border: 1px solid #be0d37; 156 | border-top-color: #db0f3f; 157 | border-left-color: #db0f3f; 158 | padding: 4px 12px; 159 | color: white; 160 | display: inline-block; 161 | font-size: 11px; 162 | font-weight: bold; 163 | text-decoration: none; 164 | text-shadow: 0 1px rgba(0, 0, 0, 0.75); 165 | cursor: pointer; 166 | margin-bottom: 20px; 167 | line-height: 21px; 168 | border-radius: 4px; 169 | background-color: #e40f42; 170 | background-image: -webkit-gradient(linear, left top, left bottom, from(#f01d4f), to(#e40f42)); 171 | background-image: -webkit-linear-gradient(top, #f01d4f, #e40f42); 172 | background-image: -moz-linear-gradient(top, #f01d4f, #e40f42); 173 | background-image: -o-linear-gradient(top, #f01d4f, #e40f42); 174 | background-image: linear-gradient(to bottom, #f01d4f, #e40f42); } 175 | .button:hover, .button:focus, .button:visited:hover, .button:visited:focus { 176 | color: white; 177 | border: 1px solid #be0d37; 178 | border-top-color: #9d0a2d; 179 | border-left-color: #9d0a2d; 180 | background-color: #cc0e3b; 181 | background-image: -webkit-gradient(linear, left top, left bottom, from(#e40f42), to(#cc0e3b)); 182 | background-image: -webkit-linear-gradient(top, #e40f42, #cc0e3b); 183 | background-image: -moz-linear-gradient(top, #e40f42, #cc0e3b); 184 | background-image: -o-linear-gradient(top, #e40f42, #cc0e3b); 185 | background-image: linear-gradient(to bottom, #e40f42, #cc0e3b); } 186 | .button:active, .button:visited:active { 187 | background-color: #f01d4f; 188 | background-image: -webkit-gradient(linear, left top, left bottom, from(#e40f42), to(#f01d4f)); 189 | background-image: -webkit-linear-gradient(top, #e40f42, #f01d4f); 190 | background-image: -moz-linear-gradient(top, #e40f42, #f01d4f); 191 | background-image: -o-linear-gradient(top, #e40f42, #f01d4f); 192 | background-image: linear-gradient(to bottom, #e40f42, #f01d4f); } 193 | 194 | .blue-button, .blue-button:visited { 195 | border-color: #1472ad; 196 | text-shadow: 0 1px 1px #1472ad; 197 | background-color: #1681c4; 198 | background-image: -webkit-gradient(linear, left top, left bottom, from(#1990db), to(#1681c4)); 199 | background-image: -webkit-linear-gradient(top, #1990db, #1681c4); 200 | background-image: -moz-linear-gradient(top, #1990db, #1681c4); 201 | background-image: -o-linear-gradient(top, #1990db, #1681c4); 202 | background-image: linear-gradient(to bottom, #1990db, #1681c4); 203 | box-shadow: inset 0 0 3px #59b3ec; } 204 | .blue-button:hover, .blue-button:focus, .blue-button:visited:hover, .blue-button:visited:focus { 205 | border-color: #116396; 206 | background-color: #1472ad; 207 | background-image: -webkit-gradient(linear, left top, left bottom, from(#1784c9), to(#1472ad)); 208 | background-image: -webkit-linear-gradient(top, #1784c9, #1472ad); 209 | background-image: -moz-linear-gradient(top, #1784c9, #1472ad); 210 | background-image: -o-linear-gradient(top, #1784c9, #1472ad); 211 | background-image: linear-gradient(to bottom, #1784c9, #1472ad); } 212 | .blue-button:active, .blue-button:visited:active { 213 | background-color: #1990db; 214 | background-image: -webkit-gradient(linear, left top, left bottom, from(#1681c4), to(#1990db)); 215 | background-image: -webkit-linear-gradient(top, #1681c4, #1990db); 216 | background-image: -moz-linear-gradient(top, #1681c4, #1990db); 217 | background-image: -o-linear-gradient(top, #1681c4, #1990db); 218 | background-image: linear-gradient(to bottom, #1681c4, #1990db); } 219 | 220 | /****************************************************************** 221 | Site Name: 222 | Author: 223 | 224 | Stylesheet: Grid Stylesheet 225 | 226 | I've seperated the grid so you can swap it out easily. It's 227 | called at the top the style.scss stylesheet. 228 | 229 | There are a ton of grid solutions out there. You should definitely 230 | experiment with your own. Here are some recommendations: 231 | 232 | http://gridsetapp.com - Love this site. Responsive Grids made easy. 233 | http://susy.oddbird.net/ - Grids using Compass. Very elegant. 234 | http://gridpak.com/ - Create your own responsive grid. 235 | 236 | The grid below is a combination of the 1140 grid and Twitter Boostrap. 237 | I liked 1140 but Boostrap's grid was way more detailed so I merged them 238 | together, let's see how this works out. If you want to use 1140, the original 239 | values are commented out on each line. 240 | 241 | ******************************************************************/ 242 | .onecol { 243 | width: 5.801104972%; } 244 | 245 | /* 4.85%; } /* grid_1 */ 246 | .twocol { 247 | width: 14.364640883%; } 248 | 249 | /* 13.45%; } /* grid_2 */ 250 | .threecol { 251 | width: 22.928176794%; } 252 | 253 | /* 22.05%; } /* grid_3 */ 254 | .fourcol { 255 | width: 31.491712705%; } 256 | 257 | /* 30.75%; } /* grid_4 */ 258 | .fivecol { 259 | width: 40.055248616%; } 260 | 261 | /* 39.45%; } /* grid_5 */ 262 | .sixcol { 263 | width: 48.618784527%; } 264 | 265 | /* 48%; } /* grid_6 */ 266 | .sevencol { 267 | width: 57.182320438000005%; } 268 | 269 | /* 56.75%; } /* grid_7 */ 270 | .eightcol { 271 | width: 65.74585634900001%; } 272 | 273 | /* 65.4%; } /* grid_8 */ 274 | .ninecol { 275 | width: 74.30939226%; } 276 | 277 | /* 74.05%; } /* grid_9 */ 278 | .tencol { 279 | width: 82.87292817100001%; } 280 | 281 | /* 82.7%; } /* grid_10 */ 282 | .elevencol { 283 | width: 91.436464082%; } 284 | 285 | /* 91.35%; } /* grid_11 */ 286 | .twelvecol { 287 | width: 99.999999993%; } 288 | 289 | /* 100%; } /* grid_12 */ 290 | .onecol, .twocol, .threecol, .fourcol, .fivecol, .sixcol, .sevencol, .eightcol, .ninecol, .tencol, .elevencol, .twelvecol { 291 | position: relative; 292 | float: left; 293 | margin-left: 2.762430939%; } 294 | 295 | .first { 296 | margin-left: 0; } 297 | 298 | .last { 299 | float: right; } 300 | 301 | /****************************************************************** 302 | Site Name: 303 | Author: 304 | 305 | Stylesheet: 481px and Up Stylesheet 306 | 307 | This stylesheet is loaded for larger devices. It's set to 308 | 481px because at 480px it would load on a landscaped iPhone. 309 | This isn't ideal because then you would be loading all those 310 | extra styles on that same mobile connection. 311 | 312 | A word of warning. This size COULD be a larger mobile device, 313 | so you still want to keep it pretty light and simply expand 314 | upon your base.scss styles. 315 | 316 | ******************************************************************/ 317 | /********************* 318 | NAVIGATION STYLES 319 | *********************/ 320 | /* .menu is clearfixed inside mixins.scss */ 321 | .menu { 322 | /* end .menu ul */ } 323 | .menu ul { 324 | /* end .menu ul li */ 325 | /* highlight current page */ 326 | /* end current highlighters */ } 327 | .menu ul li { 328 | /* 329 | plan your menus and drop-downs wisely. 330 | */ } 331 | .menu ul li a { 332 | /* 333 | you can use hover styles here even though this size 334 | has the possibility of being a mobile device. 335 | */ } 336 | 337 | /* end .menu */ 338 | /********************* 339 | POSTS & CONTENT STYLES 340 | *********************/ 341 | /* entry content */ 342 | .entry-content { 343 | /* at this larger size, we can start to align images */ } 344 | .entry-content .alignleft, .entry-content img.alignleft { 345 | margin-right: 1.5em; 346 | display: inline; 347 | float: left; } 348 | .entry-content .alignright, .entry-content img.alignright { 349 | margin-left: 1.5em; 350 | display: inline; 351 | float: right; } 352 | .entry-content .aligncenter, .entry-content img.aligncenter { 353 | margin-right: auto; 354 | margin-left: auto; 355 | display: block; 356 | clear: both; } 357 | 358 | /* end .entry-content */ 359 | /********************* 360 | FOOTER STYLES 361 | *********************/ 362 | /* 363 | check your menus here. do they look good? 364 | do they need tweaking? 365 | */ 366 | /* end .footer-links */ 367 | /****************************************************************** 368 | Site Name: 369 | Author: 370 | 371 | Stylesheet: Tablet & Small Desktop Stylesheet 372 | 373 | Here's where you can start getting into the good stuff. 374 | This size will work on iPads, other tablets, and desktops. 375 | So you can start working with more styles, background images, 376 | and other resources. You'll also notice the grid starts to 377 | come into play. Have fun! 378 | 379 | ******************************************************************/ 380 | /********************* 381 | GENERAL STYLES 382 | *********************/ 383 | /********************* 384 | LAYOUT & GRID STYLES 385 | *********************/ 386 | .wrap { 387 | max-width: 1140px; } 388 | 389 | /********************* 390 | HEADER STYLES 391 | *********************/ 392 | /********************* 393 | NAVIGATION STYLES 394 | *********************/ 395 | .nav { 396 | background: #eee; 397 | border: 0; 398 | /* end .menu ul li */ 399 | /* highlight current page */ 400 | /* end current highlighters */ } 401 | .nav li { 402 | float: left; 403 | position: relative; 404 | /* 405 | plan your menus and drop-downs wisely. 406 | */ 407 | /* showing sub-menus */ } 408 | .nav li a { 409 | border-bottom: 0; 410 | /* 411 | you can use hover styles here even though this size 412 | has the possibility of being a mobile device. 413 | */ } 414 | .nav li a:hover, .nav li a:focus { 415 | background-color: #dedede; } 416 | .nav li ul.sub-menu, 417 | .nav li ul.children { 418 | margin-top: 0; 419 | border: 1px solid #ccc; 420 | border-top: 0; 421 | position: absolute; 422 | display: none; 423 | z-index: 8999; 424 | /* highlight sub-menu current page */ } 425 | .nav li ul.sub-menu li, 426 | .nav li ul.children li { 427 | /* 428 | if you need to go deeper, go nuts 429 | just remember deeper menus suck 430 | for usability. k, bai. 431 | */ } 432 | .nav li ul.sub-menu li a, 433 | .nav li ul.children li a { 434 | padding-left: 10px; 435 | border-right: 0; 436 | display: block; 437 | width: 180px; 438 | border-bottom: 1px solid #ccc; } 439 | .nav li ul.sub-menu li:last-child a, 440 | .nav li ul.children li:last-child a { 441 | border-bottom: 0; } 442 | .nav li:hover ul { 443 | top: auto; 444 | display: block; } 445 | 446 | /* end .nav */ 447 | /********************* 448 | SIDEBARS & ASIDES 449 | *********************/ 450 | .sidebar { 451 | margin-top: 2.2em; } 452 | 453 | .widgettitle { 454 | border-bottom: 2px solid #444; 455 | margin-bottom: 0.75em; } 456 | 457 | .widget { 458 | padding: 0 10px; 459 | margin: 2.2em 0; } 460 | .widget ul li { 461 | margin-bottom: 0.75em; 462 | /* deep nesting */ } 463 | .widget ul li ul { 464 | margin-top: 0.75em; 465 | padding-left: 1em; } 466 | 467 | /* links widget */ 468 | /* meta widget */ 469 | /* pages widget */ 470 | /* recent-posts widget */ 471 | /* archives widget */ 472 | /* tag-cloud widget */ 473 | /* calendar widget */ 474 | /* category widget */ 475 | /* recent-comments widget */ 476 | /* search widget */ 477 | /* text widget */ 478 | /********************* 479 | FOOTER STYLES 480 | *********************/ 481 | /* 482 | you'll probably need to do quite a bit 483 | of overriding here if you styled them for 484 | mobile. Make sure to double check these! 485 | */ 486 | .footer-links ul li { 487 | /* 488 | be careful with the depth of your menus. 489 | it's very rare to have multi-depth menus in 490 | the footer. 491 | */ } 492 | 493 | /* end .footer-links */ 494 | /****************************************************************** 495 | Site Name: 496 | Author: 497 | 498 | Stylesheet: Desktop Stylsheet 499 | 500 | This is the desktop size. It's larger than an iPad so it will only 501 | be seen on the Desktop. 502 | 503 | ******************************************************************/ 504 | /* 505 | you can call the larger styles if you want, but there's really no need 506 | */ 507 | /****************************************************************** 508 | ADDITIONAL IE FIXES 509 | These fixes are now ONLY seen by IE, so you don't have to worry 510 | about using prefixes, although it's best practice. For more info 511 | on using Modernizr classes, check out this link: 512 | http://www.modernizr.com/docs/ 513 | ******************************************************************/ 514 | /* 515 | For example, you can use something like: 516 | 517 | .no-textshadow .class { ... } 518 | 519 | You can also target specific versions by using the classes applied to 520 | the html element. These can sometimes change, so take a look inside the 521 | header.php file to see what they are: 522 | 523 | 524 | .lt-ie8 .class { ... } 525 | 526 | */ 527 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | {description} 294 | Copyright (C) {year} {fullname} 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | {signature of Ty Coon}, 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | --------------------------------------------------------------------------------