├── images ├── 0.jpg ├── 1.jpg ├── 2.jpg ├── 3.jpg ├── 4.jpg ├── 5.jpg ├── bg-d.gif ├── bg-m.gif ├── line.gif ├── next.png ├── play.png ├── rss.gif ├── close.png ├── line-t.gif ├── loading.gif ├── login.png ├── menu-t.png ├── pause.png ├── search.png ├── button-w.png ├── more-tag.png ├── previous.png ├── search-m.png ├── wsu-logo.png ├── archive-feed.png ├── button-grad.png ├── cahnrs-nav.png ├── more-button.png ├── site-nav-bg.png ├── spacer-tall.gif ├── spacer-wide.gif ├── wsu-logo-m.png ├── wsu-logo-t.png └── button-grad-active.png ├── screenshot.png ├── sidebar.php ├── css ├── dynamic_interface.old.css.zip ├── media_categories.css ├── theme_options.css ├── print.css ├── editor.css ├── login.css ├── dynamic_interface.css └── shadowbox.css ├── plugins ├── tinymce_table │ ├── css │ │ ├── table.css │ │ ├── cell.css │ │ └── row.css │ ├── langs │ │ ├── langs.php │ │ └── en_dlg.js │ ├── js │ │ ├── merge_cells.js │ │ ├── mctabs.js │ │ ├── editable_selects.js │ │ ├── tiny_mce_popup.js │ │ ├── validate.js │ │ ├── form_utils.js │ │ ├── row.js │ │ └── cell.js │ ├── merge_cells.htm │ ├── row.htm │ ├── cell.htm │ └── table.htm ├── tinymce_config.php ├── breadcrumbs.php └── media_categories.php ├── footer-iframe.php ├── 404.php ├── search.php ├── attachment.php ├── image.php ├── author.php ├── index.php ├── loop.php ├── single-storyproject.php ├── js ├── media_categories.js ├── init.js ├── respond.min.js ├── layout.js ├── slideshow.js ├── print.js ├── initBackup.js └── dynamic_page_interface.js ├── header-iframe.php ├── comments.php ├── inc ├── tribe_events_feed.php ├── dynamic_slideshow_display.php ├── layout_options.php └── custom_header.php ├── archive.php ├── single.php ├── page.php └── archive-storyproject.php /images/0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washingtonstateuniversity/CAHNRSWP-Theme-Web-Integration-Project/master/images/0.jpg -------------------------------------------------------------------------------- /images/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washingtonstateuniversity/CAHNRSWP-Theme-Web-Integration-Project/master/images/1.jpg -------------------------------------------------------------------------------- /images/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washingtonstateuniversity/CAHNRSWP-Theme-Web-Integration-Project/master/images/2.jpg -------------------------------------------------------------------------------- /images/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washingtonstateuniversity/CAHNRSWP-Theme-Web-Integration-Project/master/images/3.jpg -------------------------------------------------------------------------------- /images/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washingtonstateuniversity/CAHNRSWP-Theme-Web-Integration-Project/master/images/4.jpg -------------------------------------------------------------------------------- /images/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washingtonstateuniversity/CAHNRSWP-Theme-Web-Integration-Project/master/images/5.jpg -------------------------------------------------------------------------------- /images/bg-d.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washingtonstateuniversity/CAHNRSWP-Theme-Web-Integration-Project/master/images/bg-d.gif -------------------------------------------------------------------------------- /images/bg-m.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washingtonstateuniversity/CAHNRSWP-Theme-Web-Integration-Project/master/images/bg-m.gif -------------------------------------------------------------------------------- /images/line.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washingtonstateuniversity/CAHNRSWP-Theme-Web-Integration-Project/master/images/line.gif -------------------------------------------------------------------------------- /images/next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washingtonstateuniversity/CAHNRSWP-Theme-Web-Integration-Project/master/images/next.png -------------------------------------------------------------------------------- /images/play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washingtonstateuniversity/CAHNRSWP-Theme-Web-Integration-Project/master/images/play.png -------------------------------------------------------------------------------- /images/rss.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washingtonstateuniversity/CAHNRSWP-Theme-Web-Integration-Project/master/images/rss.gif -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washingtonstateuniversity/CAHNRSWP-Theme-Web-Integration-Project/master/screenshot.png -------------------------------------------------------------------------------- /images/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washingtonstateuniversity/CAHNRSWP-Theme-Web-Integration-Project/master/images/close.png -------------------------------------------------------------------------------- /images/line-t.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washingtonstateuniversity/CAHNRSWP-Theme-Web-Integration-Project/master/images/line-t.gif -------------------------------------------------------------------------------- /images/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washingtonstateuniversity/CAHNRSWP-Theme-Web-Integration-Project/master/images/loading.gif -------------------------------------------------------------------------------- /images/login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washingtonstateuniversity/CAHNRSWP-Theme-Web-Integration-Project/master/images/login.png -------------------------------------------------------------------------------- /images/menu-t.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washingtonstateuniversity/CAHNRSWP-Theme-Web-Integration-Project/master/images/menu-t.png -------------------------------------------------------------------------------- /images/pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washingtonstateuniversity/CAHNRSWP-Theme-Web-Integration-Project/master/images/pause.png -------------------------------------------------------------------------------- /images/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washingtonstateuniversity/CAHNRSWP-Theme-Web-Integration-Project/master/images/search.png -------------------------------------------------------------------------------- /images/button-w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washingtonstateuniversity/CAHNRSWP-Theme-Web-Integration-Project/master/images/button-w.png -------------------------------------------------------------------------------- /images/more-tag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washingtonstateuniversity/CAHNRSWP-Theme-Web-Integration-Project/master/images/more-tag.png -------------------------------------------------------------------------------- /images/previous.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washingtonstateuniversity/CAHNRSWP-Theme-Web-Integration-Project/master/images/previous.png -------------------------------------------------------------------------------- /images/search-m.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washingtonstateuniversity/CAHNRSWP-Theme-Web-Integration-Project/master/images/search-m.png -------------------------------------------------------------------------------- /images/wsu-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washingtonstateuniversity/CAHNRSWP-Theme-Web-Integration-Project/master/images/wsu-logo.png -------------------------------------------------------------------------------- /images/archive-feed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washingtonstateuniversity/CAHNRSWP-Theme-Web-Integration-Project/master/images/archive-feed.png -------------------------------------------------------------------------------- /images/button-grad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washingtonstateuniversity/CAHNRSWP-Theme-Web-Integration-Project/master/images/button-grad.png -------------------------------------------------------------------------------- /images/cahnrs-nav.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washingtonstateuniversity/CAHNRSWP-Theme-Web-Integration-Project/master/images/cahnrs-nav.png -------------------------------------------------------------------------------- /images/more-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washingtonstateuniversity/CAHNRSWP-Theme-Web-Integration-Project/master/images/more-button.png -------------------------------------------------------------------------------- /images/site-nav-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washingtonstateuniversity/CAHNRSWP-Theme-Web-Integration-Project/master/images/site-nav-bg.png -------------------------------------------------------------------------------- /images/spacer-tall.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washingtonstateuniversity/CAHNRSWP-Theme-Web-Integration-Project/master/images/spacer-tall.gif -------------------------------------------------------------------------------- /images/spacer-wide.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washingtonstateuniversity/CAHNRSWP-Theme-Web-Integration-Project/master/images/spacer-wide.gif -------------------------------------------------------------------------------- /images/wsu-logo-m.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washingtonstateuniversity/CAHNRSWP-Theme-Web-Integration-Project/master/images/wsu-logo-m.png -------------------------------------------------------------------------------- /images/wsu-logo-t.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washingtonstateuniversity/CAHNRSWP-Theme-Web-Integration-Project/master/images/wsu-logo-t.png -------------------------------------------------------------------------------- /images/button-grad-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washingtonstateuniversity/CAHNRSWP-Theme-Web-Integration-Project/master/images/button-grad-active.png -------------------------------------------------------------------------------- /sidebar.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /css/dynamic_interface.old.css.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washingtonstateuniversity/CAHNRSWP-Theme-Web-Integration-Project/master/css/dynamic_interface.old.css.zip -------------------------------------------------------------------------------- /plugins/tinymce_table/css/table.css: -------------------------------------------------------------------------------- 1 | /* CSS file for table dialog in the table plugin */ 2 | 3 | .panel_wrapper div.current { 4 | height: 245px; 5 | } 6 | 7 | .advfield { 8 | width: 200px; 9 | } 10 | 11 | #class { 12 | width: 150px; 13 | } 14 | -------------------------------------------------------------------------------- /footer-iframe.php: -------------------------------------------------------------------------------- 1 | closing tag to the closing html tag 4 | */ 5 | ?> 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /plugins/tinymce_table/css/cell.css: -------------------------------------------------------------------------------- 1 | /* CSS file for cell dialog in the table plugin */ 2 | 3 | .panel_wrapper div.current { 4 | height: 200px; 5 | } 6 | 7 | .advfield { 8 | width: 200px; 9 | } 10 | 11 | #action { 12 | margin-bottom: 3px; 13 | } 14 | 15 | #class { 16 | width: 150px; 17 | } -------------------------------------------------------------------------------- /404.php: -------------------------------------------------------------------------------- 1 | 8 |
9 |

Page not Found

10 |

We're sorry, but the page you're looking for isn't here.

11 |

Try searching for the page you are looking for or using the navigation in the header or sidebar

12 |
13 | -------------------------------------------------------------------------------- /plugins/tinymce_table/langs/langs.php: -------------------------------------------------------------------------------- 1 | 9 |
10 |

Search Results for ""

11 | 17 |

We're sorry, but there were no results for "".

