├── 404.php ├── archive.php ├── author.php ├── category.php ├── comments.php ├── content-aside.php ├── content-gallery.php ├── content-image.php ├── content-page.php ├── content-single.php ├── content.php ├── css ├── cvar_blue.css ├── cvar_blue.png ├── red.css └── red.png ├── footer.php ├── functions.php ├── header.php ├── index.php ├── js └── html5.js ├── library ├── admin │ ├── Minify │ │ ├── CommentPreserver.php │ │ └── Compressor.php │ ├── admin.php │ ├── meta-box-archive-display.php │ ├── meta-box-style-css-compression.php │ ├── meta-box-theme-about.php │ ├── meta-box-theme-css-variations.php │ ├── meta-box-theme-font.php │ ├── meta-box-theme-footer.php │ ├── meta-box-theme-logo-and-favicon.php │ └── theme-settings.php ├── bareskin.php ├── css │ ├── 2c-l-fixed.css │ ├── 2c-r-fixed.css │ ├── 3c-fixed.css │ ├── admin.css │ ├── reset.css │ └── responsive.css ├── functions │ ├── breadcrumb-trail.php │ ├── color_variation.php │ ├── comments.php │ ├── content.php │ ├── core.php │ ├── fonts.php │ ├── get-the-image.php │ ├── menus.php │ ├── shortcodes.php │ ├── sidebars.php │ └── widgets.php └── widgets │ ├── widget_adv_recent_posts.php │ ├── widget_advanced_text.php │ └── widget_advertisment.php ├── loop-nav.php ├── menu-primary.php ├── page.php ├── readme.txt ├── search.php ├── searchform.php ├── sidebar-after-content.php ├── sidebar-before-content.php ├── sidebar-subsidiary.php ├── sidebar.php ├── single.php ├── style.css ├── tag.php └── tpl_full-width-page.php /404.php: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 |
13 | 14 |
15 |
16 |

17 |
18 | 19 |
20 |

21 | 22 | 23 | 24 |
25 |
26 | 27 |
28 |
29 | 30 | -------------------------------------------------------------------------------- /archive.php: -------------------------------------------------------------------------------- 1 | 16 | 17 |
18 |
19 | 20 | 21 | 22 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 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 | -------------------------------------------------------------------------------- /author.php: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 |
13 | 14 | 15 | 16 | 25 | 26 | 29 | 30 | 37 | 38 | 39 | 40 | 41 | 42 | 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 | -------------------------------------------------------------------------------- /category.php: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 |
13 | 14 | 15 | 16 |
' ); 25 | ?> 26 | 27 | 28 | 29 | 30 | 31 | 32 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 |
47 |
48 |

49 |
50 | 51 |
52 |

53 | 54 |
55 |
56 | 57 | 58 | 59 | 60 |
61 | 62 | 63 | -------------------------------------------------------------------------------- /comments.php: -------------------------------------------------------------------------------- 1 | 15 |
16 | 17 |

18 |
19 | 27 | 28 | 29 | 30 | 31 |

32 | ' . get_the_title() . '' ); 35 | ?> 36 |

37 | 38 | 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?> 39 | 44 | 45 | 46 |
    47 | 'bareskin_comment' ) ); 52 | ?> 53 |
54 | 55 | 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?> 56 | 61 | 62 | 63 | 69 |

70 | 71 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /content-aside.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
> 13 |
14 |

15 |
16 | 17 | 18 |
19 | 20 |
21 | 22 |
23 | →', bareskin_get_textdomain() ) ); ?> 24 | '' ) ); ?> 25 |
26 | 27 | 28 | 33 | 34 |
35 | -------------------------------------------------------------------------------- /content-gallery.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
> 13 |
14 |

15 | 16 | 21 |
22 | 23 | 24 |
25 | 26 |
27 | 28 |
29 | 30 | →', bareskin_get_textdomain() ) ); ?> 31 | 32 | 33 | $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC' ) ); 35 | if ( $images ) : 36 | $total_images = count( $images ); 37 | $image = array_shift( $images ); 38 | $image_img_tag = wp_get_attachment_image( $image->ID, 'thumbnail' ); 39 | ?> 40 | 41 | 44 | 45 |

%2$s photo.', 'This gallery contains %2$s photos.', $total_images, bareskin_get_textdomain() ), 46 | 'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', bareskin_get_textdomain() ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"', 47 | number_format_i18n( $total_images ) 48 | ); ?>

49 | 50 | 51 | 52 | '' ) ); ?> 53 |
54 | 55 | 56 | 61 | 62 |
63 | -------------------------------------------------------------------------------- /content-image.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
> 13 |
14 |

15 |
16 | 17 |
18 | →', bareskin_get_textdomain() ) ); ?> 19 | '' ) ); ?> 20 |
21 | 22 | 27 | 28 |
29 | -------------------------------------------------------------------------------- /content-page.php: -------------------------------------------------------------------------------- 1 | 10 | 11 |
> 12 |
13 |

14 |
15 | 16 |
17 | 18 | '' ) ); ?> 19 | ', '' ); ?> 20 |
21 |
22 | -------------------------------------------------------------------------------- /content-single.php: -------------------------------------------------------------------------------- 1 | 7 | 8 |
> 9 |
10 |

11 | 12 | 17 | 18 |
19 | 20 |
21 | 22 | '' ) ); ?> 23 |
24 | 25 | 30 | 31 |
32 | -------------------------------------------------------------------------------- /content.php: -------------------------------------------------------------------------------- 1 | 7 | 8 |
> 9 |
10 |

11 | 12 | 17 | 18 |
19 | 20 | 21 |
22 | 'alignleft' ) ); ?> 23 | 24 |
25 | 26 |
27 | →', bareskin_get_textdomain() ) ); ?> 28 | '' ) ); ?> 29 |
30 | 31 | 32 | 37 | 38 |
39 | -------------------------------------------------------------------------------- /css/cvar_blue.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madalinungureanu/bareskin/2df5b64feec22aec494ab24e0fd4b823863ba275/css/cvar_blue.css -------------------------------------------------------------------------------- /css/cvar_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madalinungureanu/bareskin/2df5b64feec22aec494ab24e0fd4b823863ba275/css/cvar_blue.png -------------------------------------------------------------------------------- /css/red.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madalinungureanu/bareskin/2df5b64feec22aec494ab24e0fd4b823863ba275/css/red.css -------------------------------------------------------------------------------- /css/red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madalinungureanu/bareskin/2df5b64feec22aec494ab24e0fd4b823863ba275/css/red.png -------------------------------------------------------------------------------- /footer.php: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /functions.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /header.php: -------------------------------------------------------------------------------- 1 | section and everything up till
6 | * 7 | * @package WordPress 8 | * @subpackage BareSkin 9 | * 10 | */ 11 | ?> 12 | 15 | 18 | 21 | 22 | > 23 | 24 | 25 | 26 | 27 | <?php 28 | /* 29 | * Print the <title> tag based on what is being viewed. 30 | */ 31 | global $page, $paged; 32 | 33 | wp_title( '|', true, 'right' ); 34 | 35 | // Add the blog name. 36 | bloginfo( 'name' ); 37 | 38 | // Add the blog description for the home/front page. 39 | $site_description = get_bloginfo( 'description', 'display' ); 40 | if ( $site_description && ( is_home() || is_front_page() ) ) 41 | echo " | $site_description"; 42 | 43 | // Add a page number if necessary: 44 | if ( $paged >= 2 || $page >= 2 ) 45 | echo ' | ' . sprintf( __( 'Page %s', bareskin_get_textdomain() ), max( $paged, $page ) ); 46 | 47 | ?> 48 | 49 | 57 | 58 | 62 | 63 | 68 | 69 | 72 | 73 | 74 | 77 | 78 | 79 | 80 | 81 | > 82 |
83 | 101 |
102 |
-------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 16 | 17 |
18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 | 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 | -------------------------------------------------------------------------------- /js/html5.js: -------------------------------------------------------------------------------- 1 | // html5shiv MIT @rem remysharp.com/html5-enabling-script 2 | // iepp v1.6.2 MIT @jon_neal iecss.com/print-protector 3 | /*@cc_on(function(a,b){function r(a){var b=-1;while(++b";return a.childNodes.length!==1}())){a.iepp=a.iepp||{};var c=a.iepp,d=c.html5elements||"abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",e=d.split("|"),f=e.length,g=new RegExp("(^|\\s)("+d+")","gi"),h=new RegExp("<(/*)("+d+")","gi"),i=/^\s*[\{\}]\s*$/,j=new RegExp("(^|[^\\n]*?\\s)("+d+")([^\\n]*)({[\\n\\w\\W]*?})","gi"),k=b.createDocumentFragment(),l=b.documentElement,m=l.firstChild,n=b.createElement("body"),o=b.createElement("style"),p=/print|all/,q;c.getCSS=function(a,b){if(a+""===undefined)return"";var d=-1,e=a.length,f,g=[];while(++d 12 | */ 13 | class Minify_CommentPreserver { 14 | 15 | /** 16 | * String to be prepended to each preserved comment 17 | * 18 | * @var string 19 | */ 20 | public static $prepend = "\n"; 21 | 22 | /** 23 | * String to be appended to each preserved comment 24 | * 25 | * @var string 26 | */ 27 | public static $append = "\n"; 28 | 29 | /** 30 | * Process a string outside of C-style comments that begin with "/*!" 31 | * 32 | * On each non-empty string outside these comments, the given processor 33 | * function will be called. The first "!" will be removed from the 34 | * preserved comments, and the comments will be surrounded by 35 | * Minify_CommentPreserver::$preprend and Minify_CommentPreserver::$append. 36 | * 37 | * @param string $content 38 | * @param callback $processor function 39 | * @param array $args array of extra arguments to pass to the processor 40 | * function (default = array()) 41 | * @return string 42 | */ 43 | public static function process($content, $processor, $args = array()) 44 | { 45 | $ret = ''; 46 | while (true) { 47 | list($beforeComment, $comment, $afterComment) = self::_nextComment($content); 48 | if ('' !== $beforeComment) { 49 | $callArgs = $args; 50 | array_unshift($callArgs, $beforeComment); 51 | $ret .= call_user_func_array($processor, $callArgs); 52 | } 53 | if (false === $comment) { 54 | break; 55 | } 56 | $ret .= $comment; 57 | $content = $afterComment; 58 | } 59 | return $ret; 60 | } 61 | 62 | /** 63 | * Extract comments that YUI Compressor preserves. 64 | * 65 | * @param string $in input 66 | * 67 | * @return array 3 elements are returned. If a YUI comment is found, the 68 | * 2nd element is the comment and the 1st and 2nd are the surrounding 69 | * strings. If no comment is found, the entire string is returned as the 70 | * 1st element and the other two are false. 71 | */ 72 | private static function _nextComment($in) 73 | { 74 | if ( 75 | false === ($start = strpos($in, '/*!')) 76 | || false === ($end = strpos($in, '*/', $start + 3)) 77 | ) { 78 | return array($in, false, false); 79 | } 80 | $ret = array( 81 | substr($in, 0, $start) 82 | ,self::$prepend . '/*' . substr($in, $start + 3, $end - $start - 1) . self::$append 83 | ); 84 | $endChars = (strlen($in) - $end - 2); 85 | $ret[] = (0 === $endChars) 86 | ? '' 87 | : substr($in, -$endChars); 88 | return $ret; 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /library/admin/Minify/Compressor.php: -------------------------------------------------------------------------------- 1 | 19 | * @author http://code.google.com/u/1stvamp/ (Issue 64 patch) 20 | */ 21 | class Minify_CSS_Compressor { 22 | 23 | /** 24 | * Minify a CSS string 25 | * 26 | * @param string $css 27 | * 28 | * @param array $options (currently ignored) 29 | * 30 | * @return string 31 | */ 32 | public static function process($css, $options = array()) 33 | { 34 | $obj = new Minify_CSS_Compressor($options); 35 | return $obj->_process($css); 36 | } 37 | 38 | /** 39 | * @var array options 40 | */ 41 | protected $_options = null; 42 | 43 | /** 44 | * @var bool Are we "in" a hack? 45 | * 46 | * I.e. are some browsers targetted until the next comment? 47 | */ 48 | protected $_inHack = false; 49 | 50 | 51 | /** 52 | * Constructor 53 | * 54 | * @param array $options (currently ignored) 55 | * 56 | * @return null 57 | */ 58 | private function __construct($options) { 59 | $this->_options = $options; 60 | } 61 | 62 | /** 63 | * Minify a CSS string 64 | * 65 | * @param string $css 66 | * 67 | * @return string 68 | */ 69 | protected function _process($css) 70 | { 71 | $css = str_replace("\r\n", "\n", $css); 72 | 73 | // preserve empty comment after '>' 74 | // http://www.webdevout.net/css-hacks#in_css-selectors 75 | $css = preg_replace('@>/\\*\\s*\\*/@', '>/*keep*/', $css); 76 | 77 | // preserve empty comment between property and value 78 | // http://css-discuss.incutio.com/?page=BoxModelHack 79 | $css = preg_replace('@/\\*\\s*\\*/\\s*:@', '/*keep*/:', $css); 80 | $css = preg_replace('@:\\s*/\\*\\s*\\*/@', ':/*keep*/', $css); 81 | 82 | // apply callback to all valid comments (and strip out surrounding ws 83 | $css = preg_replace_callback('@\\s*/\\*([\\s\\S]*?)\\*/\\s*@' 84 | ,array($this, '_commentCB'), $css); 85 | 86 | // remove ws around { } and last semicolon in declaration block 87 | $css = preg_replace('/\\s*{\\s*/', '{', $css); 88 | $css = preg_replace('/;?\\s*}\\s*/', '}', $css); 89 | 90 | // remove ws surrounding semicolons 91 | $css = preg_replace('/\\s*;\\s*/', ';', $css); 92 | 93 | // remove ws around urls 94 | $css = preg_replace('/ 95 | url\\( # url( 96 | \\s* 97 | ([^\\)]+?) # 1 = the URL (really just a bunch of non right parenthesis) 98 | \\s* 99 | \\) # ) 100 | /x', 'url($1)', $css); 101 | 102 | // remove ws between rules and colons 103 | $css = preg_replace('/ 104 | \\s* 105 | ([{;]) # 1 = beginning of block or rule separator 106 | \\s* 107 | ([\\*_]?[\\w\\-]+) # 2 = property (and maybe IE filter) 108 | \\s* 109 | : 110 | \\s* 111 | (\\b|[#\'"]) # 3 = first character of a value 112 | /x', '$1$2:$3', $css); 113 | 114 | // remove ws in selectors 115 | $css = preg_replace_callback('/ 116 | (?: # non-capture 117 | \\s* 118 | [^~>+,\\s]+ # selector part 119 | \\s* 120 | [,>+~] # combinators 121 | )+ 122 | \\s* 123 | [^~>+,\\s]+ # selector part 124 | { # open declaration block 125 | /x' 126 | ,array($this, '_selectorsCB'), $css); 127 | 128 | // minimize hex colors 129 | $css = preg_replace('/([^=])#([a-f\\d])\\2([a-f\\d])\\3([a-f\\d])\\4([\\s;\\}])/i' 130 | , '$1#$2$3$4$5', $css); 131 | 132 | // remove spaces between font families 133 | $css = preg_replace_callback('/font-family:([^;}]+)([;}])/' 134 | ,array($this, '_fontFamilyCB'), $css); 135 | 136 | $css = preg_replace('/@import\\s+url/', '@import url', $css); 137 | 138 | // replace any ws involving newlines with a single newline 139 | $css = preg_replace('/[ \\t]*\\n+\\s*/', "\n", $css); 140 | 141 | // separate common descendent selectors w/ newlines (to limit line lengths) 142 | $css = preg_replace('/([\\w#\\.\\*]+)\\s+([\\w#\\.\\*]+){/', "$1\n$2{", $css); 143 | 144 | // Use newline after 1st numeric value (to limit line lengths). 145 | $css = preg_replace('/ 146 | ((?:padding|margin|border|outline):\\d+(?:px|em)?) # 1 = prop : 1st numeric value 147 | \\s+ 148 | /x' 149 | ,"$1\n", $css); 150 | 151 | // prevent triggering IE6 bug: http://www.crankygeek.com/ie6pebug/ 152 | $css = preg_replace('/:first-l(etter|ine)\\{/', ':first-l$1 {', $css); 153 | 154 | return trim($css); 155 | } 156 | 157 | /** 158 | * Replace what looks like a set of selectors 159 | * 160 | * @param array $m regex matches 161 | * 162 | * @return string 163 | */ 164 | protected function _selectorsCB($m) 165 | { 166 | // remove ws around the combinators 167 | return preg_replace('/\\s*([,>+~])\\s*/', '$1', $m[0]); 168 | } 169 | 170 | /** 171 | * Process a comment and return a replacement 172 | * 173 | * @param array $m regex matches 174 | * 175 | * @return string 176 | */ 177 | protected function _commentCB($m) 178 | { 179 | $hasSurroundingWs = (trim($m[0]) !== $m[1]); 180 | $m = $m[1]; 181 | // $m is the comment content w/o the surrounding tokens, 182 | // but the return value will replace the entire comment. 183 | if ($m === 'keep') { 184 | return '/**/'; 185 | } 186 | if ($m === '" "') { 187 | // component of http://tantek.com/CSS/Examples/midpass.html 188 | return '/*" "*/'; 189 | } 190 | if (preg_match('@";\\}\\s*\\}/\\*\\s+@', $m)) { 191 | // component of http://tantek.com/CSS/Examples/midpass.html 192 | return '/*";}}/* */'; 193 | } 194 | if ($this->_inHack) { 195 | // inversion: feeding only to one browser 196 | if (preg_match('@ 197 | ^/ # comment started like /*/ 198 | \\s* 199 | (\\S[\\s\\S]+?) # has at least some non-ws content 200 | \\s* 201 | /\\* # ends like /*/ or /**/ 202 | @x', $m, $n)) { 203 | // end hack mode after this comment, but preserve the hack and comment content 204 | $this->_inHack = false; 205 | return "/*/{$n[1]}/**/"; 206 | } 207 | } 208 | if (substr($m, -1) === '\\') { // comment ends like \*/ 209 | // begin hack mode and preserve hack 210 | $this->_inHack = true; 211 | return '/*\\*/'; 212 | } 213 | if ($m !== '' && $m[0] === '/') { // comment looks like /*/ foo */ 214 | // begin hack mode and preserve hack 215 | $this->_inHack = true; 216 | return '/*/*/'; 217 | } 218 | if ($this->_inHack) { 219 | // a regular comment ends hack mode but should be preserved 220 | $this->_inHack = false; 221 | return '/**/'; 222 | } 223 | // Issue 107: if there's any surrounding whitespace, it may be important, so 224 | // replace the comment with a single space 225 | return $hasSurroundingWs // remove all other comments 226 | ? ' ' 227 | : ''; 228 | } 229 | 230 | /** 231 | * Process a font-family listing and return a replacement 232 | * 233 | * @param array $m regex matches 234 | * 235 | * @return string 236 | */ 237 | protected function _fontFamilyCB($m) 238 | { 239 | $m[1] = preg_replace('/ 240 | \\s* 241 | ( 242 | "[^"]+" # 1 = family in double qutoes 243 | |\'[^\']+\' # or 1 = family in single quotes 244 | |[\\w\\-]+ # or 1 = unquoted family 245 | ) 246 | \\s* 247 | /x', '$1', $m[1]); 248 | return 'font-family:' . $m[1] . $m[2]; 249 | } 250 | } 251 | -------------------------------------------------------------------------------- /library/admin/admin.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /library/admin/meta-box-archive-display.php: -------------------------------------------------------------------------------- 1 | 46 |

47 | 48 |

49 | 50 |

51 | /> 52 | 53 | /> 54 | 55 |

56 | -------------------------------------------------------------------------------- /library/admin/meta-box-style-css-compression.php: -------------------------------------------------------------------------------- 1 | 46 |

47 | 48 |

49 | 50 | 55 |

56 | 57 |

58 |

59 | /> 60 | 61 | /> 62 | 63 |

64 |

65 | 66 |

67 | 68 | get_contents( $filename_orig ); 113 | if ( ! $wp_filesystem->put_contents( $filename_dev, $style_orig, FS_CHMOD_FILE) ) { 114 | wp_die( __( 'Couldn\'t read data from style.css', bareskin_get_textdomain() ) ); 115 | } 116 | } 117 | 118 | if ( isset( $_POST['bareskin_minify_dev_style'] ) ) { 119 | 120 | $filename_orig = trailingslashit( get_stylesheet_directory() ).'style.css'; 121 | $filename_dev = trailingslashit( get_stylesheet_directory() ).'style.dev.css'; 122 | 123 | // by this point, the $wp_filesystem global should be working, so let's use it to create a file 124 | global $wp_filesystem; 125 | 126 | /* Set option to preserve important comments ( comments that begin with /*! ) */ 127 | $options = array( 'preserveComments' ); 128 | 129 | /* Get contents of style.dev.css */ 130 | if( $style = $wp_filesystem->get_contents( $filename_dev ) ){ 131 | 132 | /* Minify the contents */ 133 | $style = Minify_CommentPreserver::process( $style, array('Minify_CSS_Compressor', 'process') ,array($options) ); 134 | 135 | /* Get theme header */ 136 | $start = strpos($style, '/*'); 137 | $end = strpos($style, '*/', $start + 2); 138 | 139 | $theme_header = '/*' .substr($style, $start + 2, $end - $start) ; 140 | 141 | /* Make shure all new lines were removed. Apperantly minify doesn't strip all new lines */ 142 | $style = preg_replace('(\r|\n|\t)', ' ', $style); 143 | /* Remove the theme header that was preserved initialy because now it is only on one line */ 144 | $style = preg_replace('(/\*.*?\*/)', "\r\n", $style); 145 | /* Add the initial theme header that contains new lines */ 146 | $style = $theme_header.$style; 147 | 148 | /* Write the minified contents to style.css */ 149 | if ( ! $wp_filesystem->put_contents( $filename_orig, $style, FS_CHMOD_FILE) ) { 150 | wp_die( __( 'Couldn\'t write data to style.css', bareskin_get_textdomain() ) ); 151 | } 152 | } 153 | else wp_die( __( 'Couldn\'t read data from style.dev.css', bareskin_get_textdomain() ) ); 154 | } 155 | 156 | /* Return the theme settings. */ 157 | return $settings; 158 | 159 | } -------------------------------------------------------------------------------- /library/admin/meta-box-theme-about.php: -------------------------------------------------------------------------------- 1 | 48 | 49 | 50 | 51 | 54 | 57 | 58 | 59 | 62 | 65 | 66 | 67 | 70 | 73 | 74 | 75 | 78 | 81 | 82 |
52 | 53 | 55 | 56 |
60 | 61 | 63 | 64 |
68 | 69 | 71 | 72 |
76 | 77 | 79 | 80 |
-------------------------------------------------------------------------------- /library/admin/meta-box-theme-css-variations.php: -------------------------------------------------------------------------------- 1 | $file, 'filename' => $file_info[ 'filename' ] ); 49 | 50 | if( file_exists( $file_info[ 'dirname' ] . '/' . $file_info[ 'filename' ] . '.png' ) ) 51 | $css_info[ 'img_thumb' ] = $file_info[ 'dirname' ] . '/' . $file_info[ 'filename' ] . '.png'; 52 | 53 | $css_list[] = $css_info; 54 | 55 | } 56 | } 57 | } 58 | } 59 | 60 | ?> 61 |

62 | 63 |

64 | 65 |
66 | 69 |
70 | /> 71 | 81 |
82 | 86 | 87 |
88 | 89 |

90 | 91 |

92 | 93 |

94 | 95 |

96 | -------------------------------------------------------------------------------- /library/admin/meta-box-theme-font.php: -------------------------------------------------------------------------------- 1 | 59 | 64 |
65 | 66 | 67 | 68 | 69 | 74 |
75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /library/admin/meta-box-theme-footer.php: -------------------------------------------------------------------------------- 1 | 37 | 38 |

39 | HTML and/or shortcodes, which will be automatically inserted into your theme.', $domain ); ?> 40 |

41 | 42 |

43 | 44 |

45 | 46 | 47 | 48 |

49 | [the-year], [site-link], [loginout-link], [query-counter]' ); ?> 50 |

51 | -------------------------------------------------------------------------------- /library/admin/meta-box-theme-logo-and-favicon.php: -------------------------------------------------------------------------------- 1 | 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 | 62 | 63 |
64 | 65 |