18 | 22 |
23 | -------------------------------------------------------------------------------- /css/media_categories.css: -------------------------------------------------------------------------------- 1 | .media-sidebar .category-tabs, .media-sidebar .wp-hidden-children { display:none; } 2 | .media-sidebar .category-filter { font-family:sans-serif; font-size:12px; font-style:italic; } 3 | .metabox_container td.field { margin-bottom:24px; width:99%; } 4 | .metabox_container input[type="checkbox"] { width:auto; } 5 | tr.metabox_container th.label span { color:#777; font-size:12px; font-weight:bold; margin:0 0 8px; text-shadow:0 1px 0 white; text-transform:uppercase; } 6 | .metabox_container, div.attachment-details { box-shadow:0 1px 0 white; border-bottom:1px solid #E5E5E5; overflow:hidden; padding-bottom:11px; } 7 | div.attachment-details { margin-bottom:10px; padding-bottom:24px; } -------------------------------------------------------------------------------- /plugins/tinymce_table/js/merge_cells.js: -------------------------------------------------------------------------------- 1 | tinyMCEPopup.requireLangPack(); 2 | 3 | var MergeCellsDialog = { 4 | init : function() { 5 | var f = document.forms[0]; 6 | 7 | f.numcols.value = tinyMCEPopup.getWindowArg('cols', 1); 8 | f.numrows.value = tinyMCEPopup.getWindowArg('rows', 1); 9 | }, 10 | 11 | merge : function() { 12 | var func, f = document.forms[0]; 13 | 14 | tinyMCEPopup.restoreSelection(); 15 | 16 | func = tinyMCEPopup.getWindowArg('onaction'); 17 | 18 | func({ 19 | cols : f.numcols.value, 20 | rows : f.numrows.value 21 | }); 22 | 23 | tinyMCEPopup.close(); 24 | } 25 | }; 26 | 27 | tinyMCEPopup.onInit.add(MergeCellsDialog.init, MergeCellsDialog); 28 | -------------------------------------------------------------------------------- /css/theme_options.css: -------------------------------------------------------------------------------- 1 | .headercolors { float:left; margin-right:20px; } 2 | .headercolors td { padding:0; } 3 | .headercolors td label { border:2px solid #fff; display:block; height:20px; width:20px; } 4 | .headercolors td label.crimson { background-color:#981e32; } 5 | .headercolors td label.grey { background-color:#5e6a71; } 6 | .headercolors td label.black { background-color:#262a2d; } 7 | .headercolors td label.blue { background-color:#003c69; } 8 | .headercolors td label.brown { background-color:#452325; } 9 | .headercolors td label.green { background-color:#b6bf00; } 10 | .headercolors td label.orange { background-color:#ec7a08; } 11 | .headercolors td label.aqua { background-color:#3cb6ce; } 12 | .headercolors td input[type="radio"]:checked + label { border:2px solid #000; } -------------------------------------------------------------------------------- /css/print.css: -------------------------------------------------------------------------------- 1 | html { margin-top:0 !important; } 2 | body { background:none; } 3 | #breadcrumbs, #mobilenav, #compoundsearch, #toolbar, #sitenav, #sitemap, #home, #siteimage, img, object, embed, video, iframe, .addthis_toolbox, #cougmeter_container { display:none !important; } 4 | h1, h2, h3, h4, h5, h6 { color:#2d2d2d; } 5 | #wrapper { margin:0; max-width:none; padding:0; width:100%; } 6 | h1#sitename { margin:0; padding:0; width:100%; } 7 | h1#siteName a { color:#000; } 8 | #content { margin:0; padding:0; width:100%; } 9 | #main, #secondary, #additional { background:none; margin:0; min-height:0; padding:20px 0 0; width:100%; } 10 | .trigger { cursor:auto; text-decoration:none; } 11 | .trigger:after { content:""; } 12 | .toggle_container { display:block !important; } 13 | #footer { background:none; padding:20px 0 0 0; text-align:left; } -------------------------------------------------------------------------------- /css/editor.css: -------------------------------------------------------------------------------- 1 | html .mceContentBody { max-width:731px; } 2 | * { font-family:"Lucida Grande", "Lucida Sans Unicode", Arial, san-serif; color:#262A2D; } 3 | p, dl, td, th, ul, ol { font-size:12px; margin:0; } 4 | blockquote { font-size:12px; } 5 | h1, h2, h3, h4, h5, h6 { font-weight:bold; padding-bottom:6px; margin:0; } 6 | h1 { font-size:26.4px; } 7 | h2 { font-size:22px; } 8 | h3 { font-size:18; } 9 | h4 { font-size:14.4px; } 10 | h5 { font-size:12px} 11 | h6 { font-size:10px; font-weight:normal; } 12 | p { padding-bottom:12px; line-height:19px; } 13 | ul, ol { padding:0 0 0 20px; margin:0 0 15px 15px; } 14 | li ul, li ol { margin-bottom:0; } 15 | li { margin:0; padding:0; line-height:19px; } 16 | a { color:#003c69; text-decoration:underline; } 17 | .alignright { float:right; margin-left:15px; text-align:center; } 18 | .alignleft { float:left; margin-right:15px; text-align:center; } 19 | .aligncenter { margin:0 auto; text-align:center; } 20 | #content p.wp-caption-text, p.wp-caption-text, .wp-caption-dd { font-size:10px; line-height:19px; color:#262a2d; padding:5px 0px; margin:0px; letter-spacing:0em; font-weight:normal; } -------------------------------------------------------------------------------- /plugins/tinymce_config.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /css/login.css: -------------------------------------------------------------------------------- 1 | /*html { background-color:#EEEFF1; } 2 | body.login { background:url(http://images.wsu.edu/global/gen2images/bg.jpg) repeat-x #EEEFF1; font-family:"Lucida Grande","Lucida Sans Unicode",Arial,san-serif; min-height:990px; } 3 | #login { padding:0; } 4 | .login h1 a { background:url(../images/login.png) no-repeat scroll center top transparent; background-size:133px 118px; height:120px; padding-bottom:15px; width:100%; } 5 | .login form { margin-left:0; } 6 | label { color:#262a2d; font-size:12px; } 7 | .wp-core-ui .button-primary { background: url(../images/button-grad.png) repeat-x scroll left top #981e32; border-color:#c60c30; } 8 | .wp-core-ui .button-primary.hover, .wp-core-ui .button-primary:hover, .wp-core-ui .button-primary.focus, .wp-core-ui .button-primary:focus { background:#c60c30 url(../images/button-grad-active.png) repeat-x scroll left top; border-color:#981e32; } 9 | .wp-core-ui .button-primary:active { background:#c60c30 url(../images/button-grad-active.png) repeat-x scroll left top; color:#eaf2fa; } 10 | #backtoblog { background:transparent; border-bottom:none; } 11 | .login #nav a, .login #backtoblog a { color:#003C69 !important; } 12 | .login #nav a:hover, .login #backtoblog a:hover { color:#981e32 !important; text-decoration:none; } 13 | #login_error, .message { margin:0 0 15px 0; } 14 | .updated, .login .message { background-color:#faf8f3; border-color:#dbceac; } 15 | body,#wpbody, .form-table .pre { color:#262a2d; }*/ -------------------------------------------------------------------------------- /attachment.php: -------------------------------------------------------------------------------- 1 | 8 |
9 | 14 |
15 |

16 |

17 |
18 |

19 | Uploaded %1$s. Full size %3$s × %4$s pixels.

'), 22 | get_the_date(), 23 | esc_url( wp_get_attachment_url() ), 24 | $metadata['width'], 25 | $metadata['height'] 26 | ); 27 | $imageSize = array( 'slideshow-wsu', 'large', 'medium', 'thumbnail' ); 28 | foreach( $imageSize as $imageSize_value ) 29 | { 30 | $imageAttributes = wp_get_attachment_image_src( $post->ID, $imageSize_value ); 31 | if( $imageAttributes[1] > '731' ) 32 | echo '

' . $imageAttributes[1] . ' × ' . $imageAttributes[2] . ' pixels

'; 33 | else 34 | echo '

'; 35 | } 36 | } 37 | ?> 38 |
39 | -------------------------------------------------------------------------------- /plugins/tinymce_table/merge_cells.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {#table_dlg.merge_cells_title} 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 |
13 | {#table_dlg.merge_cells_title} 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
{#table_dlg.cols}:
{#table_dlg.rows}:
24 |
25 | 26 |
27 |
28 | 29 |
30 | 31 |
32 | 33 |
34 |
35 |
36 | 37 | 38 | -------------------------------------------------------------------------------- /image.php: -------------------------------------------------------------------------------- 1 | 8 |
9 | 13 |
14 |

15 |

16 |
17 |

18 | Uploaded %1$s. Full size %3$s × %4$s pixels.

'), 21 | get_the_time(), 22 | esc_url( wp_get_attachment_url() ), 23 | esc_html( $metadata['width'] ), 24 | esc_html( $metadata['height'] ) 25 | ); 26 | $imageSize = array( 'slideshow-wsu', 'large', 'medium', 'thumbnail' ); 27 | foreach( $imageSize as $imageSize_value ) { 28 | $imageAttributes = wp_get_attachment_image_src( $post->ID, $imageSize_value ); 29 | if( $imageAttributes[1] > '731' ) 30 | echo '

' . esc_html( $imageAttributes[1] ) . ' × ' . esc_html( $imageAttributes[2] ) . ' pixels

'; 31 | else 32 | echo '

'; 33 | } 34 | } 35 | ?> 36 |
37 | -------------------------------------------------------------------------------- /author.php: -------------------------------------------------------------------------------- 1 | 14 |
15 |

16 | 23 |
24 |
25 |

Contact

26 | '; 30 | 31 | if( get_the_author_meta( 'title' ) ) { 32 | the_author_meta('title'); 33 | echo ',
'; 34 | } 35 | 36 | if( get_the_author_meta( 'dept' ) ) 37 | the_author_meta('dept'); 38 | 39 | echo '

'; 40 | } 41 | 42 | //Since "user_email" will always be present, conditions are needed only on the "Office" and "Phone" fields 43 | echo '

'; 44 | 45 | if( get_the_author_meta( 'office' ) ) { 46 | the_author_meta('office'); 47 | echo '
'; 48 | } 49 | 50 | if( get_the_author_meta( 'phone' ) ) { 51 | echo 'Phone: '; 52 | the_author_meta('phone'); 53 | echo '
'; 54 | } 55 | 56 | echo 'Email: '; 59 | the_author_meta('user_email'); 60 | echo ''; 61 | 62 | echo '

'; 63 | ?> 64 |
65 | -------------------------------------------------------------------------------- /plugins/tinymce_table/langs/en_dlg.js: -------------------------------------------------------------------------------- 1 | tinyMCE.addI18n('en.table_dlg',{"rules_border":"border","rules_box":"box","rules_vsides":"vsides","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hsides","rules_below":"below","rules_above":"above","rules_void":"void",rules:"Rules","frame_all":"all","frame_cols":"cols","frame_rows":"rows","frame_groups":"groups","frame_none":"none",frame:"Frame",caption:"Table Caption","missing_scope":"Are you sure you want to continue without specifying a scope for this table header cell. Without it, it may be difficult for some users with disabilities to understand the content or data displayed of the table.","cell_limit":"You\'ve exceeded the maximum number of cells of {$cells}.","row_limit":"You\'ve exceeded the maximum number of rows of {$rows}.","col_limit":"You\'ve exceeded the maximum number of columns of {$cols}.",colgroup:"Col Group",rowgroup:"Row Group",scope:"Scope",tfoot:"Footer",tbody:"Body",thead:"Header","row_all":"Update All Rows in Table","row_even":"Update Even Rows in Table","row_odd":"Update Odd Rows in Table","row_row":"Update Current Row","cell_all":"Update All Cells in Table","cell_row":"Update All Cells in Row","cell_cell":"Update Current Cell",th:"Header",td:"Data",summary:"Summary",bgimage:"Background Image",rtl:"Right to Left",ltr:"Left to Right",mime:"Target MIME Type",langcode:"Language Code",langdir:"Language Direction",style:"Style",id:"ID","merge_cells_title":"Merge Table Cells",bgcolor:"Background Color",bordercolor:"Border Color","align_bottom":"Bottom","align_top":"Top",valign:"Vertical Alignment","cell_type":"Cell Type","cell_title":"Table Cell Properties","row_title":"Table Row Properties","align_middle":"Center","align_right":"Right","align_left":"Left","align_default":"Default",align:"Alignment",border:"Border",cellpadding:"Cell Padding",cellspacing:"Cell Spacing",rows:"Rows",cols:"Columns",height:"Height",width:"Width",title:"Insert/Edit Table",rowtype:"Row Type","advanced_props":"Advanced Properties","general_props":"General Properties","advanced_tab":"Advanced","general_tab":"General","cell_col":"Update all cells in column"}); -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | Name == 'WSU' && $wipOptions['indexSlide'] && $wipOptions['slidesCategory'] && $wipOptions['slideCount'] && !is_paged() ) { 9 | $wipOptions = get_option( 'wipOptions' ); 10 | 11 | if( !$wipOptions['designKey'] ) 12 | $design = 'b'; 13 | else 14 | $design = substr( stripslashes( $wipOptions['designKey'] ), 3, 1 ); 15 | ?> 16 |
17 |
18 | ID ), "slideshow-wsu" ); 24 | ?> 25 |
26 | 27 | 28 | 34 | 35 |
29 | 32 | Read more 33 |
36 |
37 | 42 |
43 |
44 | 49 |
50 |

Latest Posts

51 | 54 |
55 | 58 |
59 | 60 |
61 | -------------------------------------------------------------------------------- /plugins/tinymce_table/js/mctabs.js: -------------------------------------------------------------------------------- 1 | /** 2 | * mctabs.js 3 | * 4 | * Copyright 2009, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://tinymce.moxiecode.com/license 8 | * Contributing: http://tinymce.moxiecode.com/contributing 9 | */ 10 | 11 | function MCTabs() { 12 | this.settings = []; 13 | }; 14 | 15 | MCTabs.prototype.init = function(settings) { 16 | this.settings = settings; 17 | }; 18 | 19 | MCTabs.prototype.getParam = function(name, default_value) { 20 | var value = null; 21 | 22 | value = (typeof(this.settings[name]) == "undefined") ? default_value : this.settings[name]; 23 | 24 | // Fix bool values 25 | if (value == "true" || value == "false") 26 | return (value == "true"); 27 | 28 | return value; 29 | }; 30 | 31 | MCTabs.prototype.displayTab = function(tab_id, panel_id) { 32 | var panelElm, panelContainerElm, tabElm, tabContainerElm, selectionClass, nodes, i; 33 | 34 | panelElm= document.getElementById(panel_id); 35 | panelContainerElm = panelElm ? panelElm.parentNode : null; 36 | tabElm = document.getElementById(tab_id); 37 | tabContainerElm = tabElm ? tabElm.parentNode : null; 38 | selectionClass = this.getParam('selection_class', 'current'); 39 | 40 | if (tabElm && tabContainerElm) { 41 | nodes = tabContainerElm.childNodes; 42 | 43 | // Hide all other tabs 44 | for (i = 0; i < nodes.length; i++) { 45 | if (nodes[i].nodeName == "LI") 46 | nodes[i].className = ''; 47 | } 48 | 49 | // Show selected tab 50 | tabElm.className = 'current'; 51 | } 52 | 53 | if (panelElm && panelContainerElm) { 54 | nodes = panelContainerElm.childNodes; 55 | 56 | // Hide all other panels 57 | for (i = 0; i < nodes.length; i++) { 58 | if (nodes[i].nodeName == "DIV") 59 | nodes[i].className = 'panel'; 60 | } 61 | 62 | // Show selected panel 63 | panelElm.className = 'current'; 64 | } 65 | }; 66 | 67 | MCTabs.prototype.getAnchor = function() { 68 | var pos, url = document.location.href; 69 | 70 | if ((pos = url.lastIndexOf('#')) != -1) 71 | return url.substring(pos + 1); 72 | 73 | return ""; 74 | }; 75 | 76 | // Global instance 77 | var mcTabs = new MCTabs(); 78 | -------------------------------------------------------------------------------- /css/dynamic_interface.css: -------------------------------------------------------------------------------- 1 | /*#_dynamic_metabox .inside { margin:0; padding:0; } 2 | div.widgets-holder-wrap { margin:0; } 3 | .widget-holder { border-bottom:1px solid; } 4 | .widget-description { min-height: 32px; } 5 | #widget-list .widget,.ui-draggable,.widget-placeholder { width:198px; } 6 | #wip-layout-wrap .layoutwrap { float:left; min-width:234px; } 7 | #wip-layout-wrap .layoutwrap .postbox { margin:0; min-width:198px; padding:15px 18px 18px 18px; background:#FCFCFC; } 8 | #wip-layout-wrap .layoutwrap #wipHome .sshide { display:none; } 9 | #wip-layout-wrap .layoutwrap .postbox select { width:100%; } 10 | #wipMain .ssshow, #wipSecondary .ssshow, #wipAdditional .ssshow { display:none; } 11 | #wip-h { width:100%; } 12 | #wiphidden { display:none !important; }*/ 13 | #_dynamic_metabox, 14 | #_dynamic_metabox .widgets-holder-wrap { 15 | background: none; 16 | } 17 | #_dynamic_metabox .hndle { 18 | background: #fff; 19 | } 20 | #_dynamic_metabox .inside { 21 | margin: 0; 22 | padding: 0; 23 | } 24 | .widgets-holder-wrap { 25 | border: none; 26 | } 27 | .widget-holder { 28 | background: #fff; 29 | border-bottom: 1px solid #e5e5e5; 30 | padding: 6px 12px 0; 31 | } 32 | #widget-list .widget, 33 | .ui-draggable, 34 | .widget-placeholder { 35 | margin: 0 10px 15px; 36 | vertical-align: top; 37 | width: 198px; 38 | } 39 | .ui-draggable { 40 | height: auto !important; 41 | } 42 | #widget-list .widget, 43 | .widget-placeholder { 44 | display: inline-block; 45 | } 46 | #_dynamic_metabox .postbox.widgets-sortables { 47 | padding: 6px 12px; 48 | margin-bottom: 0; 49 | } 50 | #wip-layout-wrap .widget .widget-inside { 51 | border-top: none; 52 | padding: 0 12px; 53 | } 54 | #wip-layout-wrap .widget .widget-inside input[type="text"] { 55 | width: 100%; 56 | } 57 | #wip-layout-wrap .layoutwrap { float:left; min-width:234px; } 58 | #wip-layout-wrap .layoutwrap .postbox { margin:0; min-width:198px; padding:15px 18px 18px 18px; background:#fff; } 59 | #wip-layout-wrap .layoutwrap #wipHome .sshide { display:none; } 60 | #wip-layout-wrap .layoutwrap .postbox select { width:100%; } 61 | #wipMain .ssshow, #wipSecondary .ssshow, #wipAdditional .ssshow { display:none; } 62 | #wip-h { width:100%; } 63 | #wiphidden { display:none !important; } -------------------------------------------------------------------------------- /plugins/tinymce_table/js/editable_selects.js: -------------------------------------------------------------------------------- 1 | /** 2 | * editable_selects.js 3 | * 4 | * Copyright 2009, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://tinymce.moxiecode.com/license 8 | * Contributing: http://tinymce.moxiecode.com/contributing 9 | */ 10 | 11 | var TinyMCE_EditableSelects = { 12 | editSelectElm : null, 13 | 14 | init : function() { 15 | var nl = document.getElementsByTagName("select"), i, d = document, o; 16 | 17 | for (i=0; i array( 19 | 'setting' => 'loopAuthor', 20 | 'default' => '', 21 | ), 22 | 'pubdate' => array( 23 | 'setting' => 'loopPubDate', 24 | 'default' => '', 25 | ), 26 | 'taxonomy' => array( 27 | 'setting' => 'loopTaxonomy', 28 | 'default' => '', 29 | ), 30 | 'Comments' => array( 31 | 'setting' => 'loopComments', 32 | 'default' => '', 33 | ), 34 | ); 35 | 36 | 37 | foreach( $option as $option_value ) { 38 | if( is_category() && get_tax_meta( $categoryID, $option_value['setting'] ) ) 39 | $option[$option_value['setting']] = get_tax_meta( $categoryID, $option_value['setting'] ); 40 | else if( $theme[$option_value['setting']] ) 41 | $option[$option_value['setting']] = $theme[$option_value['setting']]; 42 | else 43 | $option[$option_value['setting']] = $option_value['default']; 44 | } 45 | 46 | 47 | while( have_posts() ) { 48 | the_post(); 49 | ?> 50 |

51 | 54 |
Posted '; 57 | the_author(); 58 | echo ''; 59 | } 60 | if( ( $option['loopAuthor'] ) && ( $option['loopPubDate'] ) ) 61 | echo ' | '; 62 | if( ( $option['loopPubDate'] ) || is_search() ) 63 | the_time('F j, Y'); 64 | ?>
65 | 74 |
75 | 78 |
Filed under
79 | 84 |
85 | 88 |
89 | -------------------------------------------------------------------------------- /single-storyproject.php: -------------------------------------------------------------------------------- 1 | 3 |
4 |
5 | ID , 'storyproject-tier' , true ); 9 | $tierVal = ( $tierMeta )? $tierMeta : 3; 10 | $sQuote = get_post_meta( $post->ID , 'storyproject-quote' , true ); 11 | $sVideo = get_post_meta( $post->ID , 'storyproject-video' , true ); 12 | $sSubtitle = get_post_meta( $post->ID , 'storyproject-subtitle' , true ); 13 | echo '
'; 14 | if( $sVideo ){ 15 | echo ''; 16 | } 17 | echo '

'; 18 | the_title(); 19 | echo '

'; 20 | if( $sSubtitle ){echo '

'.$sSubtitle.'

';} 21 | echo ''; 41 | // 42 | // Post Content here 43 | // 44 | } // end while 45 | } // end if ?> 46 |
47 |

More Stories

48 | 'storyproject' , 'posts_per_page' => 3 , 'orderby' => 'rand'); 50 | $spQuery = new WP_Query( $args ); 51 | if ( $spQuery->have_posts() ) { 52 | while ( $spQuery->have_posts() ) { 53 | $spQuery->the_post(); 54 | //==== PARSE DATA ===================+ 55 | $tierMeta = get_post_meta( get_the_ID() , 'storyproject-tier' , true ); 56 | $tierVal = ( $tierMeta )? $tierMeta : 3; 57 | echo ''; 58 | if( has_post_thumbnail() ){ 59 | the_post_thumbnail( get_the_ID(), 'gallery-tall4x6' , array('class'=>'gallery-image-side') ); 60 | } 61 | echo '

'; the_title(); echo '

'; 62 | echo '
'; 63 | echo '
'; 64 | } 65 | }; 66 | ?> 67 |
68 |
69 | -------------------------------------------------------------------------------- /js/media_categories.js: -------------------------------------------------------------------------------- 1 | /* 2 | jQuery for Media Categories plugin 3 | 4 | @author Eddie Moya 5 | */ 6 | 7 | jQuery(document).ready(function($){ 8 | // This modifies the settings for the AttachmentCompat object in media-views.js. 9 | // This is needed because saving on change of checkboxes is glitchy when a user clicks multiple checkboxes in a row. 10 | delete wp.media.view.AttachmentCompat.prototype.events['change input']; 11 | wp.media.view.AttachmentCompat.prototype.events['change input[type!="checkbox"]'] = 'save'; 12 | 13 | // Overriding saveCompat to add the trigger. 14 | wp.media.model.Attachment.prototype.saveCompat = 15 | function( data, options ) { 16 | var model = this; 17 | 18 | // If we do not have the necessary nonce, fail immeditately. 19 | if ( ! this.get('nonces') || ! this.get('nonces').update ) 20 | return $.Deferred().rejectWith( this ).promise(); 21 | 22 | return wp.media.post( 'save-attachment-compat', _.defaults({ 23 | id: this.id, 24 | nonce: this.get('nonces').update, 25 | post_id: wp.media.model.settings.post.id 26 | }, data ) ).done( function( resp, status, xhr ) { 27 | model.set( model.parse( resp, xhr ), options ); 28 | // Trigger to detect the refreshing of the sidebar. 29 | $('.compat-attachment-fields').trigger('modal-refreshed'); 30 | }); 31 | } 32 | 33 | $.each(taxonomy, function(index, tax){ 34 | 35 | var input_class = '.compat-field-'+tax; 36 | var metabox_class = input_class+'_metabox'; 37 | 38 | $('.compat-attachment-fields').live('modal-refreshed', function(){ 39 | $(input_class).hide(); 40 | $(metabox_class).addClass('metabox_container'); 41 | }) 42 | 43 | $('.attachments').live('click', function(){ 44 | $(input_class).hide(); 45 | $(metabox_class).addClass('metabox_container'); 46 | }) 47 | 48 | // Trigger the 'change' event when the mouse leaves the metabox. 49 | $(metabox_class).live('mouseleave', function() { $('.compat-item input:first').trigger('change');}); 50 | 51 | // Sync the checkboxes to comma delimited list in the hidden text field for the taxonomy. 52 | $('.media-sidebar input').live('click', function(){ 53 | 54 | var form_fields = $(this).closest("tbody"); 55 | var checked = form_fields.find(".compat-field-" + tax + "_metabox input:checked"); 56 | var slug_list = ''; 57 | 58 | checked.each(function(index){ 59 | 60 | if(slug_list.length > 0) 61 | slug_list += ',' + $(this).val(); 62 | else 63 | slug_list += $(this).val(); 64 | 65 | }); 66 | 67 | form_fields.find("tr.compat-field-"+ tax +" > td.field > input.text").val(slug_list); 68 | }) 69 | 70 | $.extend($.expr[":"], { 71 | "icontains": function(elem, i, match, array) { 72 | return (elem.textContent || elem.innerText || "").toLowerCase().indexOf((match[3] || "").toLowerCase()) >= 0; 73 | } 74 | }); 75 | 76 | }); 77 | }) -------------------------------------------------------------------------------- /js/init.js: -------------------------------------------------------------------------------- 1 | jQuery(document).ready(function($){ 2 | 3 | // Toggle nav and search for mobile devices 4 | $(function() { 5 | $(window).on('resize', function(){ 6 | var width = document.width; 7 | if( width > 768 ) { 8 | $('#sitenav').show(); 9 | } else { 10 | if( ! $('#mobilenav a').hasClass('active') ) { 11 | $('#compoundsearch').hide(); 12 | $('#sitenav').hide(); 13 | } 14 | } 15 | }).trigger('resize'); 16 | var $anchorLinks = $('#mobilenav').find('a'); 17 | $anchorLinks.click(function(e){ 18 | e.preventDefault(); 19 | var $this = $(this), thisHref = $this.attr('href'); 20 | $('.reveal').hide(); 21 | if($this.hasClass('active')) { 22 | $this.removeClass('active'); 23 | $(thisHref).hide(); 24 | } else { 25 | $anchorLinks.removeClass('active'); 26 | $this.addClass('active'); 27 | $(thisHref).show(); 28 | } 29 | }); 30 | }); 31 | 32 | // Accordian function 33 | $(".toggle_container").hide(); 34 | $(".trigger").click(function(){ 35 | $(this).toggleClass("active").next().slideToggle("slow"); 36 | }); 37 | 38 | // Responsive videos 39 | $(function() { 40 | var $allVideos = $("iframe[src^='http://player.vimeo.com'], iframe[src^='http://www.youtube.com'], object, embed"), 41 | $fluidEl = $("p"); 42 | $allVideos.each(function() { 43 | $(this).attr('data-aspectRatio', this.height / this.width).removeAttr('height').removeAttr('width'); 44 | }); 45 | $(window).resize(function() { 46 | var newWidth = $fluidEl.width(); 47 | $allVideos.each(function() { 48 | var $el = $(this); 49 | $el.width(newWidth).height(newWidth * $el.attr('data-aspectRatio')); 50 | }); 51 | }).resize(); 52 | }); 53 | 54 | }); 55 | 56 | // Using the placeholder attribute would be preferable 57 | function checktextboxwsu() { 58 | if (document.wsusearchm.q.value.replace(/\s+/g, '') == '') { document.wsusearchm.q.value = 'Search WSU Web/People' } 59 | if (document.wsusearch.q.value.replace(/\s+/g, '') == '') { document.wsusearch.q.value = 'Search WSU Web/People' } 60 | return false 61 | } 62 | function erasetextboxwsu() { 63 | if (document.wsusearchm.q.value.toUpperCase() == 'SEARCH WSU WEB/PEOPLE') { document.wsusearchm.q.value = '' } 64 | if (document.wsusearch.q.value.toUpperCase() == 'SEARCH WSU WEB/PEOPLE') { document.wsusearch.q.value = '' } 65 | return false 66 | } 67 | function checktextboxlocal() { 68 | if (document.sitesearch.s.value.replace(/\s+/g, '') == '') { document.sitesearch.s.value = 'Search' } 69 | return false 70 | } 71 | function erasetextboxlocal() { 72 | if (document.sitesearch.s.value.toUpperCase() == 'SEARCH') { document.sitesearch.s.value = '' } 73 | return false 74 | } 75 | function checktextboxlocalm() { 76 | if (document.sitesearchm.s.value.replace(/\s+/g, '') == '') { document.sitesearchm.s.value = 'Search' } 77 | return false 78 | } 79 | function erasetextboxlocalm() { 80 | if (document.sitesearchm.s.value.toUpperCase() == 'SEARCH') { document.sitesearchm.s.value = '' } 81 | return false 82 | } -------------------------------------------------------------------------------- /js/respond.min.js: -------------------------------------------------------------------------------- 1 | /*! Respond.js v1.0.1pre: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */ 2 | (function(e,h){e.respond={};respond.update=function(){};respond.mediaQueriesSupported=h;if(h){return}var u=e.document,r=u.documentElement,i=[],k=[],p=[],o={},g=30,f=u.getElementsByTagName("head")[0]||r,b=f.getElementsByTagName("link"),d=[],a=function(){var B=b,w=B.length,z=0,y,x,A,v;for(;z=F.minw)&&(!F.maxw||F.maxw&&D<=F.maxw)){if(!z[F.media]){z[F.media]=[]}z[F.media].push(k[F.rules])}}for(var y in p){if(p[y]&&p[y].parentNode===f){f.removeChild(p[y])}}for(var y in z){var G=u.createElement("style"),A=z[y].join("\n");G.type="text/css";G.media=y;if(G.styleSheet){G.styleSheet.cssText=A}else{G.appendChild(u.createTextNode(A))}C.appendChild(G);p.push(G)}f.insertBefore(C,B.nextSibling)},n=function(v,x){var w=c();if(!w){return}w.open("GET",v,true);w.onreadystatechange=function(){if(w.readyState!=4||w.status!=200&&w.status!=304){return}x(w.responseText)};if(w.readyState==4){return}w.send(null)},c=(function(){var v=false;try{v=new XMLHttpRequest()}catch(w){v=new ActiveXObject("Microsoft.XMLHTTP")}return function(){return v}})();a();respond.update=a;function s(){j(true)}if(e.addEventListener){e.addEventListener("resize",s,false)}else{if(e.attachEvent){e.attachEvent("onresize",s)}}})(this,(function(f){if(f.matchMedia){return true}var e,i=document,c=i.documentElement,g=c.firstElementChild||c.firstChild,h=!i.body,d=i.body||i.createElement("body"),b=i.createElement("div"),a="only all";b.id="mq-test-1";b.style.cssText="position:absolute;top:-99em";d.appendChild(b);b.innerHTML='_';if(h){c.insertBefore(d,g)}b.removeChild(b.firstChild);e=b.offsetWidth==9;if(h){c.removeChild(d)}else{d.removeChild(b)}return e})(this)); -------------------------------------------------------------------------------- /header-iframe.php: -------------------------------------------------------------------------------- 1 | 4 | */ 5 | 6 | // A couple variables used all the time 7 | $wipOptions = get_option( 'wipOptions' ); 8 | $uploadDirectory = wp_upload_dir(); 9 | 10 | // Post- and page-specific variables 11 | if( is_single() || is_page() ) { 12 | $wipLayoutMeta = get_post_meta( $post->ID, '_layout', true ); 13 | $wipHeadMeta = get_post_meta( $post->ID, 'head', true ); 14 | $wipBodyMeta = get_post_meta( $post->ID, 'body', true ); 15 | if ( is_page() ) 16 | $wipDynamicMeta = get_post_meta( $post->ID, '_dynamic', true ); 17 | } else { 18 | $wipDynamicMeta = false; 19 | $wipLayoutMeta = false; 20 | $wipHeadMeta = false; 21 | $wipBodyMeta = false; 22 | } 23 | 24 | // Taxonomy-specific variables 25 | $catDesc = category_description(); 26 | $tagDesc = tag_description(); 27 | ?> 28 | 29 | 30 | 31 | 32 | 33 | <?php 34 | wp_title( '' ); 35 | if( wp_title( '', false ) ) 36 | echo ' - '; 37 | bloginfo( 'name' ); 38 | echo ' | '; 39 | bloginfo( 'description' ); 40 | ?> 41 | 42 | array( 51 | 'href' => array(), 52 | 'rel' => array(), 53 | 'type' => array(), 54 | 'media' => array() 55 | ), 56 | 'style' => array( 57 | 'type' => array(), 58 | 'media' => array() 59 | ), 60 | 'script' => array( 61 | 'type' => array(), 62 | 'src' => array() 63 | ) 64 | ); 65 | echo wp_kses( $wipHeadMeta, $allowedHeaderTags ); 66 | } 67 | 68 | // If navigation override is in place 69 | $categories = get_the_category(); 70 | foreach( $categories as $category ) { 71 | $categoryID = $category->cat_ID; 72 | if( get_tax_meta( $categoryID, 'navOverride' ) ) 73 | echo ''; 74 | if( ( is_category( $categoryID ) || in_category( $categoryID ) ) && get_tax_meta( $categoryID, 'customCSS' ) ) 75 | echo ''; 76 | } 77 | ?> 78 | 79 | '; 81 | echo 'body {background-position: 0px -40px !important;}'; 82 | echo ''; 83 | }?> 84 | 85 | > 86 | 87 | 89 | 94 | -------------------------------------------------------------------------------- /js/layout.js: -------------------------------------------------------------------------------- 1 | jQuery(document).ready(function ($) { 2 | 3 | if ($('#wipDynamic').is(':checked')) { 4 | $("#_dynamic_metabox").show(); 5 | $("#slide-option").show(); 6 | } else { 7 | $("#_dynamic_metabox").hide(); 8 | $("#slide-option").hide(); 9 | } 10 | $('#wipDynamic').click(function() { 11 | $("#_dynamic_metabox").toggle(this.checked); 12 | $("#slide-option").toggle(this.checked); 13 | }); 14 | 15 | if ($('#slideshow').is(':checked')) { 16 | $("#slide-order").show(); 17 | $("#wip-h").show(); 18 | } else { 19 | $("#slide-order").hide(); 20 | $("#wip-h").hide(); 21 | } 22 | $('#slideshow').click(function() { 23 | $("#slide-order").toggle(this.checked); 24 | $("#wip-h").toggle(this.checked); 25 | }); 26 | 27 | if ($('#wip-layout-0').is(':checked')) { 28 | $("#wip-m").css('width','100%'); 29 | $("#wip-s").hide(); 30 | $("#wip-a").hide(); 31 | $("#wip-f").hide(); 32 | } 33 | $("#wip-layout-0").click(function (event) { 34 | $("#wip-m").css('width','100%'); 35 | $("#wip-s").hide(); 36 | $("#wip-a").hide(); 37 | $("#wip-f").hide(); 38 | }); 39 | 40 | if ($('#wip-layout-1').is(':checked')) { 41 | $("#wip-m").css({'display': '','width': '66%'}); 42 | $("#wip-s").css({'display': '','width': '34%'}); 43 | $("#wip-a").hide(); 44 | $("#wip-f").hide(); 45 | } 46 | $("#wip-layout-1").click(function (event) { 47 | $("#wip-m").css({'display': '','width': '66%'}); 48 | $("#wip-s").css({'display': '','width': '34%'}); 49 | $("#wip-a").hide(); 50 | $("#wip-f").hide(); 51 | }); 52 | 53 | if ($('#wip-layout-2').is(':checked')) { 54 | $("#wip-m").css('width','50%'); 55 | $("#wip-s").css({'display': '','width' : '50%'}); 56 | $("#wip-a").hide(); 57 | } 58 | $("#wip-layout-2").click(function (event) { 59 | $("#wip-m").css('width','50%'); 60 | $("#wip-s").css({'display': '','width' : '50%'}); 61 | $("#wip-a").hide(); 62 | $("#wip-f").hide(); 63 | }); 64 | 65 | if ($('#wip-layout-3').is(':checked')) { 66 | $("#wip-m").css('width','34%') 67 | $("#wip-s").css({'display': '','width': '66%'}); 68 | $("#wip-a").hide(); 69 | $("#wip-f").hide(); 70 | } 71 | $("#wip-layout-3").click(function (event) { 72 | $("#wip-m").css('width','34%') 73 | $("#wip-s").css({'display': '','width': '66%'}); 74 | $("#wip-a").hide(); 75 | $("#wip-f").hide(); 76 | }); 77 | 78 | if ($('#wip-layout-4').is(':checked')) { 79 | $("#wip-m").css('width','33%'); 80 | $("#wip-s").css({'display': '','width': '33%'}); 81 | $("#wip-a").css({'display': '','width': '34%'}); 82 | $("#wip-f").hide(); 83 | } 84 | $("#wip-layout-4").click(function (event) { 85 | $("#wip-m").css('width','33%'); 86 | $("#wip-s").css({'display': '','width': '33%'}); 87 | $("#wip-a").css({'display': '','width': '34%'}); 88 | $("#wip-f").hide(); 89 | }); 90 | 91 | if ($('#wip-layout-5').is(':checked')) { 92 | $("#wip-m").css('width','25%'); 93 | $("#wip-s").css({'display': '','width': '25%'}); 94 | $("#wip-a").css({'display': '','width': '25%'}); 95 | $("#wip-f").css({'display': '','width': '25%'}); 96 | } 97 | $("#wip-layout-5").click(function (event) { 98 | $("#wip-m").css('width','25%'); 99 | $("#wip-s").css({'display': '','width': '25%'}); 100 | $("#wip-a").css({'display': '','width': '25%'}); 101 | $("#wip-f").css({'display': '','width': '25%'}); 102 | }); 103 | 104 | /* 105 | $(".ui-sortable").sortable({ revert: true, 106 | update: function( event, ui ) { 107 | $("#" + $(this).attr("id") + "order").val($(this).sortable('toArray').toString()); 108 | } 109 | }); 110 | */ 111 | 112 | }); -------------------------------------------------------------------------------- /comments.php: -------------------------------------------------------------------------------- 1 | comment_type ) { 10 | case 'pingback' : 11 | case 'trackback' : 12 | ?> 13 |
  • 14 |

    15 | 19 |
  • 20 |
    21 |

    %1$s said on %2$s: ' ), 23 | sprintf( '%s', get_comment_author() ), 24 | sprintf( '%1$s', get_comment_date() ) 25 | ); 26 | 27 | edit_comment_link( __( 'Edit' ) ); 28 | ?>

    29 | comment_approved == '0' ) { 31 | ?> 32 | Your comment is awaiting moderation. 33 | 38 |
    39 | __( 'Reply ' ), 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?> 40 |
    41 |
    42 | '

    *

    ', 51 | 'email' => '

    *

    ', 52 | 'url' => '

    ', 53 | ); 54 | 55 | return $fields; 56 | } 57 | 58 | add_filter('comment_form_default_fields','wipCustomFields'); 59 | 60 | // Remove URL field 61 | function remove_comment_fields( $fields ) { 62 | unset($fields['url']); 63 | return $fields; 64 | } 65 | add_filter('comment_form_default_fields','remove_comment_fields'); 66 | 67 | // If the post is password protected 68 | if( post_password_required() ) { 69 | ?> 70 |

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

    71 | 78 |

    80 |
      81 | 'wipListComments' ) ); ?> 82 |
    83 | 1 && get_option( 'page_comments' ) ) { 85 | ?> 86 |
    87 |

    88 |

    89 |
    90 | '


    ', 98 | 'title_reply' => 'Leave a Comment', 99 | 'Leave a Reply to %s' => '

    Reply to %s

    ', 100 | 'comment_notes_after' => '' 101 | ) 102 | ); 103 | ?> -------------------------------------------------------------------------------- /inc/tribe_events_feed.php: -------------------------------------------------------------------------------- 1 | '; ?> 12 | 13 | 22 | > 23 | 24 | 25 | <?php bloginfo_rss('name'); wp_title_rss(); ?> 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | <?php the_title_rss() ?> 37 | 38 | 39 | ID, '_EventStartDate', true ) ) ); ?> 40 | 41 | ID, 'tribe_events_cat' ) ) 43 | { 44 | foreach( get_the_terms( $post->ID, 'tribe_events_cat' ) as $category ) 45 | { 46 | echo 'name . ']]>'; 47 | } 48 | } 49 | ?> 50 | 51 | ID, $eventMetaPrefix . 'StartDate', true ) ) ); 56 | $eventCost = get_post_meta( $post->ID, $eventMetaPrefix . 'Cost', true ); 57 | $venueID = get_post_meta( $post->ID, $eventMetaPrefix . 'VenueID', true ); 58 | $venuePermalink = get_permalink( $venueID ); 59 | $venueName = get_post_meta( $venueID, $venueMetaPrefix . 'Venue', true ); 60 | $venueAddress = get_post_meta( $venueID, $venueMetaPrefix . 'Address', true ); 61 | $venueCity = get_post_meta( $venueID, $venueMetaPrefix . 'City', true ); 62 | $venueState = get_post_meta( $venueID, $venueMetaPrefix . 'State', true ); 63 | 64 | // Put content together 65 | $content = '

    When: ' . esc_html( $eventStart ); 66 | if( $venueName ) 67 | $content .= '
    Where: ' . esc_html( $venueName ) . ''; 68 | if( $venueAddress ) 69 | $content .= '
    ' . esc_html( $venueAddress ); 70 | if( $venueCity ) 71 | $content .= '
    ' . esc_html( $venueCity ); 72 | if( $venueState ) 73 | ', ' . esc_html( $venueState ); 74 | if( $eventCost ) 75 | $content .= '
    Cost: ' . esc_html( $eventCost ); 76 | $content .= '

    '; 77 | 78 | echo $content; 79 | the_excerpt_rss(); 80 | ?>]]>
    81 | 82 | 0 ) : ?> 83 | ]]> 84 | 85 | ]]> 86 | 87 | 88 | 89 | 90 | 91 |
    92 | 93 |
    94 |
    -------------------------------------------------------------------------------- /archive.php: -------------------------------------------------------------------------------- 1 | 17 |
    18 |

    19 | 41 | RSS feed 42 | 45 |

    46 | $childCategory_value, 'year' => $year, 'monthnum' => $month, 'post_type' => 'post', 'post_status' => 'publish', 'posts_per_page' => -1 ); 67 | 68 | $childCategory_query = new WP_Query( $childCategory_args ); 69 | 70 | if( $childCategory_query->have_posts() ) { 71 | $term = get_term_by( 'id', $childCategory_value, 'category' ); 72 | echo '

    ' . $term->name . '

    '; 73 | echo '
      '; 74 | while( $childCategory_query->have_posts() ) { 75 | $childCategory_query->the_post(); 76 | ?> 77 |
    • 78 | '; 81 | } 82 | 83 | wp_reset_postdata(); 84 | 85 | } 86 | } 87 | } else { 88 | // Call loop.php for displaying the loop 89 | get_template_part( 'loop' ); 90 | } 91 | ?> 92 |
    93 | 105 |
    106 | 126 |
    127 | -------------------------------------------------------------------------------- /inc/dynamic_slideshow_display.php: -------------------------------------------------------------------------------- 1 | $category, 'posts_per_page'=>$limit, 'paged'=>$page ) ); 16 | 17 | // Loop through posts 18 | while( $postList->have_posts() && $count < $limit ) { 19 | $toDisplay = $postList->next_post(); // Grab post object 20 | $imageData = wp_get_attachment_image_src( get_post_thumbnail_id( $toDisplay->ID ), "slideshow-wsu" ); // Grab featured image 21 | 22 | // Verify presence of featured image 23 | if( $imageData ) { 24 | $imageUrl = $imageData[0]; // Get image url 25 | $excerpt = $toDisplay->post_excerpt; // Get post excerpt 26 | 27 | // Verify image meets requirements to be shown 28 | if( $excerpt != '' ) { 29 | $count++; 30 | $text = str_replace("\n", '', $excerpt); 31 | $text = str_replace("\r", '', $text); 32 | $text = str_replace('"', '\"', $text); 33 | echo '{ "image" : "' . esc_url( $imageUrl ) . '", "url" : "' . get_permalink( $toDisplay->ID ) . '", "text" : "' . esc_js( $text ) . '" }, '; 34 | // If limit isn't hit, make a new query and grab the next page 35 | if( !$postList->have_posts() && $count < $limit ) 36 | { 37 | // Increase page, get new set of posts 38 | $page++; 39 | $postList = new WP_Query( array( 'cat'=>$category, 'posts_per_page'=>$limit, 'paged'=>$page ) ); 40 | } 41 | } 42 | } 43 | } 44 | } 45 | 46 | 47 | /* "Feed" content type. Simplepie is bundled with WordPress - documentation at http://www.simplepie.org/wiki/. */ 48 | if( substr( $cType_value, 0, 9 ) == 'cTypeFeed' ) { 49 | // Get the feed items to show based on the URL and number of items selected by the user. 50 | if( function_exists('fetch_feed') ) { 51 | // Change the default feed cache recreation period to 1 hour - http://codex.wordpress.org/Plugin_API/Filter_Reference/wp_feed_cache_transient_lifetime 52 | add_filter( 'wp_feed_cache_transient_lifetime' , 'feedCache_hour' ); 53 | 54 | // Get the feed 55 | $feed = fetch_feed($wipDynamicMeta[$cType_value.'_url']); 56 | 57 | remove_filter( 'wp_feed_cache_transient_lifetime' , 'feedCache_hour' ); 58 | 59 | if( is_wp_error( $feed ) ) { 60 | echo 'This feed cannot be parsed.'; 61 | } else { 62 | $count = 0; 63 | $limit = $wipDynamicMeta[$cType_value.'_number']; 64 | $feedItems = $feed->get_items(); 65 | 66 | // Number conversions for display limit control 67 | if( $limit != '-1' ) 68 | $limit = intval( $limit ); // Widget is set to limit 69 | else 70 | $limit = $feed->get_item_quantity(); // Widget set to unlimited 71 | 72 | foreach( $feedItems as $item ) { 73 | if( $count < $limit ) { 74 | 75 | $imageElement = $item->get_item_tags('', 'image'); 76 | $image = $imageElement[0]['data']; 77 | $headlineElement = $item->get_item_tags('', 'headline'); 78 | $headline = $headlineElement[0]['data']; 79 | 80 | if( $image != '' && $headline != '' ) { 81 | 82 | $headline = str_replace( "\n", '', $headline ); 83 | $headline = str_replace( "\r", '', $headline ); 84 | $headline = str_replace( '"', '\"', $headline ); 85 | 86 | echo '{ "image" : "' . esc_url( $image ) . '", "url" : "' . $item->get_permalink() . '", "text" : "' . esc_js( $headline ) . '" }, '; 87 | 88 | } 89 | 90 | } else { 91 | break; // Display limit reached, break out of foreach 92 | } 93 | } 94 | } 95 | } 96 | } 97 | 98 | 99 | /* "Links" content type. */ 100 | if( substr( $cType_value, 0, 10 ) == 'cTypeLinks' ) { 101 | $link = get_bookmarks( 'category=' . $wipDynamicMeta[$cType_value.'_category'] . '&limit=' . $wipDynamicMeta[$cType_value.'_number'] . '&orderby=link_id&order=DESC' ); 102 | foreach( $link as $link_value ) { 103 | if( $link_value->link_image != '' ) { 104 | if( $link_value->link_notes && !isset( $link_value->link_description ) ) { 105 | $text = $link_value->link_notes; 106 | $text = str_replace("\n", '', $text); 107 | $text = str_replace("\r", '', $text); 108 | $text = str_replace('"', '\"', $text); 109 | echo '{ "image" : "' . esc_url( $link_value->link_image ) . '", "url" : "' . esc_url( $link_value->link_url ) . '", "text" : "' . esc_js( $text ) . '" }, '; 110 | } else { 111 | echo '{ "image" : "' . esc_url( $link_value->link_image ) . '", "url" : "' . esc_url( $link_value->link_url ) . '", "text" : "

    ' . esc_js( $link_value->link_name ) . '

    ' . esc_js( $link_value->link_description ) . '

    " }, '; 112 | } 113 | } 114 | } 115 | } 116 | 117 | 118 | } 119 | ?> -------------------------------------------------------------------------------- /plugins/tinymce_table/js/tiny_mce_popup.js: -------------------------------------------------------------------------------- 1 | 2 | // Uncomment and change this document.domain value if you are loading the script cross subdomains 3 | // document.domain = 'moxiecode.com'; 4 | 5 | var tinymce=null,tinyMCEPopup,tinyMCE;tinyMCEPopup={init:function(){var b=this,a,c;a=b.getWin();tinymce=a.tinymce;tinyMCE=a.tinyMCE;b.editor=tinymce.EditorManager.activeEditor;b.params=b.editor.windowManager.params;b.features=b.editor.windowManager.features;b.dom=b.editor.windowManager.createInstance("tinymce.dom.DOMUtils",document);if(b.features.popup_css!==false){b.dom.loadCSS(b.features.popup_css||b.editor.settings.popup_css)}b.listeners=[];b.onInit={add:function(e,d){b.listeners.push({func:e,scope:d})}};b.isWindow=!b.getWindowArg("mce_inline");b.id=b.getWindowArg("mce_window_id");b.editor.windowManager.onOpen.dispatch(b.editor.windowManager,window)},getWin:function(){return(!window.frameElement&&window.dialogArguments)||opener||parent||top},getWindowArg:function(c,b){var a=this.params[c];return tinymce.is(a)?a:b},getParam:function(b,a){return this.editor.getParam(b,a)},getLang:function(b,a){return this.editor.getLang(b,a)},execCommand:function(d,c,e,b){b=b||{};b.skip_focus=1;this.restoreSelection();return this.editor.execCommand(d,c,e,b)},resizeToInnerSize:function(){var a=this;setTimeout(function(){var b=a.dom.getViewPort(window);a.editor.windowManager.resizeBy(a.getWindowArg("mce_width")-b.w,a.getWindowArg("mce_height")-b.h,a.id||window)},10)},executeOnLoad:function(s){this.onInit.add(function(){eval(s)})},storeSelection:function(){this.editor.windowManager.bookmark=tinyMCEPopup.editor.selection.getBookmark(1)},restoreSelection:function(){var a=tinyMCEPopup;if(!a.isWindow&&tinymce.isIE){a.editor.selection.moveToBookmark(a.editor.windowManager.bookmark)}},requireLangPack:function(){var b=this,a=b.getWindowArg("plugin_url")||b.getWindowArg("theme_url");if(a&&b.editor.settings.language&&b.features.translate_i18n!==false&&b.editor.settings.language_load!==false){a+="/langs/"+b.editor.settings.language+"_dlg.js";if(!tinymce.ScriptLoader.isDone(a)){document.write(' 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
    14 | 20 | 21 |
    22 |
    23 |
    24 | {#table_dlg.general_props} 25 | 26 | 27 | 28 | 29 | 36 | 37 | 38 | 39 | 40 | 48 | 49 | 50 | 51 | 52 | 60 | 61 | 62 | 63 | 64 | 69 | 70 | 71 | 72 | 73 | 74 | 75 |
    30 | 35 |
    41 | 47 |
    53 | 59 |
    65 | 68 |
    76 |
    77 |
    78 | 79 |
    80 |
    81 | {#table_dlg.advanced_props} 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 104 | 105 | 106 | 107 | 108 | 111 | 112 | 113 | 114 | 115 | 123 | 124 | 125 | 126 | 127 | 135 | 136 |
    97 | 103 |
    109 | 110 |
    116 | 117 | 118 | 119 | 120 | 121 |
     
    122 |
    128 | 129 | 130 | 131 | 132 | 133 |
     
    134 |
    137 |
    138 |
    139 |
    140 | 141 |
    142 |
    143 | 149 |
    150 | 151 |
    152 |
    153 |
    154 | 155 |
    156 | 157 |
    158 |
    159 |
    160 | 161 | 162 | -------------------------------------------------------------------------------- /plugins/tinymce_table/cell.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {#table_dlg.cell_title} 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
    14 | 20 | 21 |
    22 |
    23 |
    24 | {#table_dlg.general_props} 25 | 26 | 27 | 28 | 29 | 37 | 38 | 39 | 45 | 46 | 47 | 48 | 49 | 57 | 58 | 59 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 86 | 87 |
    30 | 36 | 40 | 44 |
    50 | 56 | 60 | 67 |
    82 | 85 |
    88 |
    89 |
    90 | 91 |
    92 |
    93 | {#table_dlg.advanced_props} 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 115 | 116 | 117 | 118 | 119 | 122 | 123 | 124 | 125 | 126 | 134 | 135 | 136 | 137 | 138 | 139 | 147 | 148 | 149 | 150 | 151 | 159 | 160 |
    109 | 114 |
    120 | 121 |
    127 | 128 | 129 | 130 | 131 | 132 |
     
    133 |
    140 | 141 | 142 | 143 | 144 | 145 |
     
    146 |
    152 | 153 | 154 | 155 | 156 | 157 |
     
    158 |
    161 |
    162 |
    163 |
    164 | 165 |
    166 |
    167 | 172 |
    173 | 174 |
    175 |
    176 |
    177 | 178 |
    179 | 180 |
    181 |
    182 |
    183 | 184 | 185 | -------------------------------------------------------------------------------- /page.php: -------------------------------------------------------------------------------- 1 | the_meta(); 8 | $dynamicMeta = $wipDynamic->the_meta(); 9 | $redirect = get_post_meta( get_the_ID(), 'redirect', true ); 10 | $campaignProgress = get_post_meta( get_the_ID(), 'campaignprogress', true ); 11 | 12 | // If there is custom redirect metadata on this page 13 | if( $redirect ) { 14 | wp_redirect( $redirect ); 15 | die(); 16 | } else { 17 | get_header(); 18 | 19 | while( have_posts() ) { 20 | the_post(); 21 | 22 | // Split the content at the More tag if any of the multiple column layout options are selected, or of the page is dynamic 23 | if( 24 | ( isset( $layoutMeta['layout'] ) && 25 | ( $layoutMeta['layout'] != '' || $layoutMeta['layout'] != '0' ) 26 | ) || 27 | ( isset( $layoutMeta['page_type'] ) && $layoutMeta['page_type'] == 'dynamic' ) 28 | ) { 29 | // Double angle brackets are necessary for the pattern to match. 30 | $content = preg_split( "<>", $post->post_content ); 31 | } 32 | 33 | // Do slideshow stuff if this page has one and the site is in the WSU theme 34 | if( wp_get_theme()->Name != 'WIP' && 35 | ( 36 | isset( $wipLayoutMeta['page_type'] ) && $wipLayoutMeta['page_type'] == 'dynamic' && 37 | isset( $wipLayoutMeta['slideshow'] ) && $wipLayoutMeta['slideshow'] == 'show' && 38 | isset( $wipDynamicMeta['wipHomeArray'] ) && $wipDynamicMeta['wipHomeArray'] != '' 39 | ) 40 | ) { 41 | ?> 42 |
    43 |
    44 | 48 |
    49 |
    50 | 60 |

    61 | 66 |
    67 | 77 |

    78 | 84 |
    85 | 91 |

    By

    92 | 112 |
    113 | 114 | 115 | 116 | 117 | 118 | 119 |
    120 | 123 |
    124 | 130 |
    131 | 135 |
    136 |
    137 | 138 |
    $0 Million
    139 |
    140 | /', $post->post_content ) ) 150 | echo apply_filters( 'the_content', $content[1] ); 151 | } 152 | ?> 153 |
    154 | 163 |
    164 | /', $post->post_content ) ) 172 | echo apply_filters( 'the_content', $content[2] ); 173 | } 174 | ?> 175 |
    176 | 183 |
    184 | /', $post->post_content ) ) 192 | echo apply_filters( 'the_content', $content[3] ); 193 | } 194 | ?> 195 |
    196 | 205 | -------------------------------------------------------------------------------- /plugins/tinymce_table/js/row.js: -------------------------------------------------------------------------------- 1 | tinyMCEPopup.requireLangPack(); 2 | 3 | function init() { 4 | tinyMCEPopup.resizeToInnerSize(); 5 | 6 | document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table'); 7 | document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor'); 8 | 9 | var inst = tinyMCEPopup.editor; 10 | var dom = inst.dom; 11 | var trElm = dom.getParent(inst.selection.getStart(), "tr"); 12 | var formObj = document.forms[0]; 13 | var st = dom.parseStyle(dom.getAttrib(trElm, "style")); 14 | 15 | // Get table row data 16 | var rowtype = trElm.parentNode.nodeName.toLowerCase(); 17 | var align = dom.getAttrib(trElm, 'align'); 18 | var valign = dom.getAttrib(trElm, 'valign'); 19 | var height = trimSize(getStyle(trElm, 'height', 'height')); 20 | var className = dom.getAttrib(trElm, 'class'); 21 | var bgcolor = convertRGBToHex(getStyle(trElm, 'bgcolor', 'backgroundColor')); 22 | var backgroundimage = getStyle(trElm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1"); 23 | var id = dom.getAttrib(trElm, 'id'); 24 | var lang = dom.getAttrib(trElm, 'lang'); 25 | var dir = dom.getAttrib(trElm, 'dir'); 26 | 27 | selectByValue(formObj, 'rowtype', rowtype); 28 | 29 | // Any cells selected 30 | if (dom.select('td.mceSelected,th.mceSelected', trElm).length == 0) { 31 | // Setup form 32 | addClassesToList('class', 'table_row_styles'); 33 | TinyMCE_EditableSelects.init(); 34 | 35 | formObj.bgcolor.value = bgcolor; 36 | formObj.backgroundimage.value = backgroundimage; 37 | formObj.height.value = height; 38 | formObj.id.value = id; 39 | formObj.lang.value = lang; 40 | formObj.style.value = dom.serializeStyle(st); 41 | selectByValue(formObj, 'align', align); 42 | selectByValue(formObj, 'valign', valign); 43 | selectByValue(formObj, 'class', className, true, true); 44 | selectByValue(formObj, 'dir', dir); 45 | 46 | // Resize some elements 47 | if (isVisible('backgroundimagebrowser')) 48 | document.getElementById('backgroundimage').style.width = '180px'; 49 | 50 | updateColor('bgcolor_pick', 'bgcolor'); 51 | } else 52 | tinyMCEPopup.dom.hide('action'); 53 | } 54 | 55 | function updateAction() { 56 | var inst = tinyMCEPopup.editor, dom = inst.dom, trElm, tableElm, formObj = document.forms[0]; 57 | var action = getSelectValue(formObj, 'action'); 58 | 59 | tinyMCEPopup.restoreSelection(); 60 | trElm = dom.getParent(inst.selection.getStart(), "tr"); 61 | tableElm = dom.getParent(inst.selection.getStart(), "table"); 62 | 63 | // Update all selected rows 64 | if (dom.select('td.mceSelected,th.mceSelected', trElm).length > 0) { 65 | tinymce.each(tableElm.rows, function(tr) { 66 | var i; 67 | 68 | for (i = 0; i < tr.cells.length; i++) { 69 | if (dom.hasClass(tr.cells[i], 'mceSelected')) { 70 | updateRow(tr, true); 71 | return; 72 | } 73 | } 74 | }); 75 | 76 | inst.addVisual(); 77 | inst.nodeChanged(); 78 | inst.execCommand('mceEndUndoLevel'); 79 | tinyMCEPopup.close(); 80 | return; 81 | } 82 | 83 | inst.execCommand('mceBeginUndoLevel'); 84 | 85 | switch (action) { 86 | case "row": 87 | updateRow(trElm); 88 | break; 89 | 90 | case "all": 91 | var rows = tableElm.getElementsByTagName("tr"); 92 | 93 | for (var i=0; i 3, 'c' => 'set-large-left' , 'o' => array(0,1,2,2,1) ); 7 | $storySets[1] = array( 'n' => 3, 'c' => 'set-large-right' , 'o' => array(0,1,2,2,1) ); 8 | //$storySets[1] = array( 'n' => 4, 'c' => 'set-large-right' ); 9 | //$storySets[2] = array( 'n' => 3, 'c' => 'set-medium-equal' ); 10 | //==== CREATE STORY ARRAY ===================+ 11 | $storyproject = array(); 12 | 13 | $args = array( 'post_type' => 'storyproject' , 'posts_per_page' => 100 ); 14 | $spQuery = new WP_Query( $args ); 15 | if ( $spQuery->have_posts() ) { 16 | while ( $spQuery->have_posts() ) { 17 | $spQuery->the_post(); 18 | //==== PARSE DATA ===================+ 19 | $tierMeta = get_post_meta( get_the_ID() , 'storyproject-tier' , true ); 20 | $tierVal = ( $tierMeta )? $tierMeta : 3; 21 | $sQuote = get_post_meta( get_the_ID() , 'storyproject-quote' , true ); 22 | $sRank = get_post_meta( get_the_ID() , 'storyproject-rank' , true ); 23 | $sVideo = get_post_meta( get_the_ID() , 'storyproject-video' , true ); 24 | $sSubt = get_post_meta( get_the_ID() , 'storyproject-subtitle' , true ); 25 | $vidClass = ( $sVideo )? ' has-video': ''; 26 | //==== CREATE STORY ARRAY ===================+ 27 | $iWide = false; $iTall = false; 28 | if ( has_post_thumbnail() ) { 29 | $iWide = get_the_post_thumbnail( get_the_ID(), 'gallery-tall4x6' , array('class'=>'gallery-image') ); 30 | $iTall = get_the_post_thumbnail( get_the_ID(), 'gallery-wide4x3' , array('class'=>'gallery-image') ); 31 | }; 32 | //==== CREATE STORY ARRAY ===================+ 33 | $storyproject[] = array( 34 | 'title' => get_the_title(), 35 | 'content' => get_the_content(), 36 | 'tier' => $tierVal, 37 | 'image-tall' => $iWide, 38 | 'image-wide' => $iTall, 39 | 'quote' => $sQuote, 40 | 'summary' => get_the_excerpt(), 41 | 'link' => '', 42 | 'rank' => $sRank, 43 | 'id' => get_the_ID(), 44 | 'video' => $sVideo, 45 | 'subtitle' => $sSubt, 46 | ); 47 | } 48 | }; 49 | //==== SHUFFLE STORY ARRAY ===================+ 50 | shuffle( $storyproject ); 51 | //==== BUILD TIERS ===================+ 52 | $tiers = array(); 53 | if( $storyproject ){ 54 | $tiers[0] = array(); 55 | $tiers[1] = array(); 56 | $tiers[2] = array(); 57 | foreach( $storyproject as $story ){ 58 | if ( 1 == $story['tier'] ){ $tiers[0][] = $story; } 59 | else if( 2 == $story['tier'] ){ $tiers[1][] = $story; } 60 | else {$tiers[2][] = $story; }; 61 | } 62 | }; 63 | //==== BUILD TEIR PRIORITIES ===================+ 64 | foreach( $tiers as $tk => $td ){ 65 | $p1 = array(); $p2 = array(); $p3 = array(); 66 | foreach( $td as $storyT ){ 67 | if ( 1 == $storyT['rank'] ){ $p1[] = $storyT; } 68 | else if( 2 == $storyT['rank'] ){ $p2[] = $storyT; } 69 | else { $p3[] = $storyT; }; 70 | } 71 | $tiers[$tk] = array_merge($p1, $p2 , $p3 ); 72 | } 73 | $s = 0; // CURRENT SET INDICATOR 74 | $sn = 0; // NEW CREATED SETS INDICATOR 75 | $st = 0; // CURRENT SET TYPE INDICATOR 76 | $sc = 0; // STORY COUNT INDICATOR 77 | //$ti = array(0,0,0); 78 | $setArray = array(); // SET BUILT OUT AS AN ARRAY 79 | while( $sc < count( $storyproject ) ){ 80 | $st = ( $st < count( $storySets ) )? $st : 0 ; 81 | $cSetType = $storySets[$st]; 82 | $tA = array(); 83 | foreach ( $cSetType['o'] as $sI ){ // SET ITEM IS A TIER 84 | if( $tiers[$sI] ){ $cT = $sI;}// CHECK TO SEE IF ANYTING LEFT IN THAT TIER 85 | else if( $si != 1 && $tiers[1] ){ $cT = 1;} // IF NOT EQUAL TO TIER CHECK TIER 1 86 | else if( $si != 2 && $tiers[2] ){ $cT = 2;} // IF NOT EQUAL TO TIER IF NOT CHECK TIER 2 87 | else if( $si != 0 && $tiers[0] ){ $cT = 0;}// IF NOT EQUAL TO TIER IF NOT CHECK TIER 3 88 | else {$cT = 3;} 89 | if( $cT < 3 ){ 90 | $wideSpacer = ''; 91 | $tallSpacer = ''; 92 | if( $sI == '0' ){ 93 | $sClass = ' large-feature-tall'; 94 | $tiers[$cT][0]['spacer'] = $tallSpacer; 95 | $tiers[$cT][0]['type'] = 'tall'; 96 | } 97 | else if( $sI == '1' ){ 98 | $sClass = ' medium-feature-wide'; 99 | $tiers[$cT][0]['spacer'] = $wideSpacer; 100 | $tiers[$cT][0]['type'] = 'wide'; 101 | } 102 | else if( $sI == '2' ){ 103 | $sClass = ' small-feature-tall'; 104 | $tiers[$cT][0]['spacer'] = $tallSpacer; 105 | $tiers[$cT][0]['type'] = 'tall'; 106 | } 107 | else { 108 | $sClass = ''; 109 | }; 110 | $tiers[$cT][0]['class'] = 'story-item ' . $cSetType['c'] . $sClass; 111 | $tA[] = $tiers[$cT][0]; // ADD STORY TO ARRAY 112 | unset($tiers[$cT][0]); // REMOVE STORY FROM ARRAY 113 | $tiers[$cT] = array_values( $tiers[$cT] ); // RESET ARRAY VALUES 114 | } 115 | }; 116 | $setArray[]= $tA; 117 | $st++; 118 | $sc = $sc + count( $cSetType['o'] ); 119 | }; 120 | //==== START PAGE ===================+ 121 | get_header();?> 122 |
    123 |
    124 |

    Voices of Extension Story Project

    125 |

    For the past century, WSU Extension has applied research and education to improve the quality of life throughout Washington.

    126 |

    As part of our yearlong celebration of Extension's 100th birthday, CAHNRS Communications invites former and current students, faculty, staff, and friends to share how WSU Extension programs, services, and people have enriched their lives.

    127 |

    Whether Extension has helped you become a better gardener or farmer, improve how your family eats or manages its finances, or teach your child about citizenship, we want to hear about it. We will continue to record the stories that make up the Voices of Extension until we reach 100!
    128 | 129 |

    130 | 131 | 132 | 133 | 134 | 135 | 136 |
    137 | 138 | 139 |

    140 |

    Submit your story here »

    141 | '; 144 | foreach( $set as $story ){ 145 | $sImg = ( $story['type'] == 'tall' )? $story['image-tall']: $story['image-wide']; 146 | echo '
  • '; 147 | echo $story['spacer']; 148 | echo $story['link']; 149 | echo $sImg; 150 | if( $story['video'] ){ 151 | echo ''; 152 | } 153 | echo '
      '; 154 | echo '
    • '; 155 | echo '
    • '; 156 | echo ''; 157 | echo $story['title']; 158 | if($story['subtitle']) echo '
      ' . $story['subtitle'] . ''; 159 | echo '
      '; 160 | if( $story['video'] ){ 161 | echo 'Watch Video'; 162 | } 163 | echo '' . $story['summary'] . ''; 164 | echo '"' . $story['quote'] . '"'; 165 | echo '
    • '; 166 | echo ''; 169 | echo '
    '; 170 | echo ''; 171 | echo '
  • '; 172 | } 173 | echo ''; 174 | } 175 | ;?> 176 |
    177 | -------------------------------------------------------------------------------- /plugins/tinymce_table/table.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {#table_dlg.title} 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
    15 | 21 | 22 |
    23 |
    24 |
    25 | {#table_dlg.general_props} 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 62 | 63 | 64 | 65 | 66 | 67 |
    59 |
    68 |
    69 |
    70 | 71 |
    72 |
    73 | {#table_dlg.advanced_props} 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 96 | 97 | 98 | 99 | 100 | 108 | 109 | 110 | 111 | 112 | 126 | 127 | 128 | 129 | 130 | 140 | 141 | 142 | 143 | 144 | 151 | 152 | 153 | 154 | 155 | 163 | 164 | 165 | 166 | 167 | 175 | 176 |
    94 | 95 |
    101 | 102 | 103 | 104 | 105 | 106 |
     
    107 |
    113 | 125 |
    131 | 139 |
    145 | 150 |
    156 | 157 | 158 | 159 | 160 | 161 |
     
    162 |
    168 | 169 | 170 | 171 | 172 | 173 |
     
    174 |
    177 |
    178 |
    179 |
    180 | 181 |
    182 |
    183 | 184 |
    185 | 186 |
    187 | 188 |
    189 |
    190 |
    191 | 192 | 193 | -------------------------------------------------------------------------------- /plugins/media_categories.php: -------------------------------------------------------------------------------- 1 | 'Media Categories', 16 | 'singular_name' => 'Media Category', 17 | 'search_items' => 'Search Media Categories', 18 | 'popular_items' => NULL, 19 | 'all_items' => 'All Media Categories', 20 | 'parent_item' => 'Parent Category', 21 | 'parent_item_colon' => 'Parent Category:', 22 | 'edit_item' => 'Edit Media Category', 23 | 'update_item' => 'Update Media Category', 24 | 'add_new_item' => 'Add New Media Category', 25 | 'new_item_name' => 'New Media Category Name', 26 | ); 27 | $args = array( 28 | 'labels' => $labels, 29 | 'show_in_nav_menus' => false, 30 | 'hierarchical' => true, 31 | 'query_var' => true, 32 | ); 33 | register_taxonomy( 'media_category', 'attachment', $args ); 34 | } 35 | 36 | // Add table header in Media Library 37 | function wipMediaCategories_addColumn( $columns ) { 38 | $new = array(); 39 | foreach( $columns as $key => $title ) { 40 | if( $key == 'comments' ) // Put the column before the $key column 41 | $new['media_categories'] = 'Media Categories'; 42 | $new[$key] = $title; 43 | } 44 | return $new; 45 | } 46 | 47 | // Adding tags entries in Media Library 48 | function wipMediaCategories_fillColumn( $column_name, $id ) { 49 | switch( $column_name ) { 50 | case 'media_categories': 51 | $admin = get_admin_url(); 52 | $string = "upload.php?"; 53 | $tags = get_the_terms( $id, 'media_category' ); 54 | 55 | if( !empty( $tags ) ) { 56 | $out = array(); 57 | foreach( $tags as $tag ) 58 | $out[] = " " . esc_html( sanitize_term_field( 'name', $tag->name, $tag->term_id, 'media_category', 'display' ) ) . ""; 59 | echo join( ', ', $out ); 60 | } else { 61 | _e( 'No Categories' ); 62 | } 63 | break; 64 | default: 65 | break; 66 | } 67 | } 68 | 69 | // Get media categories from database 70 | /*function wipMediaCategories_query( $term, $size ) 71 | { 72 | $args = array( 73 | 'post_type' => 'attachment', 74 | 'post_mime_type' => 'image', 75 | 'post_status' => 'inherit', 76 | 'tax_query' => array( 77 | array( 78 | 'taxonomy' => 'media_category', 79 | 'terms' => $term, 80 | 'field' => 'slug', 81 | ) 82 | ) 83 | ); 84 | $loop = new WP_Query( $args ); 85 | 86 | while( $loop->have_posts() ) 87 | { 88 | $loop->the_post(); 89 | $image = wp_get_attachment_image( '', $size, false ); 90 | $url = wp_get_attachment_url(); 91 | $output = '' . $image . ''; 92 | echo $output; 93 | } 94 | }*/ 95 | } 96 | } 97 | 98 | 99 | add_action( 'init', array( 'wipMediaCategories', 'wipMediaCategories_init' ) ); 100 | add_filter( 'manage_media_columns', array( 'wipMediaCategories', 'wipMediaCategories_addColumn' ) ); 101 | add_action( 'manage_media_custom_column', array( 'wipMediaCategories', 'wipMediaCategories_fillColumn' ), 10, 2 ); 102 | 103 | // Allows users to assign categories to uploads via checkboxes instead of slugs in a text field - adapted from http://wordpress.org/extend/plugins/media-categories-2 104 | $mediaCategoryTerms = get_terms( 'media_category', 'hide_empty=0' ); 105 | $count = count( $mediaCategoryTerms ); 106 | if( $count > 0 ) { 107 | 108 | // Custom walker to facilitate slugs instead of IDs on the list items 109 | class attachmentWalkerCategoryChecklist extends Walker { 110 | 111 | var $tree_type = 'category'; 112 | var $db_fields = array( 'parent' => 'parent', 'id' => 'term_id' ); 113 | 114 | function start_lvl( &$output, $depth = 0, $args = array() ) { 115 | $indent = str_repeat( "\t", $depth ); 116 | $output .= "$indent\n"; 122 | } 123 | 124 | function start_el( &$output, $category, $depth = 0, $args = array(), $current_object_id = 0 ) { 125 | extract( $args ); 126 | 127 | if( empty( $taxonomy ) ) 128 | $taxonomy = 'category'; 129 | 130 | if( $taxonomy == 'category' ) 131 | $name = 'post_category'; 132 | else 133 | $name = 'tax_input['.$taxonomy.']'; 134 | 135 | $class = in_array( $category->term_id, $popular_cats ) ? ' class="popular-category"' : ''; 136 | // The following line is all that has been modified from the original walker, value="' . $category->term_id . '" to value="' . $category->slug . '" 137 | $output .= "\n
  • " . ''; 138 | } 139 | 140 | function end_el( &$output, $category, $depth = 0, $args = array() ) { 141 | $output .= "
  • \n"; 142 | } 143 | 144 | } 145 | 146 | 147 | class mediaCategories { 148 | 149 | public static $instances; 150 | public $taxonomy; 151 | 152 | // While normally run statically, this allows @param type $taxonomy 153 | public function __construct( $taxonomy ) { 154 | 155 | // Store each instance of this class (for use when localizing scripts) 156 | $this->taxonomy = $taxonomy; 157 | self::$instances[] = $this; 158 | 159 | add_filter( 'attachment_fields_to_edit', array( &$this, 'mediaCategories_addMetabox' ), null, 2 ); 160 | add_action( 'wp_enqueue_media', array(__CLASS__, 'mediaCategories_enqueueScripts' ) ); 161 | add_action( 'wp_enqueue_media', array(__CLASS__, 'mediaCategories_enqueueStyles' ) ); 162 | 163 | } 164 | 165 | // Enqueue javascript 166 | function mediaCategories_enqueueScripts() { 167 | if( is_admin() ) { 168 | // Get each instance of this class, and pass each taxonomy in to javascript 169 | foreach( self::$instances as $instance ) { 170 | $tax[] = apply_filters( 'mc_taxonomy', 'media_category' ); 171 | } 172 | 173 | wp_register_script('media_categories_metabox_script', get_template_directory_uri() . '/js/media_categories.js' ); 174 | wp_enqueue_script('media_categories_metabox_script'); 175 | wp_localize_script('media_categories_metabox_script', 'taxonomy', $tax); 176 | } 177 | } 178 | 179 | // Enqueue CSS 180 | function mediaCategories_enqueueStyles() { 181 | if( is_admin() ) { 182 | wp_register_style('media_categories_metabox_style', get_template_directory_uri() . '/css/media_categories.css' ); 183 | wp_enqueue_style( 'media_categories_metabox_style'); 184 | } 185 | } 186 | 187 | // Insert a custom form field into the media editor, capture the output of a custom metabox and insert it 188 | function mediaCategories_addMetabox( $form_fields, $post ) { 189 | require_once( './includes/meta-boxes.php' ); 190 | 191 | $tax_name = 'media_category'; 192 | $taxonomy = get_taxonomy( $tax_name ); 193 | 194 | ob_start(); 195 | $this->mediaCategories_metabox( $post, array( 'args' => array( 'taxonomy' => $tax_name, 'tax' => $taxonomy ) ) ); 196 | $metabox = ob_get_clean(); 197 | 198 | $form_slug = 'media_category_metabox'; 199 | $form_fields[$form_slug]['label'] = $taxonomy->labels->name; 200 | $form_fields[$form_slug]['input'] = 'html'; 201 | $form_fields[$form_slug]['html'] = $metabox; 202 | $form_fields[$form_slug]['show_in_edit'] = false; // Make sure the metabox only loads on the modal. 203 | 204 | return $form_fields; 205 | } 206 | 207 | // Metabox using the custom walker 208 | function mediaCategories_metabox( $post, $box ) { 209 | $defaults = array( 'taxonomy' => apply_filters( 'mc_taxonomy', $this->taxonomy ) ); 210 | if( !isset( $box['args'] ) || !is_array( $box['args'] ) ) 211 | $args = array(); 212 | else 213 | $args = $box['args']; 214 | 215 | extract( wp_parse_args( $args, $defaults ), EXTR_SKIP ); 216 | $tax = get_taxonomy( $taxonomy ); 217 | ?> 218 |
    219 |
    220 | "; 224 | ?> 225 |
      226 | ID, array( 'taxonomy' => $taxonomy, 'walker' => $custom_walker ) ); 229 | ?> 230 |
    231 |
    232 |
    233 | 242 | -------------------------------------------------------------------------------- /plugins/tinymce_table/js/cell.js: -------------------------------------------------------------------------------- 1 | tinyMCEPopup.requireLangPack(); 2 | 3 | var ed; 4 | 5 | function init() { 6 | ed = tinyMCEPopup.editor; 7 | tinyMCEPopup.resizeToInnerSize(); 8 | 9 | document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table'); 10 | document.getElementById('bordercolor_pickcontainer').innerHTML = getColorPickerHTML('bordercolor_pick','bordercolor'); 11 | document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor') 12 | 13 | var inst = ed; 14 | var tdElm = ed.dom.getParent(ed.selection.getStart(), "td,th"); 15 | var formObj = document.forms[0]; 16 | var st = ed.dom.parseStyle(ed.dom.getAttrib(tdElm, "style")); 17 | 18 | // Get table cell data 19 | var celltype = tdElm.nodeName.toLowerCase(); 20 | var align = ed.dom.getAttrib(tdElm, 'align'); 21 | var valign = ed.dom.getAttrib(tdElm, 'valign'); 22 | var width = trimSize(getStyle(tdElm, 'width', 'width')); 23 | var height = trimSize(getStyle(tdElm, 'height', 'height')); 24 | var bordercolor = convertRGBToHex(getStyle(tdElm, 'bordercolor', 'borderLeftColor')); 25 | var bgcolor = convertRGBToHex(getStyle(tdElm, 'bgcolor', 'backgroundColor')); 26 | var className = ed.dom.getAttrib(tdElm, 'class'); 27 | var backgroundimage = getStyle(tdElm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1"); 28 | var id = ed.dom.getAttrib(tdElm, 'id'); 29 | var lang = ed.dom.getAttrib(tdElm, 'lang'); 30 | var dir = ed.dom.getAttrib(tdElm, 'dir'); 31 | var scope = ed.dom.getAttrib(tdElm, 'scope'); 32 | 33 | // Setup form 34 | addClassesToList('class', 'table_cell_styles'); 35 | TinyMCE_EditableSelects.init(); 36 | 37 | if (!ed.dom.hasClass(tdElm, 'mceSelected')) { 38 | formObj.bordercolor.value = bordercolor; 39 | formObj.bgcolor.value = bgcolor; 40 | formObj.backgroundimage.value = backgroundimage; 41 | formObj.width.value = width; 42 | formObj.height.value = height; 43 | formObj.id.value = id; 44 | formObj.lang.value = lang; 45 | formObj.style.value = ed.dom.serializeStyle(st); 46 | selectByValue(formObj, 'align', align); 47 | selectByValue(formObj, 'valign', valign); 48 | selectByValue(formObj, 'class', className, true, true); 49 | selectByValue(formObj, 'celltype', celltype); 50 | selectByValue(formObj, 'dir', dir); 51 | selectByValue(formObj, 'scope', scope); 52 | 53 | // Resize some elements 54 | if (isVisible('backgroundimagebrowser')) 55 | document.getElementById('backgroundimage').style.width = '180px'; 56 | 57 | updateColor('bordercolor_pick', 'bordercolor'); 58 | updateColor('bgcolor_pick', 'bgcolor'); 59 | } else 60 | tinyMCEPopup.dom.hide('action'); 61 | } 62 | 63 | function updateAction() { 64 | var el, inst = ed, tdElm, trElm, tableElm, formObj = document.forms[0]; 65 | 66 | tinyMCEPopup.restoreSelection(); 67 | el = ed.selection.getStart(); 68 | tdElm = ed.dom.getParent(el, "td,th"); 69 | trElm = ed.dom.getParent(el, "tr"); 70 | tableElm = ed.dom.getParent(el, "table"); 71 | 72 | // Cell is selected 73 | if (ed.dom.hasClass(tdElm, 'mceSelected')) { 74 | // Update all selected sells 75 | tinymce.each(ed.dom.select('td.mceSelected,th.mceSelected'), function(td) { 76 | updateCell(td); 77 | }); 78 | 79 | ed.addVisual(); 80 | ed.nodeChanged(); 81 | inst.execCommand('mceEndUndoLevel'); 82 | tinyMCEPopup.close(); 83 | return; 84 | } 85 | 86 | ed.execCommand('mceBeginUndoLevel'); 87 | 88 | switch (getSelectValue(formObj, 'action')) { 89 | case "cell": 90 | var celltype = getSelectValue(formObj, 'celltype'); 91 | var scope = getSelectValue(formObj, 'scope'); 92 | 93 | function doUpdate(s) { 94 | if (s) { 95 | updateCell(tdElm); 96 | 97 | ed.addVisual(); 98 | ed.nodeChanged(); 99 | inst.execCommand('mceEndUndoLevel'); 100 | tinyMCEPopup.close(); 101 | } 102 | }; 103 | 104 | if (ed.getParam("accessibility_warnings", 1)) { 105 | if (celltype == "th" && scope == "") 106 | tinyMCEPopup.confirm(ed.getLang('table_dlg.missing_scope', '', true), doUpdate); 107 | else 108 | doUpdate(1); 109 | 110 | return; 111 | } 112 | 113 | updateCell(tdElm); 114 | break; 115 | 116 | case "row": 117 | var cell = trElm.firstChild; 118 | 119 | if (cell.nodeName != "TD" && cell.nodeName != "TH") 120 | cell = nextCell(cell); 121 | 122 | do { 123 | cell = updateCell(cell, true); 124 | } while ((cell = nextCell(cell)) != null); 125 | 126 | break; 127 | 128 | case "all": 129 | var rows = tableElm.getElementsByTagName("tr"); 130 | 131 | for (var i=0; i 250 && inside.closest('div.widgets-sortables').length ) { 39 | css['width'] = w + 30 + 'px'; 40 | if ( inside.closest('div.widget-liquid-right').length ) 41 | css[margin] = 235 - w + 'px'; 42 | widget.css(css); 43 | } 44 | wpWidgets.fixLabels(widget); 45 | inside.slideDown('fast'); 46 | } else { 47 | inside.slideUp('fast', function() { 48 | widget.css({'width':'', margin:''}); 49 | }); 50 | } 51 | return false; 52 | }); 53 | 54 | $('input.widget-control-save').live('click', function(){ 55 | wpWidgets.save( $(this).closest('div.widget'), 0, 1, 0 ); 56 | return false; 57 | }); 58 | 59 | $('a.widget-control-remove').live('click', function(){ 60 | wpWidgets.save( $(this).closest('div.widget'), 1, 1, 0 ); 61 | return false; 62 | }); 63 | 64 | $('a.widget-control-close').live('click', function(){ 65 | wpWidgets.close( $(this).closest('div.widget') ); 66 | return false; 67 | }); 68 | 69 | sidebars.children('.widget').each(function() { 70 | wpWidgets.appendTitle(this); 71 | if ( $('p.widget-error', this).length ) 72 | $('a.widget-action', this).click(); 73 | }); 74 | 75 | $('#widget-list').children('.widget').draggable({ 76 | connectToSortable: 'div.widgets-sortables', 77 | handle: '> .widget-top > .widget-title', 78 | distance: 2, 79 | helper: 'clone', 80 | zIndex: 5, 81 | containment: 'document', 82 | start: function(e,ui) { 83 | ui.helper.find('div.widget-description').hide(); 84 | the_id = this.id; 85 | }, 86 | stop: function(e,ui) { 87 | if ( rem ) 88 | $(rem).hide(); 89 | 90 | rem = ''; 91 | 92 | } 93 | }); 94 | 95 | sidebars.sortable({ 96 | placeholder: 'widget-placeholder', 97 | items: '> .widget', 98 | handle: '> .widget-top > .widget-title', 99 | cursor: 'move', 100 | distance: 2, 101 | containment: 'document', 102 | start: function(e,ui) { 103 | ui.item.children('.widget-inside').hide(); 104 | ui.item.css({margin:'', 'width':''}); 105 | }, 106 | stop: function(e,ui){ 107 | if ( ui.item.hasClass('ui-draggable') && ui.item.data('draggable') ) 108 | ui.item.draggable('destroy'); 109 | 110 | if ( ui.item.hasClass('deleting') ){ 111 | wpWidgets.save( ui.item, 1, 0, 1 ); // delete widget 112 | ui.item.remove(); 113 | return; 114 | } 115 | 116 | if( the_id == undefined || the_id == '' ){ 117 | // Moving a widget 118 | var newParent = $('div#' + ui.item.context.offsetParent.id ); 119 | 120 | // Add id to array 121 | $("input#" + newParent.attr('id') + "Array").val(newParent.sortable('toArray').join()); 122 | 123 | // Remove from old location 124 | $("input#" + $(this).attr('id') + "Array").val($(this).sortable('toArray').join()); 125 | } else { 126 | // Widget is new 127 | var id = the_id, 128 | counterVal = $("input#" + id.slice(0, -6)).val(); 129 | 130 | ui.item.css({margin:'', 'width':''}); 131 | the_id = ''; 132 | 133 | // This is all to make sure "Page Content" widgets work properly. 134 | // Without it the IDs get mixed up and you can end up with multiple widgets sharing the same content. 135 | if ( id.indexOf( 'cTypePage') != -1 ){ 136 | //Get current arrays 137 | var mainArray = [], 138 | secondaryArray = [], 139 | additionalArray = [], 140 | index = 0, 141 | widgetArray = [], 142 | counter = 0; 143 | 144 | //Compile all existing page content widgets 145 | if( $('input#wipMainArray' ).attr('value') != '' && $('input#wipMainArray' ).attr('value') != undefined ){ 146 | mainArray = $('input#wipMainArray' ).attr('value').split( ',' ); 147 | for( index = 0; index < mainArray.length; index++ ) { 148 | if( mainArray[index].indexOf( 'cTypePage') != -1 ) //{ 149 | widgetArray.push( mainArray[index] ); 150 | //} 151 | } 152 | } 153 | if( $('input#wipSecondayArray' ).attr('value') != '' && $('input#wipSecondayArray' ).attr('value') != undefined ){ 154 | secondaryArray = $('input#wipSecondayArray' ).attr('value').split( ',' ); 155 | for( index = 0; index < secondaryArray.length; index++ ) { 156 | if( secondaryArray[index].indexOf( 'cTypePage') != -1 ) //{ 157 | widgetArray.push( secondaryArray[index] ); 158 | //} 159 | } 160 | } 161 | if( $('input#wipAdditionalArray' ).attr('value') != '' && $('input#wipAdditionalArray' ).attr('value') != undefined ){ 162 | additionalArray = $('input#wipAdditionalArray' ).attr('value').split( ',' ); 163 | for( index = 0; index < additionalArray.length; index++ ) { 164 | if( additionalArray[index].indexOf( 'cTypePage') != -1 ) //{ 165 | widgetArray.push( additionalArray[index] ); 166 | //} 167 | } 168 | } 169 | 170 | //Sort array 171 | widgetArray.sort(); 172 | 173 | //What's the lowest available ID? 174 | index = 0; 175 | while( index < widgetArray.length && widgetArray[index].slice(-1) == counter ){ 176 | index++; 177 | counter++; 178 | } 179 | 180 | counterVal = counter; 181 | } 182 | 183 | //Insert id value 184 | ui.item.html( ui.item.html().replace(/<[^<>]+>/g, function(m){ return m.replace(/__i__|%i%/g, counterVal); }) ); 185 | ui.item.attr( 'id', id.replace('__i__', counterVal) ); 186 | 187 | //Update base count 188 | counterVal++; 189 | $("input#" + id.slice(0, -6)).val(counterVal); 190 | 191 | //Save widget to array 192 | $("input#" + $(this).attr('id') + "Array").val($(this).sortable('toArray').join()); 193 | } 194 | 195 | //Expanding widget 196 | ui.item.find("a.widget-action").click(); 197 | }, 198 | receive: function(e, ui) { 199 | var sender = $(ui.sender); 200 | 201 | if ( !$(this).is(':visible') || this.id.indexOf('orphaned_widgets') != -1 ) 202 | sender.sortable('cancel'); 203 | 204 | if ( sender.attr('id').indexOf('orphaned_widgets') != -1 && !sender.children('.widget').length ){ 205 | sender.parents('.orphan-sidebar').slideUp(400, function(){ $(this).remove(); }); 206 | } 207 | } 208 | }).sortable('option', 'connectWith', 'div.widgets-sortables').parent().filter('.closed').children('.widgets-sortables').sortable('disable'); 209 | 210 | }, 211 | 212 | saveOrder : function(sb){ 213 | if ( sb ) 214 | $('#' + sb).closest('div.widgets-holder-wrap').find('img.ajax-feedback').css('visibility', 'visible'); 215 | 216 | var a = { 217 | action: 'widgets-order', 218 | savewidgets: $('#_wpnonce_widgets').val(), 219 | sidebars: [] 220 | }; 221 | 222 | $('div.widgets-sortables').each( function(){ 223 | if ( $(this).sortable ) 224 | a['sidebars[' + $(this).attr('id') + ']'] = $(this).sortable('toArray').join(','); 225 | }); 226 | 227 | $.post( ajaxurl, a, function(){ 228 | $('img.ajax-feedback').css('visibility', 'hidden'); 229 | }); 230 | 231 | this.resize(); 232 | }, 233 | 234 | save : function(widget){ 235 | widget = $(widget); 236 | 237 | // Added 238 | wid = widget.attr("id"); 239 | count = $("input#" + wid.slice(0, -2)); 240 | 241 | // There could well be a better way to do this... 242 | inp = $("input#" + widget.parent().attr("id") + "Array"); // Get the input for the div we're deleting from 243 | inpval = inp.val(); // Get the value of above input as it is before the delete 244 | if (inpval.indexOf(",") >= 0){ // If there's more than one (an array of) widget(s) in this div and its respective input value... 245 | newval = inpval.replace(wid, ""); // Replace the id of the widget we're deleting with nothing 246 | arr = newval.split(","); // Split what's left of the value at the commas 247 | newv = $.grep(arr,function(n){ 248 | return(n); 249 | }); // Clean up any empty values from our split (i.e. get rid of stray commas) and return the new value 250 | } else { // Otherwise if there's just one widget... 251 | newv = ''; // the new value is nothing 252 | } 253 | 254 | widget.slideUp("fast", function(){ 255 | 256 | // Added 257 | inp.val(inp.val().replace(inpval, newv)); // replace original input value with the new value 258 | count.val(count.val() - 1); // subtract 1 from ctype multi counter 259 | $(this).remove(); 260 | }) 261 | }, 262 | 263 | appendTitle : function(widget){ 264 | var title = $('input[id*="-title"]', widget).val() || ''; 265 | 266 | if ( title ) 267 | title = ': ' + title.replace(/<[^<>]+>/g, '').replace(//g, '>'); 268 | 269 | $(widget).children('.widget-top').children('.widget-title').children() 270 | .children('.in-widget-title').html(title); 271 | 272 | }, 273 | 274 | resize : function() { 275 | $('div.widgets-sortables').each(function(){ 276 | if ( $(this).parent().hasClass('inactive') ) 277 | return true; 278 | 279 | var h = 50, H = $(this).children('.widget').length; 280 | h = h + parseInt(H * 48, 10); 281 | $(this).css( 'minHeight', h + 'px' ); 282 | }); 283 | }, 284 | 285 | fixLabels : function(widget) { 286 | widget.children('.widget-inside').find('label').each(function(){ 287 | var f = $(this).attr('for'); 288 | if ( f && f == $('input', this).attr('id') ) 289 | $(this).removeAttr('for'); 290 | }); 291 | }, 292 | 293 | close : function(widget) { 294 | widget.children('.widget-inside').slideUp('fast', function(){ 295 | widget.css({'width':'', margin:''}); 296 | }); 297 | } 298 | }; 299 | 300 | $(document).ready(function($){ wpWidgets.init(); }); 301 | 302 | })(jQuery); -------------------------------------------------------------------------------- /inc/custom_header.php: -------------------------------------------------------------------------------- 1 | 500, 10 | 'width' => 1000, 11 | 'max-width' => 1500, 12 | 'header-text' => false, 13 | 'flex-height' => true, 14 | 'flex-width' => true, 15 | 'random-default' => false, 16 | 'admin-head-callback' => 'twentytwelve_admin_header_style', 17 | 'admin-preview-callback' => 'twentytwelve_admin_header_image', 18 | ); 19 | 20 | add_theme_support( 'custom-header', $args ); 21 | 22 | } 23 | add_action( 'after_setup_theme', 'twentytwelve_custom_header_setup' ); 24 | 25 | 26 | // Styles the header image preview on the Appearance > Header admin panel. 27 | function twentytwelve_admin_header_style() { 28 | 29 | if( get_header_image() ) { 30 | ?> 31 | 90 | Header admin panel 97 | function twentytwelve_admin_header_image() { 98 | if( get_header_image() ) { 99 | ?> 100 |
    101 |
    102 |
    103 | 118 | 128 |
    129 | 136 |

    137 | 146 |
    147 |
    148 |

    Page Title

    149 |

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec eu magna massa, eu venenatis dui. Suspendisse at accumsan mi. Aenean pharetra condimentum sagittis. Cras sapien odio, fringilla in accumsan sit amet, mollis ut ligula. Nam leo massa, semper in adipiscing id, fringilla eget dolor. Duis libero erat, ultrices vel accumsan a, iaculis vitae dui. In hac habitasse platea dictumst. Integer placerat sem ut urna luctus a luctus justo scelerisque.

    150 |
    151 |
    152 |
    153 |
    154 | --------------------------------------------------------------------------------