66 | 67 | 0 ) { 82 | 83 | // Not checking for nonce, Settings API will do that 84 | $file = wp_handle_upload( $_FILES['bareskin_logo_upload'], array( 'test_form' => false ) ); 85 | 86 | if ( isset( $file['error'] ) ) 87 | wp_die( $file['error'] ); 88 | 89 | $url = $file['url']; 90 | $type = $file['type']; 91 | $file = $file['file']; 92 | $filename = basename( $file ); 93 | 94 | // Make sure it's an image 95 | if ( ! in_array( $type, array( 'image/png', 'image/gif', 'image/jpeg' ) ) ) 96 | wp_die( __( 'Invalid image format. Expected jpeg, gif or png.', bareskin_get_textdomain() ) ); 97 | 98 | // Create an attachment post 99 | $object = array( 100 | 'post_title' => $filename, 101 | 'post_content' => $url, 102 | 'post_mime_type' => $type, 103 | 'guid' => $url, 104 | 'context' => 'custom-background' 105 | ); 106 | 107 | // Save the data 108 | $id = wp_insert_attachment( $object, $file ); 109 | 110 | // Add the meta-data (does the resizing too) 111 | wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $file ) ); 112 | 113 | 114 | 115 | // Let's see if the user has asked to resize their logo 116 | if ( isset( $_POST['bareskin_resize_logo'] ) ) { 117 | $file_path = wp_get_attachment_url( $id ); 118 | $path = $image_path = image_resize( $file, 350, 150, $file_path ); 119 | 120 | $path = str_replace( ABSPATH, '', $path ); 121 | $url = trailingslashit( home_url() ). $path; 122 | 123 | } 124 | 125 | // Save the URL to the image. 126 | $settings['logo_source'] = $url; 127 | 128 | unset( $_FILES ); 129 | 130 | } 131 | } 132 | 133 | if ( isset( $_POST['bareskin_remove_logo'] ) ) { 134 | $settings['logo_source'] = ''; 135 | } 136 | 137 | /* Favicon upload */ 138 | if( isset( $_POST['bareskin_upload_favicon'] ) ){ 139 | 140 | if ( ! empty( $_FILES ) && isset( $_FILES['bareskin_favicon_upload']['error'], $_FILES['bareskin_favicon_upload']['size'] ) && $_FILES['bareskin_favicon_upload']['error'] == 0 && $_FILES['bareskin_favicon_upload']['size'] > 0 ) { 141 | if( $_FILES['bareskin_favicon_upload']["name"] != 'favicon.ico') 142 | wp_die( __( 'Invalid favicon name. Expected favicon.ico', bareskin_get_textdomain() ) ); 143 | 144 | if( !empty( $settings['favicon_attachment_id'] ) ) 145 | wp_delete_attachment( $settings['favicon_attachment_id'], true ); 146 | // Not checking for nonce, Settings API will do that 147 | $file = wp_handle_upload( $_FILES['bareskin_favicon_upload'], array( 'test_form' => false ) ); 148 | 149 | if ( isset( $file['error'] ) ) 150 | wp_die( $file['error'] ); 151 | 152 | $url = $file['url']; 153 | $type = $file['type']; 154 | $file = $file['file']; 155 | $filename = basename( $file ); 156 | 157 | // Make sure it's an image 158 | if ( ! in_array( $type, array( 'image/x-icon' ) ) ) 159 | wp_die( __( 'Invalid image format. Expected ico.', bareskin_get_textdomain() ) ); 160 | 161 | // Create an attachment post 162 | $object = array( 163 | 'post_title' => $filename, 164 | 'post_content' => $url, 165 | 'post_mime_type' => $type, 166 | 'guid' => $url, 167 | 'context' => 'custom-background' 168 | ); 169 | 170 | // Save the data 171 | $id = wp_insert_attachment( $object, $file ); 172 | 173 | // Add the meta-data (does the resizing too) 174 | wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $file ) ); 175 | 176 | // Save the URL to the image and the attachment id. 177 | $settings['favicon_source'] = $url; 178 | $settings['favicon_attachment_id'] = $id; 179 | unset( $_FILES ); 180 | 181 | } 182 | } 183 | 184 | if ( isset( $_POST['bareskin_remove_favicon'] ) ) { 185 | wp_delete_attachment( $settings['favicon_attachment_id'], true ); 186 | $settings['favicon_source'] = ''; 187 | } 188 | 189 | /* Return the theme settings. */ 190 | return $settings; 191 | } 192 | ?> -------------------------------------------------------------------------------- /library/admin/theme-settings.php: -------------------------------------------------------------------------------- 1 | 90 |
91 | 92 | 93 | 94 |

95 | 96 |

' . __( 'Settings saved.', $domain ) . '

'; ?> 97 | 98 |
99 | 100 |
101 | 102 | 103 | 104 | 105 | 106 |
107 |
108 |
109 |
110 |
111 | 112 | 113 | 114 |
115 | 116 |
117 | 118 |
119 | 244 | -------------------------------------------------------------------------------- /library/bareskin.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /library/css/2c-l-fixed.css: -------------------------------------------------------------------------------- 1 | /* 2 | LAYOUT: One-Column (Left) Fixed 3 | DESCRIPTION: Two-column 960px fixed layout with one sidebar left of content 4 | */ 5 | 6 | /* =Structure 7 | -------------------------------------------------------------- */ 8 | #inner-header, 9 | #main, 10 | #subsidiary-container, 11 | #inner-footer{ 12 | width:960px; 13 | } 14 | 15 | #branding{ 16 | margin:0 0 20px; 17 | padding:20px 20px 0; 18 | display:block; 19 | } 20 | 21 | #branding hgroup{ 22 | overflow:hidden; 23 | } 24 | 25 | #inner-header{ 26 | margin:0 auto; 27 | } 28 | 29 | #main-wrapper{ 30 | padding:0 20px; 31 | margin:30px 0; 32 | clear:both; 33 | } 34 | 35 | #main{ 36 | margin:0 auto; 37 | overflow:hidden; 38 | } 39 | 40 | #container{ 41 | float:right; 42 | width:66.66666666666667%; 43 | margin-left:2.083333333333333%; 44 | clear:right; 45 | } 46 | 47 | .full-width #container{ 48 | width:100%; 49 | margin:0; 50 | } 51 | 52 | #content{ 53 | overflow:hidden; 54 | } 55 | 56 | #primary, #secondary{ 57 | width:31.25%; 58 | float:left; 59 | clear:left; 60 | } 61 | 62 | #subsidiary-area{ 63 | padding:20px; 64 | clear:both; 65 | } 66 | 67 | #subsidiary-container{ 68 | overflow:hidden; 69 | margin:0 auto; 70 | } 71 | 72 | #subsidiary-container > *{ 73 | width:33.33333333333333%; 74 | float:left; 75 | } 76 | 77 | #colophon { 78 | clear: both; 79 | display: block; 80 | margin:30px 0; 81 | padding:0 20px; 82 | } 83 | 84 | #inner-footer{ 85 | margin:0 auto; 86 | } -------------------------------------------------------------------------------- /library/css/2c-r-fixed.css: -------------------------------------------------------------------------------- 1 | /* 2 | LAYOUT: One-Column (Right) Fixed 3 | DESCRIPTION: Two-column 960px fixed layout with one sidebar right of content 4 | */ 5 | 6 | /* =Structure 7 | -------------------------------------------------------------- */ 8 | #inner-header, 9 | #main, 10 | #subsidiary-container, 11 | #inner-footer{ 12 | width:960px; 13 | } 14 | 15 | #branding{ 16 | margin:0 0 20px; 17 | padding:20px 20px 0; 18 | display:block; 19 | } 20 | 21 | #branding hgroup{ 22 | overflow:hidden; 23 | } 24 | 25 | #inner-header{ 26 | margin:0 auto; 27 | } 28 | 29 | #main-wrapper{ 30 | padding:0 20px; 31 | margin:30px 0; 32 | clear:both; 33 | } 34 | 35 | #main{ 36 | margin:0 auto; 37 | overflow:hidden; 38 | } 39 | 40 | #container{ 41 | float:left; 42 | width:66.66666666666667%; 43 | margin-right:2.083333333333333%; 44 | clear:left; 45 | } 46 | 47 | .full-width #container{ 48 | width:100%; 49 | margin:0; 50 | } 51 | 52 | #content{ 53 | overflow:hidden; 54 | } 55 | 56 | #primary, #secondary{ 57 | width:31.25%; 58 | float:right; 59 | clear:right; 60 | } 61 | 62 | #subsidiary-area{ 63 | padding:20px; 64 | clear:both; 65 | } 66 | 67 | #subsidiary-container{ 68 | overflow:hidden; 69 | margin:0 auto; 70 | } 71 | 72 | #subsidiary-container > *{ 73 | width:33.33333333333333%; 74 | float:left; 75 | } 76 | 77 | #colophon { 78 | clear: both; 79 | display: block; 80 | margin:30px 0; 81 | padding:0 20px; 82 | } 83 | 84 | #inner-footer{ 85 | margin:0 auto; 86 | } -------------------------------------------------------------------------------- /library/css/3c-fixed.css: -------------------------------------------------------------------------------- 1 | /* 2 | LAYOUT: Three-Column 3 | DESCRIPTION: Three-column 960px fixed layout with two sidebars on either side of content 4 | */ 5 | 6 | /* =Structure 7 | -------------------------------------------------------------- */ 8 | #inner-header, 9 | #main, 10 | #subsidiary-container, 11 | #inner-footer{ 12 | width:960px; 13 | } 14 | 15 | #branding{ 16 | margin:0 0 20px; 17 | padding:20px 20px 0; 18 | display:block; 19 | } 20 | 21 | #branding hgroup{ 22 | overflow:hidden; 23 | } 24 | 25 | #inner-header{ 26 | margin:0 auto; 27 | } 28 | 29 | #main-wrapper{ 30 | padding:0 20px; 31 | margin:30px 0; 32 | clear:both; 33 | } 34 | 35 | #main{ 36 | margin:0 auto; 37 | } 38 | 39 | #main:after{ 40 | content:""; 41 | display:block; 42 | clear:both; 43 | } 44 | 45 | #container{ 46 | float:left; 47 | width:41.66666666666667%; 48 | margin:0 2.083333333333333% 0 29.16666666666666%; 49 | } 50 | 51 | .full-width #container{ 52 | width:100%; 53 | margin:0; 54 | } 55 | 56 | #content{ 57 | overflow:hidden; 58 | } 59 | 60 | #primary{ 61 | width:27.08333333333333%; 62 | float:left; 63 | margin-left:-72.91666666666667% 64 | } 65 | 66 | #secondary{ 67 | width:27.08333333333333%; 68 | float:right; 69 | } 70 | 71 | #subsidiary-area{ 72 | padding:20px; 73 | clear:both; 74 | } 75 | 76 | #subsidiary-container{ 77 | overflow:hidden; 78 | margin:0 auto; 79 | } 80 | 81 | #subsidiary-container > *{ 82 | width:33.33333333333333%; 83 | float:left; 84 | } 85 | 86 | #colophon { 87 | clear: both; 88 | display: block; 89 | margin:30px 0; 90 | padding:0 20px; 91 | } 92 | 93 | #inner-footer{ 94 | margin:0 auto; 95 | } -------------------------------------------------------------------------------- /library/css/admin.css: -------------------------------------------------------------------------------- 1 | /* Theme settings page. */ 2 | .appearance_page_theme-settings .side .form-table th { 3 | width: 20%; 4 | font-weight: bold; 5 | text-align: left; 6 | padding-left: 0; 7 | } 8 | .appearance_page_theme-settings .metabox-holder .column-1 { 9 | float: left; 10 | width: 66%; 11 | } 12 | .appearance_page_theme-settings .metabox-holder .column-2 { 13 | float: right; 14 | width: 32%; 15 | } 16 | .appearance_page_theme-settings .metabox-holder .column-3 { 17 | clear: both; 18 | width: 100%; 19 | } 20 | .appearance_page_theme-settings .metabox-holder textarea { 21 | width: 100%; 22 | } 23 | 24 | /* Post edit screen. 25 | .custom-post-format-wrap, .post-layout-wrap { 26 | padding: 0 5px; 27 | max-height: 170px; 28 | overflow-y: auto; 29 | } 30 | .hybrid-post-settings { 31 | padding-top: 5px; 32 | } 33 | .hybrid-post-settings p { 34 | margin-bottom: 15px !important; 35 | } 36 | 37 | /* Widgets page. 38 | .widgets-php .columns-1 { 39 | } 40 | .widgets-php .columns-2 { 41 | overflow: hidden; 42 | float: left; 43 | width: 48%; 44 | } 45 | .widgets-php .columns-3 { 46 | overflow: hidden; 47 | float: left; 48 | width: 31%; 49 | margin-right: 3.5%; 50 | } 51 | .widgets-php .column-last { 52 | float: right; 53 | margin-right: 0; 54 | } 55 | 56 | .widgets-php .hybrid-widget-controls label { 57 | font-size: 11px; 58 | } 59 | .widgets-php .columns-2 input.widefat, .widgets-php .columns-2 select.widefat { 60 | width: 99%; 61 | } 62 | .widgets-php .columns-3 select.widefat { 63 | width: 98.5%; 64 | } 65 | .widgets-php .hybrid-widget-controls select[multiple="multiple"] { 66 | width: 100%; 67 | height: 5.0em !important; 68 | } 69 | .widgets-php input.smallfat { 70 | float: right; 71 | width: 66px; 72 | } 73 | .widgets-php select.smallfat { 74 | float: right; 75 | min-width: 66px; 76 | }*/ -------------------------------------------------------------------------------- /library/css/reset.css: -------------------------------------------------------------------------------- 1 | /* =Reset 2 | -------------------------------------------------------------- */ 3 | 4 | html,body,div,span,object,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,samp,small,strong,sub,sup,tt,var,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;vertical-align:baseline;outline:none;font-size:100%;background:transparent;border:none;text-decoration:none}b,i,hr,u,center,menu,layer,s,strike,font,xmp{margin:0;padding:0;vertical-align:baseline;outline:none;font-size:100%;font-weight:normal;font-style:normal;background:transparent;border:none;text-decoration:none}font{color:#333}center{text-align:left} -------------------------------------------------------------------------------- /library/css/responsive.css: -------------------------------------------------------------------------------- 1 | #inner-header, 2 | #main, 3 | #subsidiary-container, 4 | #inner-footer{ 5 | width:auto; 6 | max-width:960px; 7 | } 8 | 9 | @media screen and (max-width: 480px) { 10 | 11 | /* Structure */ 12 | 13 | #container{ 14 | width:100%; 15 | margin-right:0%; 16 | } 17 | 18 | #primary, 19 | #secondary, 20 | #subsidiary-container > *{ 21 | width:100%; 22 | float:none; 23 | clear:both; 24 | } 25 | 26 | /* Header */ 27 | 28 | #site-title { 29 | font-size:25px; 30 | } 31 | 32 | #site-title img{ 33 | width:175px; 34 | height:75px; 35 | } 36 | 37 | #site-title a{ 38 | line-height:75px; 39 | height:75px; 40 | } 41 | 42 | #site-description { 43 | display:none; 44 | } 45 | 46 | /* Menu */ 47 | 48 | #branding #access{ 49 | height:auto; 50 | } 51 | 52 | #branding #access ul { 53 | margin: 0; 54 | } 55 | 56 | #branding #access li { 57 | float: none; 58 | } 59 | 60 | #branding #access a { 61 | 62 | } 63 | 64 | #branding #access ul ul { 65 | box-shadow: none; 66 | -moz-box-shadow: none; 67 | -webkit-box-shadow: none; 68 | display: block; 69 | float: none; 70 | position: relative; 71 | margin-left:40px; 72 | top:0; 73 | z-index: 99999; 74 | } 75 | #branding #access ul ul ul { 76 | position:relative; 77 | left: 0; 78 | top: 0; 79 | margin-left:40px; 80 | } 81 | #branding #access ul ul a { 82 | background: none; 83 | line-height: 30px; 84 | padding: 0 10px; 85 | display:block; 86 | width:auto; 87 | } 88 | 89 | #branding #access ul ul a:hover { 90 | background: #cecece; 91 | } 92 | 93 | /* Widgets */ 94 | 95 | #subsidiary .widget, 96 | #subsidiary-second .widget, 97 | #subsidiary-third .widget{ 98 | padding:0px !important; 99 | } 100 | 101 | } 102 | 103 | @media screen and (max-width: 768px) { 104 | /* Structure */ 105 | 106 | #container{ 107 | width:100%; 108 | margin-right:0%; 109 | } 110 | 111 | #primary, 112 | #secondary{ 113 | width:48%; 114 | float:left; 115 | } 116 | 117 | #primary{ 118 | margin-right:4%; 119 | clear:lfet; 120 | } 121 | 122 | #subsidiary, 123 | #subsidiary-second{ 124 | width:48%; 125 | float:left; 126 | } 127 | 128 | #subsidiary{ 129 | margin-right:4%; 130 | clear:lfet; 131 | } 132 | 133 | #subsidiary-third{ 134 | width:100%; 135 | } 136 | 137 | #subsidiary .widget, 138 | #subsidiary-second .widget, 139 | #subsidiary-third .widget{ 140 | padding:0 !important; 141 | } 142 | 143 | /* Header */ 144 | 145 | #branding #site-description { 146 | float:none; 147 | clear:both; 148 | width:100%; 149 | margin:15px 0; 150 | text-align:left; 151 | } 152 | } -------------------------------------------------------------------------------- /library/functions/breadcrumb-trail.php: -------------------------------------------------------------------------------- 1 | 19 | * @copyright Copyright (c) 2008 - 2011, Justin Tadlock 20 | * @link http://justintadlock.com/archives/2009/04/05/breadcrumb-trail-wordpress-plugin 21 | * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 22 | */ 23 | 24 | /** 25 | * Shows a breadcrumb for all types of pages. This function is formatting the final output of the 26 | * breadcrumb trail. The breadcrumb_trail_get_items() function returns the items and this function 27 | * formats those items. 28 | * 29 | * @since 1.0.0 30 | * @param array $args Mixed arguments for the menu. 31 | * @return string Output of the breadcrumb menu. 32 | */ 33 | function breadcrumb_trail( $args = array() ) { 34 | 35 | /* Get the textdomain. */ 36 | $textdomain = breadcrumb_trail_textdomain(); 37 | 38 | /* Create an empty variable for the breadcrumb. */ 39 | $breadcrumb = ''; 40 | 41 | /* Set up the default arguments for the breadcrumb. */ 42 | $defaults = array( 43 | 'separator' => '/', 44 | 'before' => '' . __( 'Browse:', $textdomain ) . '', 45 | 'after' => false, 46 | 'front_page' => true, 47 | 'show_home' => __( 'Home', $textdomain ), 48 | 'echo' => true 49 | ); 50 | 51 | /* Allow singular post views to have a taxonomy's terms prefixing the trail. */ 52 | if ( is_singular() ) { 53 | $post = get_queried_object(); 54 | $defaults["singular_{$post->post_type}_taxonomy"] = false; 55 | } 56 | 57 | /* Apply filters to the arguments. */ 58 | $args = apply_filters( 'breadcrumb_trail_args', $args ); 59 | 60 | /* Parse the arguments and extract them for easy variable naming. */ 61 | $args = wp_parse_args( $args, $defaults ); 62 | 63 | /* Get the trail items. */ 64 | $trail = breadcrumb_trail_get_items( $args ); 65 | 66 | /* Connect the breadcrumb trail if there are items in the trail. */ 67 | if ( !empty( $trail ) && is_array( $trail ) ) { 68 | 69 | /* Open the breadcrumb trail containers. */ 70 | $breadcrumb = ''; 90 | } 91 | 92 | /* Allow developers to filter the breadcrumb trail HTML. */ 93 | $breadcrumb = apply_filters( 'breadcrumb_trail', $breadcrumb, $args ); 94 | 95 | /* Output the breadcrumb. */ 96 | if ( $args['echo'] ) 97 | echo $breadcrumb; 98 | else 99 | return $breadcrumb; 100 | } 101 | 102 | /** 103 | * Gets the items for the breadcrumb trail. This is the heart of the script. It checks the current page 104 | * being viewed and decided based on the information provided by WordPress what items should be 105 | * added to the breadcrumb trail. 106 | * 107 | * @since 1.0.0 108 | * @todo Build in caching based on the queried object ID. 109 | * @param array $args Mixed arguments for the menu. 110 | * @return array List of items to be shown in the trail. 111 | */ 112 | function breadcrumb_trail_get_items( $args = array() ) { 113 | global $wp_rewrite; 114 | 115 | /* Get the textdomain. */ 116 | $textdomain = breadcrumb_trail_textdomain(); 117 | 118 | /* Set up an empty trail array and empty path. */ 119 | $trail = array(); 120 | $path = ''; 121 | 122 | /* If $show_home is set and we're not on the front page of the site, link to the home page. */ 123 | if ( !is_front_page() && $args['show_home'] ) 124 | $trail[] = '' . $args['show_home'] . ''; 125 | 126 | /* If viewing the front page of the site. */ 127 | if ( is_front_page() ) { 128 | if ( $args['show_home'] && $args['front_page'] ) 129 | $trail['trail_end'] = "{$args['show_home']}"; 130 | } 131 | 132 | /* If viewing the "home"/posts page. */ 133 | elseif ( is_home() ) { 134 | $home_page = get_page( get_queried_object_id() ); 135 | $trail = array_merge( $trail, breadcrumb_trail_get_parents( $home_page->post_parent, '' ) ); 136 | $trail['trail_end'] = get_the_title( $home_page->ID ); 137 | } 138 | 139 | /* If viewing a singular post (page, attachment, etc.). */ 140 | elseif ( is_singular() ) { 141 | 142 | /* Get singular post variables needed. */ 143 | $post = get_queried_object(); 144 | $post_id = absint( get_queried_object_id() ); 145 | $post_type = $post->post_type; 146 | $parent = absint( $post->post_parent ); 147 | 148 | /* Get the post type object. */ 149 | $post_type_object = get_post_type_object( $post_type ); 150 | 151 | /* If viewing a singular 'post'. */ 152 | if ( 'post' == $post_type ) { 153 | 154 | /* If $front has been set, add it to the $path. */ 155 | $path .= trailingslashit( $wp_rewrite->front ); 156 | 157 | /* If there's a path, check for parents. */ 158 | if ( !empty( $path ) ) 159 | $trail = array_merge( $trail, breadcrumb_trail_get_parents( '', $path ) ); 160 | 161 | /* Map the permalink structure tags to actual links. */ 162 | $trail = array_merge( $trail, breadcrumb_trail_map_rewrite_tags( $post_id, get_option( 'permalink_structure' ), $args ) ); 163 | } 164 | 165 | /* If viewing a singular 'attachment'. */ 166 | elseif ( 'attachment' == $post_type ) { 167 | 168 | /* If $front has been set, add it to the $path. */ 169 | $path .= trailingslashit( $wp_rewrite->front ); 170 | 171 | /* If there's a path, check for parents. */ 172 | if ( !empty( $path ) ) 173 | $trail = array_merge( $trail, breadcrumb_trail_get_parents( '', $path ) ); 174 | 175 | /* Map the post (parent) permalink structure tags to actual links. */ 176 | $trail = array_merge( $trail, breadcrumb_trail_map_rewrite_tags( $post->post_parent, get_option( 'permalink_structure' ), $args ) ); 177 | } 178 | 179 | /* If a custom post type, check if there are any pages in its hierarchy based on the slug. */ 180 | elseif ( 'page' !== $post_type ) { 181 | 182 | /* If $front has been set, add it to the $path. */ 183 | if ( $post_type_object->rewrite['with_front'] && $wp_rewrite->front ) 184 | $path .= trailingslashit( $wp_rewrite->front ); 185 | 186 | /* If there's a slug, add it to the $path. */ 187 | if ( !empty( $post_type_object->rewrite['slug'] ) ) 188 | $path .= $post_type_object->rewrite['slug']; 189 | 190 | /* If there's a path, check for parents. */ 191 | if ( !empty( $path ) ) 192 | $trail = array_merge( $trail, breadcrumb_trail_get_parents( '', $path ) ); 193 | 194 | /* If there's an archive page, add it to the trail. */ 195 | if ( !empty( $post_type_object->has_archive ) ) 196 | $trail[] = '' . $post_type_object->labels->name . ''; 197 | } 198 | 199 | /* If the post type path returns nothing and there is a parent, get its parents. */ 200 | if ( ( empty( $path ) && 0 !== $parent ) || ( 'attachment' == $post_type ) ) 201 | $trail = array_merge( $trail, breadcrumb_trail_get_parents( $parent, '' ) ); 202 | 203 | /* Or, if the post type is hierarchical and there's a parent, get its parents. */ 204 | elseif ( 0 !== $parent && is_post_type_hierarchical( $post_type ) ) 205 | $trail = array_merge( $trail, breadcrumb_trail_get_parents( $parent, '' ) ); 206 | 207 | /* Display terms for specific post type taxonomy if requested. */ 208 | if ( !empty( $args["singular_{$post_type}_taxonomy"] ) && $terms = get_the_term_list( $post_id, $args["singular_{$post_type}_taxonomy"], '', ', ', '' ) ) 209 | $trail[] = $terms; 210 | 211 | /* End with the post title. */ 212 | $post_title = get_the_title(); 213 | if ( !empty( $post_title ) ) 214 | $trail['trail_end'] = $post_title; 215 | } 216 | 217 | /* If we're viewing any type of archive. */ 218 | elseif ( is_archive() ) { 219 | 220 | /* If viewing a taxonomy term archive. */ 221 | if ( is_tax() || is_category() || is_tag() ) { 222 | 223 | /* Get some taxonomy and term variables. */ 224 | $term = get_queried_object(); 225 | $taxonomy = get_taxonomy( $term->taxonomy ); 226 | 227 | /* Get the path to the term archive. Use this to determine if a page is present with it. */ 228 | if ( is_category() ) 229 | $path = get_option( 'category_base' ); 230 | elseif ( is_tag() ) 231 | $path = get_option( 'tag_base' ); 232 | else { 233 | if ( $taxonomy->rewrite['with_front'] && $wp_rewrite->front ) 234 | $path = trailingslashit( $wp_rewrite->front ); 235 | $path .= $taxonomy->rewrite['slug']; 236 | } 237 | 238 | /* Get parent pages by path if they exist. */ 239 | if ( $path ) 240 | $trail = array_merge( $trail, breadcrumb_trail_get_parents( '', $path ) ); 241 | 242 | /* If the taxonomy is hierarchical, list its parent terms. */ 243 | if ( is_taxonomy_hierarchical( $term->taxonomy ) && $term->parent ) 244 | $trail = array_merge( $trail, breadcrumb_trail_get_term_parents( $term->parent, $term->taxonomy ) ); 245 | 246 | /* Add the term name to the trail end. */ 247 | $trail['trail_end'] = single_term_title( '', false ); 248 | } 249 | 250 | /* If viewing a post type archive. */ 251 | elseif ( is_post_type_archive() ) { 252 | 253 | /* Get the post type object. */ 254 | $post_type_object = get_post_type_object( get_query_var( 'post_type' ) ); 255 | 256 | /* If $front has been set, add it to the $path. */ 257 | if ( $post_type_object->rewrite['with_front'] && $wp_rewrite->front ) 258 | $path .= trailingslashit( $wp_rewrite->front ); 259 | 260 | /* If there's a slug, add it to the $path. */ 261 | if ( !empty( $post_type_object->rewrite['slug'] ) ) 262 | $path .= $post_type_object->rewrite['slug']; 263 | 264 | /* If there's a path, check for parents. */ 265 | if ( !empty( $path ) ) 266 | $trail = array_merge( $trail, breadcrumb_trail_get_parents( '', $path ) ); 267 | 268 | /* Add the post type [plural] name to the trail end. */ 269 | $trail['trail_end'] = $post_type_object->labels->name; 270 | } 271 | 272 | /* If viewing an author archive. */ 273 | elseif ( is_author() ) { 274 | 275 | /* If $front has been set, add it to $path. */ 276 | if ( !empty( $wp_rewrite->front ) ) 277 | $path .= trailingslashit( $wp_rewrite->front ); 278 | 279 | /* If an $author_base exists, add it to $path. */ 280 | if ( !empty( $wp_rewrite->author_base ) ) 281 | $path .= $wp_rewrite->author_base; 282 | 283 | /* If $path exists, check for parent pages. */ 284 | if ( !empty( $path ) ) 285 | $trail = array_merge( $trail, breadcrumb_trail_get_parents( '', $path ) ); 286 | 287 | /* Add the author's display name to the trail end. */ 288 | $trail['trail_end'] = get_the_author_meta( 'display_name', get_query_var( 'author' ) ); 289 | } 290 | 291 | /* If viewing a time-based archive. */ 292 | elseif ( is_time() ) { 293 | 294 | if ( get_query_var( 'minute' ) && get_query_var( 'hour' ) ) 295 | $trail['trail_end'] = get_the_time( __( 'g:i a', $textdomain ) ); 296 | 297 | elseif ( get_query_var( 'minute' ) ) 298 | $trail['trail_end'] = sprintf( __( 'Minute %1$s', $textdomain ), get_the_time( __( 'i', $textdomain ) ) ); 299 | 300 | elseif ( get_query_var( 'hour' ) ) 301 | $trail['trail_end'] = get_the_time( __( 'g a', $textdomain ) ); 302 | } 303 | 304 | /* If viewing a date-based archive. */ 305 | elseif ( is_date() ) { 306 | 307 | /* If $front has been set, check for parent pages. */ 308 | if ( $wp_rewrite->front ) 309 | $trail = array_merge( $trail, breadcrumb_trail_get_parents( '', $wp_rewrite->front ) ); 310 | 311 | if ( is_day() ) { 312 | $trail[] = '' . get_the_time( __( 'Y', $textdomain ) ) . ''; 313 | $trail[] = '' . get_the_time( __( 'F', $textdomain ) ) . ''; 314 | $trail['trail_end'] = get_the_time( __( 'd', $textdomain ) ); 315 | } 316 | 317 | elseif ( get_query_var( 'w' ) ) { 318 | $trail[] = '' . get_the_time( __( 'Y', $textdomain ) ) . ''; 319 | $trail['trail_end'] = sprintf( __( 'Week %1$s', $textdomain ), get_the_time( esc_attr__( 'W', $textdomain ) ) ); 320 | } 321 | 322 | elseif ( is_month() ) { 323 | $trail[] = '' . get_the_time( __( 'Y', $textdomain ) ) . ''; 324 | $trail['trail_end'] = get_the_time( __( 'F', $textdomain ) ); 325 | } 326 | 327 | elseif ( is_year() ) { 328 | $trail['trail_end'] = get_the_time( __( 'Y', $textdomain ) ); 329 | } 330 | } 331 | } 332 | 333 | /* If viewing search results. */ 334 | elseif ( is_search() ) 335 | $trail['trail_end'] = sprintf( __( 'Search results for "%1$s"', $textdomain ), esc_attr( get_search_query() ) ); 336 | 337 | /* If viewing a 404 error page. */ 338 | elseif ( is_404() ) 339 | $trail['trail_end'] = __( '404 Not Found', $textdomain ); 340 | 341 | /* Allow devs to step in and filter the $trail array. */ 342 | return apply_filters( 'breadcrumb_trail_items', $trail, $args ); 343 | } 344 | 345 | /** 346 | * Turns %tag% from permalink structures into usable links for the breadcrumb trail. This feels kind of 347 | * hackish for now because we're checking for specific %tag% examples and only doing it for the 'post' 348 | * post type. In the future, maybe it'll handle a wider variety of possibilities, especially for custom post 349 | * types. 350 | * 351 | * @since 1.0.0 352 | * @param int $post_id ID of the post whose parents we want. 353 | * @param string $path Path of a potential parent page. 354 | * @param array $args Mixed arguments for the menu. 355 | * @return array $trail Array of links to the post breadcrumb. 356 | */ 357 | function breadcrumb_trail_map_rewrite_tags( $post_id = '', $path = '', $args = array() ) { 358 | 359 | /* Set up an empty $trail array. */ 360 | $trail = array(); 361 | 362 | /* Make sure there's a $path and $post_id before continuing. */ 363 | if ( empty( $path ) || empty( $post_id ) ) 364 | return $trail; 365 | 366 | /* Get the post based on the post ID. */ 367 | $post = get_post( $post_id ); 368 | 369 | /* If no post is returned, an error is returned, or the post does not have a 'post' post type, return. */ 370 | if ( empty( $post ) || is_wp_error( $post ) || 'post' !== $post->post_type ) 371 | return $trail; 372 | 373 | /* Get the textdomain. */ 374 | $textdomain = breadcrumb_trail_textdomain(); 375 | 376 | /* Trim '/' from both sides of the $path. */ 377 | $path = trim( $path, '/' ); 378 | 379 | /* Split the $path into an array of strings. */ 380 | $matches = explode( '/', $path ); 381 | 382 | /* If matches are found for the path. */ 383 | if ( is_array( $matches ) ) { 384 | 385 | /* Loop through each of the matches, adding each to the $trail array. */ 386 | foreach ( $matches as $match ) { 387 | 388 | /* Trim any '/' from the $match. */ 389 | $tag = trim( $match, '/' ); 390 | 391 | /* If using the %year% tag, add a link to the yearly archive. */ 392 | if ( '%year%' == $tag ) 393 | $trail[] = '' . get_the_time( __( 'Y', $textdomain ), $post_id ) . ''; 394 | 395 | /* If using the %monthnum% tag, add a link to the monthly archive. */ 396 | elseif ( '%monthnum%' == $tag ) 397 | $trail[] = '' . get_the_time( __( 'F', $textdomain ), $post_id ) . ''; 398 | 399 | /* If using the %day% tag, add a link to the daily archive. */ 400 | elseif ( '%day%' == $tag ) 401 | $trail[] = '' . get_the_time( __( 'd', $textdomain ), $post_id ) . ''; 402 | 403 | /* If using the %author% tag, add a link to the post author archive. */ 404 | elseif ( '%author%' == $tag ) 405 | $trail[] = '' . get_the_author_meta( 'display_name', $post->post_author ) . ''; 406 | 407 | /* If using the %category% tag, add a link to the first category archive to match permalinks. */ 408 | elseif ( '%category%' == $tag && 'category' !== $args["singular_{$post->post_type}_taxonomy"] ) { 409 | 410 | /* Get the post categories. */ 411 | $terms = get_the_category( $post_id ); 412 | 413 | /* Check that categories were returned. */ 414 | if ( $terms ) { 415 | 416 | /* Sort the terms by ID and get the first category. */ 417 | usort( $terms, '_usort_terms_by_ID' ); 418 | $term = get_term( $terms[0], 'category' ); 419 | 420 | /* If the category has a parent, add the hierarchy to the trail. */ 421 | if ( 0 !== $term->parent ) 422 | $trail = array_merge( $trail, breadcrumb_trail_get_term_parents( $term->parent, 'category' ) ); 423 | 424 | /* Add the category archive link to the trail. */ 425 | $trail[] = '' . $term->name . ''; 426 | } 427 | } 428 | } 429 | } 430 | 431 | /* Return the $trail array. */ 432 | return $trail; 433 | } 434 | 435 | /** 436 | * Gets parent pages of any post type or taxonomy by the ID or Path. The goal of this function is to create 437 | * a clear path back to home given what would normally be a "ghost" directory. If any page matches the given 438 | * path, it'll be added. But, it's also just a way to check for a hierarchy with hierarchical post types. 439 | * 440 | * @since 1.0.0 441 | * @param int $post_id ID of the post whose parents we want. 442 | * @param string $path Path of a potential parent page. 443 | * @return array $trail Array of parent page links. 444 | */ 445 | function breadcrumb_trail_get_parents( $post_id = '', $path = '' ) { 446 | 447 | /* Set up an empty trail array. */ 448 | $trail = array(); 449 | 450 | /* Trim '/' off $path in case we just got a simple '/' instead of a real path. */ 451 | $path = trim( $path, '/' ); 452 | 453 | /* If neither a post ID nor path set, return an empty array. */ 454 | if ( empty( $post_id ) && empty( $path ) ) 455 | return $trail; 456 | 457 | /* If the post ID is empty, use the path to get the ID. */ 458 | if ( empty( $post_id ) ) { 459 | 460 | /* Get parent post by the path. */ 461 | $parent_page = get_page_by_path( $path ); 462 | 463 | /* If a parent post is found, set the $post_id variable to it. */ 464 | if ( !empty( $parent_page ) ) 465 | $post_id = $parent_page->ID; 466 | } 467 | 468 | /* If a post ID and path is set, search for a post by the given path. */ 469 | if ( $post_id == 0 && !empty( $path ) ) { 470 | 471 | /* Separate post names into separate paths by '/'. */ 472 | $path = trim( $path, '/' ); 473 | preg_match_all( "/\/.*?\z/", $path, $matches ); 474 | 475 | /* If matches are found for the path. */ 476 | if ( isset( $matches ) ) { 477 | 478 | /* Reverse the array of matches to search for posts in the proper order. */ 479 | $matches = array_reverse( $matches ); 480 | 481 | /* Loop through each of the path matches. */ 482 | foreach ( $matches as $match ) { 483 | 484 | /* If a match is found. */ 485 | if ( isset( $match[0] ) ) { 486 | 487 | /* Get the parent post by the given path. */ 488 | $path = str_replace( $match[0], '', $path ); 489 | $parent_page = get_page_by_path( trim( $path, '/' ) ); 490 | 491 | /* If a parent post is found, set the $post_id and break out of the loop. */ 492 | if ( !empty( $parent_page ) && $parent_page->ID > 0 ) { 493 | $post_id = $parent_page->ID; 494 | break; 495 | } 496 | } 497 | } 498 | } 499 | } 500 | 501 | /* While there's a post ID, add the post link to the $parents array. */ 502 | while ( $post_id ) { 503 | 504 | /* Get the post by ID. */ 505 | $page = get_page( $post_id ); 506 | 507 | /* Add the formatted post link to the array of parents. */ 508 | $parents[] = '' . get_the_title( $post_id ) . ''; 509 | 510 | /* Set the parent post's parent to the post ID. */ 511 | $post_id = $page->post_parent; 512 | } 513 | 514 | /* If we have parent posts, reverse the array to put them in the proper order for the trail. */ 515 | if ( isset( $parents ) ) 516 | $trail = array_reverse( $parents ); 517 | 518 | /* Return the trail of parent posts. */ 519 | return $trail; 520 | } 521 | 522 | /** 523 | * Searches for term parents of hierarchical taxonomies. This function is similar to the WordPress 524 | * function get_category_parents() but handles any type of taxonomy. 525 | * 526 | * @since 1.0.0 527 | * @param int $parent_id The ID of the first parent. 528 | * @param object|string $taxonomy The taxonomy of the term whose parents we want. 529 | * @return array $trail Array of links to parent terms. 530 | */ 531 | function breadcrumb_trail_get_term_parents( $parent_id = '', $taxonomy = '' ) { 532 | 533 | /* Set up some default arrays. */ 534 | $trail = array(); 535 | $parents = array(); 536 | 537 | /* If no term parent ID or taxonomy is given, return an empty array. */ 538 | if ( empty( $parent_id ) || empty( $taxonomy ) ) 539 | return $trail; 540 | 541 | /* While there is a parent ID, add the parent term link to the $parents array. */ 542 | while ( $parent_id ) { 543 | 544 | /* Get the parent term. */ 545 | $parent = get_term( $parent_id, $taxonomy ); 546 | 547 | /* Add the formatted term link to the array of parent terms. */ 548 | $parents[] = '' . $parent->name . ''; 549 | 550 | /* Set the parent term's parent as the parent ID. */ 551 | $parent_id = $parent->parent; 552 | } 553 | 554 | /* If we have parent terms, reverse the array to put them in the proper order for the trail. */ 555 | if ( !empty( $parents ) ) 556 | $trail = array_reverse( $parents ); 557 | 558 | /* Return the trail of parent terms. */ 559 | return $trail; 560 | } 561 | 562 | /** 563 | * Returns the textdomain used by the script and allows it to be filtered by plugins/themes. 564 | * 565 | * @since 1.0.0 566 | * @returns string The textdomain for the script. 567 | */ 568 | function breadcrumb_trail_textdomain() { 569 | return apply_filters( 'breadcrumb_trail_textdomain', 'breadcrumb-trail' ); 570 | } 571 | 572 | ?> -------------------------------------------------------------------------------- /library/functions/color_variation.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /library/functions/comments.php: -------------------------------------------------------------------------------- 1 | comment_type ) : 13 | case '' : 14 | ?> 15 |
  • id="li-comment-"> 16 |
    17 |
    18 |
    19 | 20 | says:', $domain ), sprintf( '%s', get_comment_author_link() ) ); ?> 21 |
    22 | comment_approved == '0' ) : ?> 23 | 24 |
    25 | 26 | 27 | 36 |
    37 | 38 |
    39 | 40 |
    41 | $depth, 'max_depth' => $args['max_depth'] ) ) ); ?> 42 |
    43 |
    44 | 45 | 50 |
  • 51 |

    52 | -------------------------------------------------------------------------------- /library/functions/content.php: -------------------------------------------------------------------------------- 1 | 18 | 31 | 43 |
    44 | 45 | 50 | 51 | 52 | 53 | | 54 | 55 | 56 | 61 | 62 | 63 | 64 | | 65 | 66 | 67 | 68 | 69 | 70 | | 71 | 72 | 73 | ', '' ); ?> 74 |
    75 | 1, 88 | ) ); 89 | 90 | // Count the number of categories that are attached to the posts 91 | $bareskin_blog_categories = count( $bareskin_blog_categories ); 92 | 93 | set_transient( 'bareskin_blog_categories', $bareskin_blog_categories ); 94 | } 95 | 96 | if ( '1' != $bareskin_blog_categories ) { 97 | // This blog has more than 1 category so bareskin_categorized_blog should return true 98 | return true; 99 | } else { 100 | // This blog has only 1 category so bareskin_categorized_blog should return false 101 | return false; 102 | } 103 | } 104 | ?> -------------------------------------------------------------------------------- /library/functions/core.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /library/functions/fonts.php: -------------------------------------------------------------------------------- 1 | array( 14 | 'name' => 'PT Sans narrow', 15 | 'import' => '@import url(http://fonts.googleapis.com/css?family=PT+Sans+Narrow:400,700);', 16 | 'css' => "font-family: 'PT Sans narrow', sans-serif;%;", 17 | 'font-size' => '13px' 18 | ), 19 | 'lato' => array( 20 | 'name' => 'Lato', 21 | 'import' => '@import url(http://fonts.googleapis.com/css?family=Lato);', 22 | 'css' => "font-family: 'Lato', sans-serif;", 23 | 'font-size' => '13px' 24 | ), 25 | 'oswald' => array( 26 | 'name' => 'Oswald', 27 | 'import' => '@import url(http://fonts.googleapis.com/css?family=Oswald);', 28 | 'css' => "font-family: 'Oswald', sans-serif;", 29 | 'font-size' => '13px' 30 | ), 31 | 'arial' => array( 32 | 'name' => 'Arial', 33 | 'import' => '', 34 | 'css' => "font-family: Arial, sans-serif;", 35 | 'font-size' => '13px' 36 | ), 37 | 'trebuchet' => array( 38 | 'name' => 'Trebuchet MS', 39 | 'import' => '', 40 | 'css' => "font-family: 'Trebuchet MS', sans-serif;", 41 | 'font-size' => '13px' 42 | ) 43 | ); 44 | 45 | return apply_filters( 'bareskin_available_fonts', $fonts ); 46 | } 47 | 48 | /* 49 | * Custom Fonts Output 50 | * 51 | * Print style for custom fonts. Outputs style for Primary and Secondary fonts. 52 | * 53 | */ 54 | function bareskin_custom_fonts() { 55 | 56 | // Getting an array of available fonts 57 | $fonts = bareskin_get_available_fonts(); 58 | 59 | 60 | // Get primary and secondary font choosed in options 61 | $primary_font = bareskin_get_setting( 'primary_font' ); 62 | $secondary_font = bareskin_get_setting( 'secondary_font' ); 63 | if ( isset( $primary_font ) ) 64 | $current_prime_font_key = $primary_font; 65 | 66 | if ( isset( $secondary_font ) ) 67 | $current_sec_font_key = $secondary_font; 68 | 69 | // Check if primary and secondary fonts are the same and load font one time. 70 | if ( $current_sec_font_key == $current_prime_font_key ) { 71 | $current_font_key = $current_prime_font_key; 72 | if ( isset( $fonts[$current_font_key] ) ) { 73 | $current_font = $fonts[$current_font_key]; 74 | 75 | echo ''; 81 | } 82 | } else { 83 | 84 | // Print font styles for primary and secondary elements. 85 | if ( isset( $fonts[$current_prime_font_key] ) || isset( $fonts[$current_sec_font_key] ) ) { 86 | $current_prime_font = $fonts[$current_prime_font_key]; 87 | $current_sec_font = $fonts[$current_sec_font_key]; 88 | 89 | echo ''; 97 | } 98 | } 99 | } 100 | ?> -------------------------------------------------------------------------------- /library/functions/get-the-image.php: -------------------------------------------------------------------------------- 1 | 21 | * @copyright Copyright (c) 2008 - 2011, Justin Tadlock 22 | * @link http://justintadlock.com/archives/2008/05/27/get-the-image-wordpress-plugin 23 | * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 24 | */ 25 | 26 | /* Adds theme support for WordPress 'featured images'. */ 27 | add_theme_support( 'post-thumbnails' ); 28 | 29 | /* Delete the cache when a post or post metadata is updated. */ 30 | add_action( 'save_post', 'get_the_image_delete_cache_by_post' ); 31 | add_action( 'deleted_post_meta', 'get_the_image_delete_cache_by_meta', 10, 2 ); 32 | add_action( 'updated_post_meta', 'get_the_image_delete_cache_by_meta', 10, 2 ); 33 | add_action( 'added_post_meta', 'get_the_image_delete_cache_by_meta', 10, 2 ); 34 | 35 | /** 36 | * The main image function for displaying an image. It supports several arguments that allow developers to 37 | * customize how the script outputs the image. 38 | * 39 | * The image check order is important to note here. If an image is found by any specific check, the script 40 | * will no longer look for images. The check order is 'meta_key', 'the_post_thumbnail', 'attachment', 41 | * 'image_scan', 'callback', and 'default_image'. 42 | * 43 | * @since 0.1.0 44 | * @global $post The current post's database object. 45 | * @param array $args Arguments for how to load and display the image. 46 | * @return string|array The HTML for the image. | Image attributes in an array. 47 | */ 48 | function get_the_image( $args = array() ) { 49 | global $post; 50 | 51 | /* Set the default arguments. */ 52 | $defaults = array( 53 | 'meta_key' => array( 'Thumbnail', 'thumbnail' ), 54 | 'post_id' => $post->ID, 55 | 'attachment' => true, 56 | 'the_post_thumbnail' => true, // WP 2.9+ image function 57 | 'size' => 'thumbnail', 58 | 'default_image' => false, 59 | 'order_of_image' => 1, 60 | 'link_to_post' => true, 61 | 'image_class' => false, 62 | 'image_scan' => false, 63 | 'width' => false, 64 | 'height' => false, 65 | 'format' => 'img', 66 | 'meta_key_save' => false, 67 | 'callback' => null, 68 | 'cache' => true, 69 | 'echo' => true, 70 | 'custom_key' => null, // @deprecated 0.6. Use 'meta_key'. 71 | 'default_size' => null, // @deprecated 0.5. Use 'size'. 72 | ); 73 | 74 | /* Allow plugins/themes to filter the arguments. */ 75 | $args = apply_filters( 'get_the_image_args', $args ); 76 | 77 | /* Merge the input arguments and the defaults. */ 78 | $args = wp_parse_args( $args, $defaults ); 79 | 80 | /* If $default_size is given, overwrite $size. */ 81 | if ( !is_null( $args['default_size'] ) ) 82 | $args['size'] = $args['default_size']; // Deprecated 0.5 in favor of $size 83 | 84 | /* If $custom_key is set, overwrite $meta_key. */ 85 | if ( !is_null( $args['custom_key'] ) ) 86 | $args['meta_key'] = $args['custom_key']; // Deprecated 0.6 in favor of $meta_key 87 | 88 | /* If $format is set to 'array', don't link to the post. */ 89 | if ( 'array' == $args['format'] ) 90 | $args['link_to_post'] = false; 91 | 92 | /* Extract the array to allow easy use of variables. */ 93 | extract( $args ); 94 | 95 | /* Get cache key based on $args. */ 96 | $key = md5( serialize( compact( array_keys( $args ) ) ) ); 97 | 98 | /* Check for a cached image. */ 99 | $image_cache = wp_cache_get( $post_id, 'get_the_image' ); 100 | 101 | if ( !is_array( $image_cache ) ) 102 | $image_cache = array(); 103 | 104 | /* If there is no cached image, let's see if one exists. */ 105 | if ( !isset( $image_cache[$key] ) || empty( $cache ) ) { 106 | 107 | /* If a custom field key (array) is defined, check for images by custom field. */ 108 | if ( !empty( $meta_key ) ) 109 | $image = get_the_image_by_meta_key( $args ); 110 | 111 | /* If no image found and $the_post_thumbnail is set to true, check for a post image (WP feature). */ 112 | if ( empty( $image ) && !empty( $the_post_thumbnail ) ) 113 | $image = get_the_image_by_post_thumbnail( $args ); 114 | 115 | /* If no image found and $attachment is set to true, check for an image by attachment. */ 116 | if ( empty( $image ) && !empty( $attachment ) ) 117 | $image = get_the_image_by_attachment( $args ); 118 | 119 | /* If no image found and $image_scan is set to true, scan the post for images. */ 120 | if ( empty( $image ) && !empty( $image_scan ) ) 121 | $image = get_the_image_by_scan( $args ); 122 | 123 | /* If no image found and a callback function was given. Callback function must pass back array of attributes. */ 124 | if ( empty( $image ) && !is_null( $callback ) && function_exists( $callback ) ) 125 | $image = call_user_func( $callback, $args ); 126 | 127 | /* If no image found and a $default_image is set, get the default image. */ 128 | if ( empty( $image ) && !empty( $default_image ) ) 129 | $image = get_the_image_by_default( $args ); 130 | 131 | /* If an image was found. */ 132 | if ( !empty( $image ) ) { 133 | 134 | /* If $meta_key_save was set, save the image to a custom field. */ 135 | if ( !empty( $meta_key_save ) ) 136 | get_the_image_meta_key_save( $args, $image['src'] ); 137 | 138 | /* Format the image HTML. */ 139 | $image = get_the_image_format( $args, $image ); 140 | 141 | /* Set the image cache for the specific post. */ 142 | $image_cache[$key] = $image; 143 | wp_cache_set( $post_id, $image_cache, 'get_the_image' ); 144 | } 145 | } 146 | 147 | /* If an image was already cached for the post and arguments, use it. */ 148 | else { 149 | $image = $image_cache[$key]; 150 | } 151 | 152 | /* Allow plugins/theme to override the final output. */ 153 | $image = apply_filters( 'get_the_image', $image ); 154 | 155 | /* If $format is set to 'array', return an array of image attributes. */ 156 | if ( 'array' == $format ) { 157 | 158 | /* Set up a default empty array. */ 159 | $out = array(); 160 | 161 | /* Get the image attributes. */ 162 | $atts = wp_kses_hair( $image, array( 'http' ) ); 163 | 164 | /* Loop through the image attributes and add them in key/value pairs for the return array. */ 165 | foreach ( $atts as $att ) 166 | $out[$att['name']] = $att['value']; 167 | 168 | $out['url'] = $out['src']; // @deprecated 0.5 Use 'src' instead of 'url'. 169 | 170 | /* Return the array of attributes. */ 171 | return $out; 172 | } 173 | 174 | /* Or, if $echo is set to false, return the formatted image. */ 175 | elseif ( false === $echo ) { 176 | return $image; 177 | } 178 | 179 | /* Display the image if we get to this point. */ 180 | echo $image; 181 | } 182 | 183 | /* Internal Functions */ 184 | 185 | /** 186 | * Calls images by custom field key. Script loops through multiple custom field keys. If that particular key 187 | * is found, $image is set and the loop breaks. If an image is found, it is returned. 188 | * 189 | * @since 0.7.0 190 | * @param array $args Arguments for how to load and display the image. 191 | * @return array|bool Array of image attributes. | False if no image is found. 192 | */ 193 | function get_the_image_by_meta_key( $args = array() ) { 194 | 195 | /* If $meta_key is not an array. */ 196 | if ( !is_array( $args['meta_key'] ) ) { 197 | 198 | /* Get the image URL by the single meta key. */ 199 | $image = get_post_meta( $args['post_id'], $args['meta_key'], true ); 200 | } 201 | 202 | /* If $meta_key is an array. */ 203 | elseif ( is_array( $args['meta_key'] ) ) { 204 | 205 | /* Loop through each of the given meta keys. */ 206 | foreach ( $args['meta_key'] as $meta_key ) { 207 | 208 | /* Get the image URL by the current meta key in the loop. */ 209 | $image = get_post_meta( $args['post_id'], $meta_key, true ); 210 | 211 | /* If an image was found, break out of the loop. */ 212 | if ( !empty( $image ) ) 213 | break; 214 | } 215 | } 216 | 217 | /* If a custom key value has been given for one of the keys, return the image URL. */ 218 | if ( !empty( $image ) ) 219 | return array( 'src' => $image ); 220 | 221 | return false; 222 | } 223 | 224 | /** 225 | * Checks for images using a custom version of the WordPress 2.9+ get_the_post_thumbnail() function. 226 | * If an image is found, return it and the $post_thumbnail_id. The WordPress function's other filters are 227 | * later added in the display_the_image() function. 228 | * 229 | * @since 0.7.0 230 | * @param array $args Arguments for how to load and display the image. 231 | * @return array|bool Array of image attributes. | False if no image is found. 232 | */ 233 | function get_the_image_by_post_thumbnail( $args = array() ) { 234 | 235 | /* Check for a post image ID (set by WP as a custom field). */ 236 | $post_thumbnail_id = get_post_thumbnail_id( $args['post_id'] ); 237 | 238 | /* If no post image ID is found, return false. */ 239 | if ( empty( $post_thumbnail_id ) ) 240 | return false; 241 | 242 | /* Apply filters on post_thumbnail_size because this is a default WP filter used with its image feature. */ 243 | $size = apply_filters( 'post_thumbnail_size', $args['size'] ); 244 | 245 | /* Get the attachment image source. This should return an array. */ 246 | $image = wp_get_attachment_image_src( $post_thumbnail_id, $size ); 247 | 248 | /* Get the attachment excerpt to use as alt text. */ 249 | $alt = trim( strip_tags( get_post_field( 'post_excerpt', $post_thumbnail_id ) ) ); 250 | 251 | /* Return both the image URL and the post thumbnail ID. */ 252 | return array( 'src' => $image[0], 'post_thumbnail_id' => $post_thumbnail_id, 'alt' => $alt ); 253 | } 254 | 255 | /** 256 | * Check for attachment images. Uses get_children() to check if the post has images attached. If image 257 | * attachments are found, loop through each. The loop only breaks once $order_of_image is reached. 258 | * 259 | * @since 0.7.0 260 | * @param array $args Arguments for how to load and display the image. 261 | * @return array|bool Array of image attributes. | False if no image is found. 262 | */ 263 | function get_the_image_by_attachment( $args = array() ) { 264 | 265 | /* Get attachments for the inputted $post_id. */ 266 | $attachments = get_children( array( 'post_parent' => $args['post_id'], 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ); 267 | 268 | /* If no attachments are found, check if the post itself is an attachment and grab its image. */ 269 | if ( empty( $attachments ) && $args['size'] ) { 270 | if ( 'attachment' == get_post_type( $args['post_id'] ) ) { 271 | $image = wp_get_attachment_image_src( $args['post_id'], $args['size'] ); 272 | $alt = trim( strip_tags( get_post_field( 'post_excerpt', $args['post_id'] ) ) ); 273 | } 274 | } 275 | 276 | /* If no attachments or image is found, return false. */ 277 | if ( empty( $attachments ) && empty( $image ) ) 278 | return false; 279 | 280 | /* Set the default iterator to 0. */ 281 | $i = 0; 282 | 283 | /* Loop through each attachment. Once the $order_of_image (default is '1') is reached, break the loop. */ 284 | foreach ( $attachments as $id => $attachment ) { 285 | if ( ++$i == $args['order_of_image'] ) { 286 | $image = wp_get_attachment_image_src( $id, $args['size'] ); 287 | $alt = trim( strip_tags( get_post_field( 'post_excerpt', $id ) ) ); 288 | break; 289 | } 290 | } 291 | 292 | /* Return the image URL. */ 293 | return array( 'src' => $image[0], 'alt' => $alt ); 294 | } 295 | 296 | /** 297 | * Scans the post for images within the content. Not called by default with get_the_image(). Shouldn't use 298 | * if using large images within posts, better to use the other options. 299 | * 300 | * @since 0.7.0 301 | * @param array $args Arguments for how to load and display the image. 302 | * @return array|bool Array of image attributes. | False if no image is found. 303 | */ 304 | function get_the_image_by_scan( $args = array() ) { 305 | 306 | /* Search the post's content for the tag and get its URL. */ 307 | preg_match_all( '||i', get_post_field( 'post_content', $args['post_id'] ), $matches ); 308 | 309 | /* If there is a match for the image, return its URL. */ 310 | if ( isset( $matches ) && !empty( $matches[1][0] ) ) 311 | return array( 'src' => $matches[1][0] ); 312 | 313 | return false; 314 | } 315 | 316 | /** 317 | * Used for setting a default image. The function simply returns the image URL it was given in an array. 318 | * Not used with get_the_image() by default. 319 | * 320 | * @since 0.7.0 321 | * @param array $args Arguments for how to load and display the image. 322 | * @return array|bool Array of image attributes. | False if no image is found. 323 | */ 324 | function get_the_image_by_default( $args = array() ) { 325 | return array( 'src' => $args['default_image'] ); 326 | } 327 | 328 | /** 329 | * Formats an image with appropriate alt text and class. Adds a link to the post if argument is set. Should 330 | * only be called if there is an image to display, but will handle it if not. 331 | * 332 | * @since 0.7.0 333 | * @param array $args Arguments for how to load and display the image. 334 | * @param array $image Array of image attributes ($image, $classes, $alt, $caption). 335 | * @return string $image Formatted image (w/link to post if the option is set). 336 | */ 337 | function get_the_image_format( $args = array(), $image = false ) { 338 | 339 | /* If there is no image URL, return false. */ 340 | if ( empty( $image['src'] ) ) 341 | return false; 342 | 343 | /* Extract the arguments for easy-to-use variables. */ 344 | extract( $args ); 345 | 346 | /* If there is alt text, set it. Otherwise, default to the post title. */ 347 | $image_alt = ( ( !empty( $image['alt'] ) ) ? $image['alt'] : apply_filters( 'the_title', get_post_field( 'post_title', $post_id ) ) ); 348 | 349 | /* If there is a width or height, set them as HMTL-ready attributes. */ 350 | $width = ( ( $width ) ? ' width="' . esc_attr( $width ) . '"' : '' ); 351 | $height = ( ( $height ) ? ' height="' . esc_attr( $height ) . '"' : '' ); 352 | 353 | /* Loop through the custom field keys and add them as classes. */ 354 | if ( is_array( $meta_key ) ) { 355 | foreach ( $meta_key as $key ) 356 | $classes[] = str_replace( ' ', '-', strtolower( $key ) ); 357 | } 358 | 359 | /* Add the $size and any user-added $image_class to the class. */ 360 | $classes[] = $size; 361 | $classes[] = $image_class; 362 | 363 | /* Join all the classes into a single string and make sure there are no duplicates. */ 364 | $class = join( ' ', array_unique( $classes ) ); 365 | 366 | /* If there is a $post_thumbnail_id, apply the WP filters normally associated with get_the_post_thumbnail(). */ 367 | if ( !empty( $image['post_thumbnail_id'] ) ) 368 | do_action( 'begin_fetch_post_thumbnail_html', $post_id, $image['post_thumbnail_id'], $size ); 369 | 370 | /* Add the image attributes to the element. */ 371 | $html = '' . esc_attr( strip_tags( $image_alt ) ) . ''; 372 | 373 | /* If $link_to_post is set to true, link the image to its post. */ 374 | if ( $link_to_post ) 375 | $html = '' . $html . ''; 376 | 377 | /* If there is a $post_thumbnail_id, apply the WP filters normally associated with get_the_post_thumbnail(). */ 378 | if ( !empty( $image['post_thumbnail_id'] ) ) 379 | do_action( 'end_fetch_post_thumbnail_html', $post_id, $image['post_thumbnail_id'], $size ); 380 | 381 | /* If there is a $post_thumbnail_id, apply the WP filters normally associated with get_the_post_thumbnail(). */ 382 | if ( !empty( $image['post_thumbnail_id'] ) ) 383 | $html = apply_filters( 'post_thumbnail_html', $html, $post_id, $image['post_thumbnail_id'], $size, '' ); 384 | 385 | return $html; 386 | } 387 | 388 | /** 389 | * Saves the image URL as the value of the meta key provided. This allows users to set a custom meta key 390 | * for their image. By doing this, users can trim off database queries when grabbing attachments or get rid 391 | * of expensive scans of the content when using the image scan feature. 392 | * 393 | * @since 0.6.0 394 | * @param array $args Arguments for how to load and display the image. 395 | * @param array $image Array of image attributes ($image, $classes, $alt, $caption). 396 | */ 397 | function get_the_image_meta_key_save( $args = array(), $image = array() ) { 398 | 399 | /* If the $meta_key_save argument is empty or there is no image $url given, return. */ 400 | if ( empty( $args['meta_key_save'] ) || empty( $image['src'] ) ) 401 | return; 402 | 403 | /* Get the current value of the meta key. */ 404 | $meta = get_post_meta( $args['post_id'], $args['meta_key_save'], true ); 405 | 406 | /* If there is no value for the meta key, set a new value with the image $url. */ 407 | if ( empty( $meta ) ) 408 | add_post_meta( $args['post_id'], $args['meta_key_save'], $image['src'] ); 409 | 410 | /* If the current value doesn't match the image $url, update it. */ 411 | elseif ( $meta !== $image['src'] ) 412 | update_post_meta( $args['post_id'], $args['meta_key_save'], $image['src'], $meta ); 413 | } 414 | 415 | /** 416 | * Deletes the image cache for the specific post when the 'save_post' hook is fired. 417 | * 418 | * @since 0.7.0 419 | */ 420 | function get_the_image_delete_cache_by_post( $post_id ) { 421 | wp_cache_delete( $post_id, 'get_the_image' ); 422 | } 423 | 424 | /** 425 | * Deletes the image cache for a specific post when the 'added_post_meta', 'deleted_post_meta', 426 | * or 'updated_post_meta' hooks are called. 427 | * 428 | * @since 0.7.0 429 | */ 430 | function get_the_image_delete_cache_by_meta( $meta_id, $post_id ) { 431 | wp_cache_delete( $post_id, 'get_the_image' ); 432 | } 433 | 434 | /** 435 | * @since 0.1.0 436 | * @deprecated 0.3.0 437 | */ 438 | function get_the_image_link( $deprecated = '', $deprecated_2 = '', $deprecated_3 = '' ) { 439 | get_the_image(); 440 | } 441 | 442 | /** 443 | * @since 0.3.0 444 | * @deprecated 0.7.0 445 | */ 446 | function image_by_custom_field( $args = array() ) { 447 | return get_the_image_by_meta_key( $args ); 448 | } 449 | 450 | /** 451 | * @since 0.4.0 452 | * @deprecated 0.7.0 453 | */ 454 | function image_by_the_post_thumbnail( $args = array() ) { 455 | return get_the_image_by_post_thumbnail( $args ); 456 | } 457 | 458 | /** 459 | * @since 0.3.0 460 | * @deprecated 0.7.0 461 | */ 462 | function image_by_attachment( $args = array() ) { 463 | return get_the_image_by_attachment( $args ); 464 | } 465 | 466 | /** 467 | * @since 0.3.0 468 | * @deprecated 0.7.0 469 | */ 470 | function image_by_scan( $args = array() ) { 471 | return get_the_image_by_scan( $args ); 472 | } 473 | 474 | /** 475 | * @since 0.3.0 476 | * @deprecated 0.7.0 477 | */ 478 | function image_by_default( $args = array() ) { 479 | return get_the_image_by_default( $args ); 480 | } 481 | 482 | /** 483 | * @since 0.1.0 484 | * @deprecated 0.7.0 485 | */ 486 | function display_the_image( $args = array(), $image = false ) { 487 | return get_the_image_format( $args, $image ); 488 | } 489 | 490 | /** 491 | * @since 0.5.0 492 | * @deprecated 0.7.0 Replaced by cache delete functions specifically for the post ID. 493 | */ 494 | function get_the_image_delete_cache() { 495 | return; 496 | } 497 | 498 | ?> -------------------------------------------------------------------------------- /library/functions/menus.php: -------------------------------------------------------------------------------- 1 | menu_item_parent != '0'){ 50 | if( !in_array($item->menu_item_parent, $menu_ids_that_have_childern ) ) 51 | $menu_ids_that_have_childern[] = $item->menu_item_parent; 52 | } 53 | 54 | } 55 | 56 | /* Add class 'has-children' to the items that have tha id in the previously populated $menu_ids_that_have_childern array */ 57 | foreach ( $items as $item ){ 58 | if( in_array( $item->ID, $menu_ids_that_have_childern ) ){ 59 | $item->classes[] = 'has-children'; 60 | } 61 | } 62 | 63 | 64 | return $items; 65 | } 66 | 67 | ?> -------------------------------------------------------------------------------- /library/functions/shortcodes.php: -------------------------------------------------------------------------------- 1 | ' . get_bloginfo( 'name' ) . ''; 50 | } 51 | 52 | 53 | 54 | /** 55 | * Shortcode to display a login link or logout link. 56 | * 57 | * @since 1.0.0 58 | * @uses is_user_logged_in() Checks if the current user is logged into the site. 59 | * @uses wp_logout_url() Creates a logout URL. 60 | * @uses wp_login_url() Creates a login URL. 61 | */ 62 | function bareskin_loginout_link_shortcode() { 63 | $domain = bareskin_get_textdomain(); 64 | if ( is_user_logged_in() ) 65 | $out = '' . __( 'Log out', $domain ) . ''; 66 | else 67 | $out = ''; 68 | 69 | return $out; 70 | } 71 | 72 | /** 73 | * Displays query count and load time if the current user can edit themes. 74 | * 75 | * @since 1.0.0 76 | * @uses current_user_can() Checks if the current user can edit themes. 77 | */ 78 | function bareskin_query_counter_shortcode() { 79 | if ( current_user_can( 'edit_theme_options' ) ) 80 | return sprintf( __( 'This page loaded in %1$s seconds with %2$s database queries.', bareskin_get_textdomain() ), timer_stop( 0, 3 ), get_num_queries() ); 81 | return ''; 82 | } 83 | 84 | /** 85 | * Displays a nav menu that has been created from the Menus screen in the admin. 86 | * 87 | * @since 1.0.0 88 | * @uses wp_nav_menu() Displays the nav menu. 89 | */ 90 | function bareskin_nav_menu_shortcode( $attr ) { 91 | 92 | $attr = shortcode_atts( 93 | array( 94 | 'menu' => '', 95 | 'container' => 'div', 96 | 'container_id' => '', 97 | 'container_class' => 'nav-menu', 98 | 'menu_id' => '', 99 | 'menu_class' => '', 100 | 'link_before' => '', 101 | 'link_after' => '', 102 | 'before' => '', 103 | 'after' => '', 104 | 'fallback_cb' => 'wp_page_menu', 105 | 'walker' => '' 106 | ), 107 | $attr 108 | ); 109 | $attr['echo'] = false; 110 | 111 | return wp_nav_menu( $attr ); 112 | } 113 | 114 | ?> -------------------------------------------------------------------------------- /library/functions/sidebars.php: -------------------------------------------------------------------------------- 1 | '', 45 | 'before_title' => '

    ', 46 | 'after_title' => '

    ' 47 | ); 48 | 49 | /* Parse the sidebar arguments and defaults. */ 50 | $args = wp_parse_args( $core_sidebars[$sidebar], $defaults ); 51 | 52 | /* If no 'id' was given, use the $sidebar variable and sanitize it. */ 53 | $args['id'] = ( isset( $args['id'] ) ? sanitize_key( $args['id'] ) : sanitize_key( $sidebar ) ); 54 | 55 | /* Register the sidebar. */ 56 | register_sidebar( $args ); 57 | } 58 | } 59 | } 60 | 61 | /** 62 | * Returns an array of the theme's available sidebars for use in themes. We'll just set the 63 | * ID (array keys), name, and description of each sidebar. The other sidebar arguments will be set when the 64 | * sidebar is registered. 65 | * 66 | * @since 1.0.0 67 | */ 68 | function bareskin_get_sidebars() { 69 | 70 | /* Get the theme textdomain. */ 71 | $domain = bareskin_get_textdomain(); 72 | 73 | /* Get the theme prefix */ 74 | $prefix = bareskin_get_prefix(); 75 | 76 | /* Set up an array of sidebars. */ 77 | $sidebars = array( 78 | 'primary' => array( 79 | 'name' => _x( 'Primary', 'sidebar', $domain ), 80 | 'description' => __( 'The main (primary) widget area, most often used as a sidebar.', $domain ) 81 | ), 82 | 'secondary' => array( 83 | 'name' => _x( 'Secondary', 'sidebar', $domain ), 84 | 'description' => __( 'The second most important widget area, most often used as a secondary sidebar.', $domain ), 85 | ), 86 | 'subsidiary' => array( 87 | 'name' => _x( 'Subsidiary', 'sidebar', $domain ), 88 | 'description' => __( 'A widget area loaded in the footer of the site.', $domain ), 89 | ), 90 | 'subsidiary2' => array( 91 | 'name' => _x( 'Subsidiary 2', 'sidebar', $domain ), 92 | 'description' => __( 'Second widget area loaded in the footer of the site.', $domain ), 93 | ), 94 | 'subsidiary3' => array( 95 | 'name' => _x( 'Subsidiary 3', 'sidebar', $domain ), 96 | 'description' => __( 'Third widget area loaded in the footer of the site.', $domain ), 97 | ), 98 | 'header' => array( 99 | 'name' => _x( 'Header', 'sidebar', $domain ), 100 | 'description' => __( 'Displayed within the site\'s header area.', $domain ), 101 | ), 102 | 'before-content' => array( 103 | 'name' => _x( 'Before Content', 'sidebar', $domain ), 104 | 'description' => __( 'Loaded before the page\'s main content area.', $domain ), 105 | ), 106 | 'after-content' => array( 107 | 'name' => _x( 'After Content', 'sidebar', $domain ), 108 | 'description' => __( 'Loaded after the page\'s main content area.', $domain ), 109 | ), 110 | 'after-singular' => array( 111 | 'name' => _x( 'After Singular', 'sidebar', $domain ), 112 | 'description' => __( 'Loaded on singular post (page, attachment, etc.) views before the comments area.', $domain ) 113 | ) 114 | ); 115 | 116 | /* Return the sidebars. */ 117 | return apply_filters( "bareskin_register_sidebars", $sidebars ); 118 | } 119 | 120 | ?> -------------------------------------------------------------------------------- /library/functions/widgets.php: -------------------------------------------------------------------------------- 1 | 'widget_adv_recent_entries', 'description' => __( "The most recent posts on your site with options") ); 11 | parent::__construct('adv-recent-posts', __('Advanced Recent Posts'), $widget_ops); 12 | $this->alt_option_name = 'widget_adv_recent_entries'; 13 | 14 | add_action( 'save_post', array(&$this, 'flush_widget_cache') ); 15 | add_action( 'deleted_post', array(&$this, 'flush_widget_cache') ); 16 | add_action( 'switch_theme', array(&$this, 'flush_widget_cache') ); 17 | add_action( 'init', array(&$this, 'setup_image_sizes') ); 18 | } 19 | 20 | function widget($args, $instance) { 21 | $cache = wp_cache_get('widget_adv_recent_posts', 'widget'); 22 | 23 | if ( !is_array($cache) ) 24 | $cache = array(); 25 | 26 | if ( isset($cache[$args['widget_id']]) ) { 27 | echo $cache[$args['widget_id']]; 28 | return; 29 | } 30 | 31 | ob_start(); 32 | extract($args); 33 | 34 | $title = apply_filters('widget_title', empty($instance['title']) ? __('Recent Posts') : $instance['title'], $instance, $this->id_base); 35 | if ( ! $number = absint( $instance['number'] ) ) 36 | $number = 10; 37 | 38 | $category = $instance['category']; 39 | 40 | $posttype = $instance['posttype']; 41 | $thumbnail = $instance['thumbnail']; 42 | if ( ! $thumbnail_width = absint( $instance['thumbnail_width'] ) ) 43 | $thumbnail_width = 100; 44 | if ( ! $thumbnail_height = absint( $instance['thumbnail_height'] ) ) 45 | $thumbnail_height = 80; 46 | 47 | $args = array('posts_per_page' => $number, 'no_found_rows' => true, 'post_status' => 'publish', 'ignore_sticky_posts' => true); 48 | if( $category != -1 ) 49 | $args['cat'] = $category; 50 | if( $posttype != 'post' ) 51 | $args['post_type'] = $posttype; 52 | 53 | $r = new WP_Query( $args ); 54 | if ($r->have_posts()) : 55 | ?> 56 | 57 | 58 | 68 | 69 | flush_widget_cache(); 89 | 90 | $alloptions = wp_cache_get( 'alloptions', 'options' ); 91 | if ( isset($alloptions['widget_adv_recent_entries']) ) 92 | delete_option('widget_adv_recent_entries'); 93 | 94 | return $instance; 95 | } 96 | 97 | function flush_widget_cache() { 98 | wp_cache_delete('widget_adv_recent_posts', 'widget'); 99 | } 100 | 101 | function setup_image_sizes( ){ 102 | 103 | $all_widget_settings = $this->get_settings('thumbnail_width'); 104 | $widget_settings = $all_widget_settings[$this->number]; 105 | 106 | if( get_theme_support( 'bareskin-get-image' ) != false && $widget_settings['thumbnail'] == 1 ){ 107 | add_image_size('advanced-recent-posts-'.$this->number, $widget_settings['thumbnail_width'], $widget_settings['thumbnail_height'], true ); 108 | } 109 | 110 | } 111 | 112 | function form( $instance ) { 113 | $posttypes = get_post_types('', 'objects'); 114 | 115 | $title = isset($instance['title']) ? esc_attr($instance['title']) : ''; 116 | $number = isset($instance['number']) ? absint($instance['number']) : 5; 117 | $category = isset($instance['category']) ? (int)$instance['category'] : -1; 118 | $posttype = isset($instance['posttype']) ? esc_attr($instance['posttype']) : 'post'; 119 | $thumbnail = esc_attr($instance['thumbnail']); 120 | $thumbnail_width = isset($instance['thumbnail_width']) ? absint($instance['thumbnail_width']) : 100; 121 | $thumbnail_height = isset($instance['thumbnail_height']) ? absint($instance['thumbnail_height']) : 80; 122 | 123 | ?> 124 |

    125 |

    126 | 127 |

    128 |

    129 | 130 |

    131 | $category, 'name' => $this->get_field_name('category'), 'show_option_none' => 'Select' ) ); ?> 132 |

    133 | 134 |

    135 | 136 | 143 |

    144 | 145 | 146 | 147 |

    148 | 149 | /> 150 |

    151 | 152 |

    153 | 154 | 155 |

    156 | 157 |

    158 | 159 | 160 |

    161 | 162 | 'adv_widget_text', 'description' => __('Arbitrary text or HTML')); 11 | $control_ops = array('width' => 400, 'height' => 350); 12 | parent::__construct('advanced_text', __('Advanced Text'), $widget_ops, $control_ops); 13 | } 14 | 15 | function widget( $args, $instance ) { 16 | extract($args); 17 | $title = apply_filters( 'widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base); 18 | $text = apply_filters( 'adv_widget_text', $instance['text'], $instance ); 19 | echo $before_widget; 20 | echo '
    ' ; 21 | if ( !empty( $title ) ) { echo $before_title . $title . $after_title; } ?> 22 |
    23 | '; 25 | echo $after_widget; 26 | } 27 | 28 | function update( $new_instance, $old_instance ) { 29 | $instance = $old_instance; 30 | $instance['title'] = strip_tags($new_instance['title']); 31 | $instance['class'] = strip_tags($new_instance['class']); 32 | if ( current_user_can('unfiltered_html') ) 33 | $instance['text'] = $new_instance['text']; 34 | else 35 | $instance['text'] = stripslashes( wp_filter_post_kses( addslashes($new_instance['text']) ) ); // wp_filter_post_kses() expects slashed 36 | $instance['filter'] = isset($new_instance['filter']); 37 | return $instance; 38 | } 39 | 40 | function form( $instance ) { 41 | $instance = wp_parse_args( (array) $instance, array( 'title' => '', 'class' => '', 'text' => '' ) ); 42 | $title = strip_tags($instance['title']); 43 | $class = strip_tags($instance['class']); 44 | $text = esc_textarea($instance['text']); 45 | ?> 46 |

    47 |

    48 | 49 |

    50 |

    51 | 52 | 53 | 54 |

    /> 

    55 | 'widget_advertisment', 'description' => __('Advertisment Script')); 11 | $control_ops = array('width' => 400, 'height' => 350); 12 | parent::__construct('advertisment', __('Advertiment'), $widget_ops, $control_ops); 13 | } 14 | 15 | function widget( $args, $instance ) { 16 | extract($args); 17 | $title = apply_filters( 'widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base); 18 | $text = apply_filters( 'widget_text', $instance['text'], $instance ); 19 | echo $before_widget; 20 | if ( !empty( $title ) ) { echo $before_title . $title . $after_title; } ?> 21 |
    22 | '', 'text' => '' ) ); 39 | $title = strip_tags($instance['title']); 40 | $text = esc_textarea($instance['text']); 41 | ?> 42 |

    43 |

    44 | 45 | 46 | 47 |

    /> 

    48 | -------------------------------------------------------------------------------- /loop-nav.php: -------------------------------------------------------------------------------- 1 | 16 |
    ', '' . _x( '←', 'Previous post link', bareskin_get_textdomain() ) . ' %title' ); ?> 21 | %link
  • ', '%title ' . _x( '→', 'Next post link', bareskin_get_textdomain() ) . '' ); ?> 22 | 23 | max_num_pages > 1 && ( is_home() || is_archive() || is_search() ) ) : // navigation links for home, archive, and search pages ?> 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /menu-primary.php: -------------------------------------------------------------------------------- 1 | 11 | 12 | 16 | 17 | -------------------------------------------------------------------------------- /page.php: -------------------------------------------------------------------------------- 1 | 15 | 16 |
    17 |
    18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 |
    30 |
    31 | 32 | 33 | -------------------------------------------------------------------------------- /readme.txt: -------------------------------------------------------------------------------- 1 | BareSkin Theme v. 0.8 2 | 3 | ## Adding new theme settings ## 4 | 5 | # Adding a box to the settings page: 6 | - you must use the "add_meta_boxes" action hook: 7 | 8 | add_action( 'add_meta_boxes', 'bareskin_meta_box_add_new_box' ); 9 | 10 | - either use the global $bareskin_settings_page or 'appearance_page_theme-settings' 11 | - add_meta_box $context var can be 'normal', 'side' or 'advanced' 12 | 13 | function bareskin_meta_box_add_new_box() { 14 | global $bareskin_settings_page; 15 | /* Get theme information. */ 16 | $prefix = bareskin_get_prefix(); 17 | $domain = bareskin_get_textdomain(); 18 | 19 | add_meta_box( 'new-metabox-slug', __( 'New Meta Box', $domain ), 'bareskin_meta_box_new_box_display', $bareskin_settings_page, 'side', 'high' ); 20 | 21 | } 22 | - the processing of the actual fields is done using the Settings API. No need to bother with nonce. 23 | - you must use bareskin_settings_field_name('example-name') to generate a name attribute for the field, and bareskin_get_setting('example-name') to retrive the value. 24 | function bareskin_meta_box_new_box_display(){ 25 | $domain = bareskin_get_textdomain(); 26 | ?> 27 |

    28 | 29 |

    30 | 31 |

    32 | 33 | 34 |

    35 | _x( 'New Sidebare', 'sidebar', $domain ), 77 | 'description' => __( 'Loaded on singular post (page, attachment, etc.) views before the comments area.', $domain )); 78 | return $sidebars; 79 | } 80 | - pass to the second argument of add_theme_support('bareskin-sidebars')' the sidebar id like so 81 | 82 | add_theme_support( 'bareskin-sidebars', array( 'new-sidebar' ) ); 83 | -------------------------------------------------------------------------------- /search.php: -------------------------------------------------------------------------------- 1 | 10 | 11 |
    12 |
    13 | 14 | 15 | 16 | 19 | 20 | 21 | 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 | 47 | 48 | -------------------------------------------------------------------------------- /searchform.php: -------------------------------------------------------------------------------- 1 | 10 | 11 | -------------------------------------------------------------------------------- /sidebar-after-content.php: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 15 | 16 | -------------------------------------------------------------------------------- /sidebar-before-content.php: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 15 | 16 | -------------------------------------------------------------------------------- /sidebar-subsidiary.php: -------------------------------------------------------------------------------- 1 | 10 | 11 |
    12 |
    13 | 14 | 17 | 18 | 21 | 22 | 25 | 26 | 27 |
    28 |
    29 | -------------------------------------------------------------------------------- /sidebar.php: -------------------------------------------------------------------------------- 1 | 10 | 35 | 36 | 37 | 40 | -------------------------------------------------------------------------------- /single.php: -------------------------------------------------------------------------------- 1 | 11 | 12 | 13 | 14 |
    15 | 16 |
    17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 |
    33 |
    34 | 35 | 36 | -------------------------------------------------------------------------------- /style.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Theme Name: BareSkin 3 | Theme URI: http://cozmoslabs.com/ 4 | Author: Cozmoslabs 5 | Author URI: http://cozmoslabs.com/ 6 | Description: A semantic, HTML5, canvas for CSS artists and an ultra-minimal set of super-clean templates for your own WordPress theme development. 7 | Version: 1.0 8 | License: GNU General Public License 9 | License URI: license.txt 10 | Tags: custom-menu, sticky-post, microformats, rtl-language-support, translation-ready, full-width-template, post-formats 11 | 12 | This theme, like WordPress, is licensed under the GPL. 13 | Use it to make something cool, have fun, and share what you've learned with others. 14 | */ 15 | 16 | 17 | /* Reset browser defaults */ 18 | @import url('library/css/reset.css'); 19 | 20 | /* Apply a basic layout */ 21 | @import url('library/css/2c-r-fixed.css'); 22 | 23 | /* Apply a responsive layout */ 24 | @import url('library/css/responsive.css'); 25 | 26 | 27 | /* =Global Elements 28 | -------------------------------------------------------------- */ 29 | body, input, textarea { 30 | font: 15px Arial,sans-serif; 31 | line-height:22px; 32 | } 33 | p, ul, ol, dd, pre { 34 | margin-bottom:22px; 35 | } 36 | 37 | ul, ol{ 38 | margin-left:20px; 39 | } 40 | 41 | dl dd{ 42 | margin-left:30px; 43 | } 44 | pre, code { 45 | font:14px Monaco, monospace; 46 | line-height:22px; 47 | } 48 | blockquote { 49 | color:#666; 50 | font-style:italic; 51 | } 52 | 53 | table { 54 | border:1px solid #ccc; 55 | border-width:1px 1px 0 1px; 56 | border-collapse: collapse; 57 | font-size:13px; 58 | line-height:18px; 59 | margin:0 0 22px 0; 60 | text-align:left; 61 | } 62 | 63 | table.form-table{ 64 | border:0; 65 | } 66 | 67 | caption { 68 | text-align:left; 69 | } 70 | tr { 71 | border-bottom:1px solid #ccc; 72 | } 73 | th, td { 74 | padding: .7em 1.25em; 75 | } 76 | 77 | a:link { 78 | color:#ba0000; 79 | } 80 | a:visited { 81 | color:#A91B33; 82 | } 83 | a:active, 84 | a:hover { 85 | color: #ff0000; 86 | } 87 | 88 | /* Alignment */ 89 | .alignleft { 90 | display: inline; 91 | float: left; 92 | } 93 | .alignright { 94 | display: inline; 95 | float: right; 96 | } 97 | .aligncenter { 98 | clear: both; 99 | display: block; 100 | margin-left: auto; 101 | margin-right: auto; 102 | } 103 | 104 | /* =Header 105 | -------------------------------------------------------------- */ 106 | #site-title { 107 | float:left; 108 | font-size:50px; 109 | font-weight:bold; 110 | } 111 | 112 | #site-title img{ 113 | display: block; 114 | } 115 | 116 | #site-title a{ 117 | color:#000; 118 | text-shadow: -1px -1px 0 rgba(0,0,0,0.3), 1px -1px 0 rgba(0,0,0,0.3), -1px 1px 0 rgba(0,0,0,0.3), 1px 1px 0 rgba(0,0,0,0.3); 119 | text-rendering: optimizeLegibility; 120 | line-height:150px; 121 | height:150px; 122 | } 123 | 124 | #site-title a:hover{ 125 | color:#ba0000; 126 | } 127 | 128 | #site-description { 129 | margin-top:70px; 130 | float:right; 131 | width:50%; 132 | text-align:right; 133 | } 134 | 135 | 136 | /* =Menu 137 | -------------------------------------------------------------- */ 138 | 139 | #access{ 140 | display:block; 141 | background:#fafafa; 142 | box-shadow: 0 3px 3px rgba(0,0,0,0.2); 143 | -moz-box-shadow: 0 3px 3px rgba(0,0,0,0.2); 144 | -webkit-box-shadow: 0 3px 3px rgba(0,0,0,0.2); 145 | clear:both; 146 | margin-top:10px; 147 | } 148 | 149 | #access ul { 150 | list-style: none; 151 | margin: 0; 152 | } 153 | 154 | #access li { 155 | float: left; 156 | position: relative; 157 | } 158 | 159 | #access a { 160 | display: block; 161 | line-height: 30px; 162 | padding: 0 10px; 163 | text-decoration: none; 164 | color:#333; 165 | } 166 | 167 | #access ul ul { 168 | box-shadow: 0 3px 3px rgba(0,0,0,0.2); 169 | -moz-box-shadow: 0 3px 3px rgba(0,0,0,0.2); 170 | -webkit-box-shadow: 0 3px 3px rgba(0,0,0,0.2); 171 | display: none; 172 | float: left; 173 | position: absolute; 174 | top: 30px; /* Same height as tha a*/ 175 | left: 0; 176 | z-index: 99999; 177 | } 178 | #access ul ul ul { 179 | left: 100%; 180 | top: 0; 181 | } 182 | #access ul ul a { 183 | background: #dedede; 184 | line-height: 30px; 185 | padding: 0 10px; 186 | width: 10em; 187 | height: auto; 188 | } 189 | 190 | #access li:hover > a, 191 | #access ul ul :hover > a { 192 | background: #dedede; 193 | } 194 | #access ul ul a:hover { 195 | background: #cecece; 196 | } 197 | #access ul li:hover > ul { 198 | display: block; 199 | } 200 | 201 | 202 | 203 | /* =Content 204 | -------------------------------------------------------------- */ 205 | 206 | article{ 207 | position: relative; 208 | clear: both; 209 | margin-bottom:50px; 210 | display: block; 211 | } 212 | 213 | .entry-summary { 214 | overflow:hidden; 215 | } 216 | 217 | .entry-header, .page-header{ 218 | margin-bottom:22px; 219 | } 220 | 221 | .entry-title, .entry-title a{ 222 | font-size:28px; 223 | color:#333; 224 | line-height:30px; 225 | } 226 | 227 | .entry-title a:hover{ 228 | color:#ba0000; 229 | } 230 | 231 | .sticky { 232 | } 233 | 234 | .entry-meta, .entry-utility { 235 | clear: both; 236 | display: block; 237 | font-style:italic; 238 | color:#666; 239 | margin:10px 0 22px; 240 | } 241 | 242 | .entry-meta{ 243 | margin:10px 0 0; 244 | } 245 | 246 | .entry-meta a, .entry-utility a{ 247 | color:#666; 248 | text-decoration:none; 249 | } 250 | 251 | .entry-meta a:hover, .entry-utility a:hover{ 252 | color:#ba0000; 253 | } 254 | 255 | .entry-meta .sep, .entry-utility .sep{ 256 | color:#333; 257 | } 258 | 259 | .entry-content h1, .entry-summary h1{ 260 | font-size:20px; 261 | margin-bottom:20px; 262 | } 263 | 264 | .entry-content h2, .entry-summary h2{ 265 | font-size:18px; 266 | margin-bottom:15px; 267 | } 268 | 269 | .entry-content h3, .entry-summary h3{ 270 | font-size:16px; 271 | font-style:italic; 272 | margin-bottom:10px; 273 | } 274 | 275 | .entry-content h4, .entry-summary h4{ 276 | font-size:16px; 277 | margin-bottom:10px; 278 | } 279 | 280 | .entry-content h5, .entry-summary h5{ 281 | font-size:14px; 282 | margin-bottom:10px; 283 | } 284 | 285 | .entry-content h6, .entry-summary h6{ 286 | font-size:12px; 287 | margin-bottom:10px; 288 | } 289 | 290 | .page-link{ 291 | clear:both; 292 | } 293 | 294 | #content nav { 295 | display: block; 296 | overflow: hidden; 297 | } 298 | #content nav .nav-previous { 299 | float: left; 300 | width: 50%; 301 | } 302 | #content nav .nav-next { 303 | float: right; 304 | text-align: right; 305 | width: 50%; 306 | } 307 | 308 | #nav-below { 309 | margin: 20px 0; 310 | } 311 | 312 | article blockquote { 313 | position: relative; 314 | padding:0 50px; 315 | } 316 | article blockquote:before { 317 | color:#ebd91c; 318 | content:"\201C"; 319 | position: absolute; 320 | top: 0px; 321 | left:0px; 322 | font:82px/1 Georgia; 323 | } 324 | article blockquote:after { 325 | color: #ebd91c; 326 | content: "\201D"; 327 | position: absolute; 328 | bottom: 0; 329 | right: 0px; 330 | font: 82px/0.25 Georgia; 331 | } 332 | 333 | 334 | /* =Breadcrumb Trail 335 | -------------------------------------------------------------- */ 336 | .breadcrumb{ 337 | padding-bottom:10px; 338 | margin-bottom:10px; 339 | border-bottom:1px dashed #ccc; 340 | } 341 | 342 | /* 343 | Default style for WP-PageNavi plugin 344 | 345 | http://wordpress.org/extend/plugins/wp-pagenavi/ 346 | */ 347 | 348 | .wp-pagenavi { 349 | clear: both; 350 | padding:2px 0; 351 | } 352 | 353 | .wp-pagenavi a, .wp-pagenavi span { 354 | text-decoration: none; 355 | border: 1px solid #BFBFBF; 356 | padding: 3px 5px; 357 | margin: 2px; 358 | } 359 | 360 | .wp-pagenavi a:hover, .wp-pagenavi span.current { 361 | border-color: #000; 362 | } 363 | 364 | .wp-pagenavi span.current { 365 | font-weight: bold; 366 | } 367 | 368 | 369 | /* =Images 370 | -------------------------------------------------------------- */ 371 | 372 | a img { 373 | border: none; 374 | } 375 | p img { 376 | margin-bottom: 0.5em; /* a small bottom margin prevents content floating under images */ 377 | } 378 | /* 379 | Resize images to fit the main content area. 380 | - Applies only to images uploaded via WordPress by targeting size-* classes. 381 | - Other images will be left alone. Use "size-auto" class to apply to other images. 382 | */ 383 | img.size-auto, 384 | img.size-full, 385 | img.size-large, 386 | img.size-medium, 387 | .attachment img, 388 | .widget-area img { 389 | max-width: 100%; /* When images are too wide for containing element, force them to fit. */ 390 | height: auto; /* Override height to match resized width for correct aspect ratio. */ 391 | } 392 | img.alignleft { 393 | margin-right: 10px; 394 | } 395 | img.alignright { 396 | margin-left: 10px; 397 | } 398 | .wp-caption { 399 | padding: .5em; 400 | text-align: center; 401 | width:auto !important; 402 | } 403 | .wp-caption img { 404 | margin: .25em; 405 | } 406 | .wp-caption .wp-caption-text { 407 | margin: .5em; 408 | } 409 | .gallery-caption { 410 | 411 | } 412 | .wp-smiley { 413 | margin: 0; 414 | } 415 | 416 | /* =Forms 417 | -------------------------------------------------------------- */ 418 | 419 | #searchform label { 420 | display: none; 421 | } 422 | #searchform input#s { 423 | width: 60%; 424 | } 425 | input[type=text], 426 | input#s { 427 | margin: 0 1em 0 0; 428 | width: 60%; 429 | } 430 | textarea { 431 | width: 80%; 432 | } 433 | 434 | /* Class for labelling required form items */ 435 | .required { 436 | color: #cc0033; 437 | } 438 | 439 | 440 | /* =Comments 441 | -------------------------------------------------------------- */ 442 | #comments{ 443 | margin:30px 0; 444 | } 445 | 446 | .commentlist{ 447 | margin:22px 0; 448 | } 449 | 450 | #comments #comments-title { 451 | -webkit-font-smoothing: antialiased; 452 | font-size: 20px; 453 | margin:0 0 22px; 454 | } 455 | 456 | #comments .commentlist li { 457 | list-style-type: none; 458 | } 459 | #comments article p { 460 | font-size: 14px; 461 | } 462 | #comments article footer { 463 | font-size: 13px; 464 | } 465 | #comments article footer a { 466 | font-weight: bold; 467 | color: #888; 468 | } 469 | #comments article footer cite a { 470 | font-style: normal; 471 | font-size: 15px; 472 | color: #222; 473 | } 474 | 475 | #comments ul.children article { 476 | position:relative; 477 | padding:15px; 478 | margin:1em 0 3em; 479 | } 480 | #comments ul.children li { 481 | position: relative; 482 | } 483 | #comments article { 484 | padding: 20px 0; 485 | } 486 | 487 | #comments li.bypostauthor > article { 488 | background: #e4eed6; 489 | } 490 | 491 | #respond{ 492 | margin:22px 0 0; 493 | } 494 | 495 | #respond input[type=text] { 496 | display: block; 497 | width: 60%; 498 | } 499 | #respond textarea { 500 | display: block; 501 | margin: 0 0 1em; 502 | width: 80%; 503 | } 504 | #respond .form-allowed-tags { 505 | display:none; 506 | } 507 | #respond .form-allowed-tags code { 508 | display: block; 509 | } 510 | 511 | 512 | /* =Widgets 513 | -------------------------------------------------------------- */ 514 | .widget { 515 | display: block; 516 | margin-bottom:30px; 517 | } 518 | 519 | .widget-title{ 520 | font-size:18px; 521 | margin-bottom:15px; 522 | } 523 | 524 | #subsidiary .widget{ 525 | padding-right:10px; 526 | } 527 | 528 | #subsidiary-second .widget{ 529 | padding:0 10px; 530 | } 531 | 532 | #subsidiary-third .widget{ 533 | padding-left:10px; 534 | } 535 | 536 | /* =Footer 537 | -------------------------------------------------------------- */ 538 | 539 | #inner-footer { 540 | background:#fafafa; 541 | box-shadow: 0 3px 3px rgba(0,0,0,0.2); 542 | -moz-box-shadow: 0 3px 3px rgba(0,0,0,0.2); 543 | -webkit-box-shadow: 0 3px 3px rgba(0,0,0,0.2); 544 | padding:5px 10px; 545 | } 546 | -------------------------------------------------------------------------------- /tag.php: -------------------------------------------------------------------------------- 1 | 10 | 11 |
    12 |
    13 | 14 | 15 | 16 |
    ' ); 25 | ?> 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 |
    48 |
    49 |

    50 |
    51 | 52 |
    53 |

    54 | 55 |
    56 |
    57 | 58 | 59 | 60 |
    61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /tpl_full-width-page.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
    13 |
    14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
    22 |
    23 | 24 | --------------------------------------------------------------------------------