3 |
Article Summary: (Required)
4 |
Please include a short summary (25-55 words) of this article.
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/theme-parts/page-banners/includes/menu-banner.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/includes/main/main-start.php:
--------------------------------------------------------------------------------
1 |
14 |
--------------------------------------------------------------------------------
/font-awesome/less/larger.less:
--------------------------------------------------------------------------------
1 | // Icon Sizes
2 | // -------------------------
3 |
4 | /* makes the font 33% larger relative to the icon container */
5 | .@{fa-css-prefix}-lg {
6 | font-size: (4em / 3);
7 | line-height: (3em / 4);
8 | vertical-align: -15%;
9 | }
10 | .@{fa-css-prefix}-2x { font-size: 2em; }
11 | .@{fa-css-prefix}-3x { font-size: 3em; }
12 | .@{fa-css-prefix}-4x { font-size: 4em; }
13 | .@{fa-css-prefix}-5x { font-size: 5em; }
14 |
--------------------------------------------------------------------------------
/font-awesome/scss/_larger.scss:
--------------------------------------------------------------------------------
1 | // Icon Sizes
2 | // -------------------------
3 |
4 | /* makes the font 33% larger relative to the icon container */
5 | .#{$fa-css-prefix}-lg {
6 | font-size: (4em / 3);
7 | line-height: (3em / 4);
8 | vertical-align: -15%;
9 | }
10 | .#{$fa-css-prefix}-2x { font-size: 2em; }
11 | .#{$fa-css-prefix}-3x { font-size: 3em; }
12 | .#{$fa-css-prefix}-4x { font-size: 4em; }
13 | .#{$fa-css-prefix}-5x { font-size: 5em; }
14 |
--------------------------------------------------------------------------------
/font-awesome/less/list.less:
--------------------------------------------------------------------------------
1 | // List Icons
2 | // -------------------------
3 |
4 | .@{fa-css-prefix}-ul {
5 | padding-left: 0;
6 | margin-left: @fa-li-width;
7 | list-style-type: none;
8 | > li { position: relative; }
9 | }
10 | .@{fa-css-prefix}-li {
11 | position: absolute;
12 | left: -@fa-li-width;
13 | width: @fa-li-width;
14 | top: (2em / 14);
15 | text-align: center;
16 | &.@{fa-css-prefix}-lg {
17 | left: (-@fa-li-width + (4em / 14));
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/font-awesome/scss/_list.scss:
--------------------------------------------------------------------------------
1 | // List Icons
2 | // -------------------------
3 |
4 | .#{$fa-css-prefix}-ul {
5 | padding-left: 0;
6 | margin-left: $fa-li-width;
7 | list-style-type: none;
8 | > li { position: relative; }
9 | }
10 | .#{$fa-css-prefix}-li {
11 | position: absolute;
12 | left: -$fa-li-width;
13 | width: $fa-li-width;
14 | top: (2em / 14);
15 | text-align: center;
16 | &.#{$fa-css-prefix}-lg {
17 | left: -$fa-li-width + (4em / 14);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/includes/banners/front-page-banner.php:
--------------------------------------------------------------------------------
1 | ID );
10 |
11 | $query_string .= 'has-page=true&';
12 |
13 | } else {
14 |
15 | $url = get_bloginfo( 'url' );
16 |
17 | } // End if
18 |
19 | $current_url = $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
20 |
21 | $url .= $query_string . 'not-found=' . urlencode ( $current_url );
22 |
23 | wp_redirect( $url );
24 |
25 | exit();
--------------------------------------------------------------------------------
/font-awesome/less/core.less:
--------------------------------------------------------------------------------
1 | // Base Class Definition
2 | // -------------------------
3 |
4 | .@{fa-css-prefix} {
5 | display: inline-block;
6 | font: normal normal normal @fa-font-size-base/@fa-line-height-base FontAwesome; // shortening font declaration
7 | font-size: inherit; // can't have font-size inherit on line above, so need to override
8 | text-rendering: auto; // optimizelegibility throws things off #1094
9 | -webkit-font-smoothing: antialiased;
10 | -moz-osx-font-smoothing: grayscale;
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/font-awesome/scss/_core.scss:
--------------------------------------------------------------------------------
1 | // Base Class Definition
2 | // -------------------------
3 |
4 | .#{$fa-css-prefix} {
5 | display: inline-block;
6 | font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // shortening font declaration
7 | font-size: inherit; // can't have font-size inherit on line above, so need to override
8 | text-rendering: auto; // optimizelegibility throws things off #1094
9 | -webkit-font-smoothing: antialiased;
10 | -moz-osx-font-smoothing: grayscale;
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/lib/displays/slideshows/basic/slide-nav.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/font-awesome/scss/font-awesome.scss:
--------------------------------------------------------------------------------
1 | /*!
2 | * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome
3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
4 | */
5 |
6 | @import "variables";
7 | @import "mixins";
8 | @import "path";
9 | @import "core";
10 | @import "larger";
11 | @import "fixed-width";
12 | @import "list";
13 | @import "bordered-pulled";
14 | @import "animated";
15 | @import "rotated-flipped";
16 | @import "stacked";
17 | @import "icons";
18 | @import "screen-reader";
19 |
--------------------------------------------------------------------------------
/widgets/theme-parts/includes/widget-form.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $tp_name ):?>
5 | >
6 |
7 |
8 |
--------------------------------------------------------------------------------
/lib/theme-parts/feature-banner/class-feature-banner.php:
--------------------------------------------------------------------------------
1 | add_banners();
9 |
10 | } // __construct
11 |
12 |
13 | protected function add_banners(){
14 |
15 | include_once ignite_get_theme_path('lib/theme-parts/feature-banner/play-video-banner/class-play-video-banner.php');
16 |
17 | } // End add_banners
18 |
19 |
20 | } // End Feature Banner
21 |
22 | $feature_banner = new Feature_Banner();
--------------------------------------------------------------------------------
/lib/displays/slideshows/banner-slideshow/slideshow.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "washingtonstateuniversity/wsuwp-spine-child-theme-skeleton",
3 | "authors": [
4 | {
5 | "name": "Washington State University"
6 | }
7 | ],
8 | "require-dev": {
9 | "squizlabs/php_codesniffer": "2.8.x",
10 | "wp-coding-standards/wpcs": "0.11.0"
11 | },
12 | "scripts": {
13 | "post-install-cmd": "\"vendor/bin/phpcs\" --config-set installed_paths vendor/wp-coding-standards/wpcs",
14 | "post-update-cmd" : "\"vendor/bin/phpcs\" --config-set installed_paths vendor/wp-coding-standards/wpcs"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/font-awesome/less/stacked.less:
--------------------------------------------------------------------------------
1 | // Stacked Icons
2 | // -------------------------
3 |
4 | .@{fa-css-prefix}-stack {
5 | position: relative;
6 | display: inline-block;
7 | width: 2em;
8 | height: 2em;
9 | line-height: 2em;
10 | vertical-align: middle;
11 | }
12 | .@{fa-css-prefix}-stack-1x, .@{fa-css-prefix}-stack-2x {
13 | position: absolute;
14 | left: 0;
15 | width: 100%;
16 | text-align: center;
17 | }
18 | .@{fa-css-prefix}-stack-1x { line-height: inherit; }
19 | .@{fa-css-prefix}-stack-2x { font-size: 2em; }
20 | .@{fa-css-prefix}-inverse { color: @fa-inverse; }
21 |
--------------------------------------------------------------------------------
/font-awesome/scss/_stacked.scss:
--------------------------------------------------------------------------------
1 | // Stacked Icons
2 | // -------------------------
3 |
4 | .#{$fa-css-prefix}-stack {
5 | position: relative;
6 | display: inline-block;
7 | width: 2em;
8 | height: 2em;
9 | line-height: 2em;
10 | vertical-align: middle;
11 | }
12 | .#{$fa-css-prefix}-stack-1x, .#{$fa-css-prefix}-stack-2x {
13 | position: absolute;
14 | left: 0;
15 | width: 100%;
16 | text-align: center;
17 | }
18 | .#{$fa-css-prefix}-stack-1x { line-height: inherit; }
19 | .#{$fa-css-prefix}-stack-2x { font-size: 2em; }
20 | .#{$fa-css-prefix}-inverse { color: $fa-inverse; }
21 |
--------------------------------------------------------------------------------
/font-awesome/less/font-awesome.less:
--------------------------------------------------------------------------------
1 | /*!
2 | * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome
3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
4 | */
5 |
6 | @import "variables.less";
7 | @import "mixins.less";
8 | @import "path.less";
9 | @import "core.less";
10 | @import "larger.less";
11 | @import "fixed-width.less";
12 | @import "list.less";
13 | @import "bordered-pulled.less";
14 | @import "animated.less";
15 | @import "rotated-flipped.less";
16 | @import "stacked.less";
17 | @import "icons.less";
18 | @import "screen-reader.less";
19 |
--------------------------------------------------------------------------------
/lib/displays/promo-list-loop.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/lib/post-types/slides/includes/editor.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
Slide Options
4 |
5 |
Slide Subtitle
6 |
7 |
* Depending on the format of the slideshow the subtitle might not display
8 |
9 |
10 | Slide Link
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/classes/class-slide-factory-cahnrs-ignite.php:
--------------------------------------------------------------------------------
1 | 3,
9 | 'post_type' => 'any',
10 | 'taxonomy' => 'category',
11 | 'term_id' => false,
12 | 'order' => 'newest',
13 | );
14 |
15 | foreach( $options as $key => $value ){
16 |
17 | if ( ! empty( $args[ $key ] ) ){
18 |
19 | $options[ $key ] = $args[ $key ];
20 |
21 | } // End if
22 |
23 | } // end foreach
24 |
25 | } // end get_slides
26 |
27 |
28 | }
--------------------------------------------------------------------------------
/theme-parts/content/displays/promo-list.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/includes/banners/types/dynamic-scroll.php:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/lib/displays/feature-banners/play-video-banner/player.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/post-types/articles/includes/media-footer.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/post-types/degrees/editor/degree-type.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
Degree Type
4 |
5 |
Select Degree Type
6 |
7 | $label ):?>
8 | >
9 |
10 |
11 |
Selecting a Degree Type and Saving Will Display Type Specific Form Fields.
12 |
13 |
14 |
--------------------------------------------------------------------------------
/search.php:
--------------------------------------------------------------------------------
1 | the_banner( 'archive' );
8 |
9 | include_once CAHNRSIGNITEPATH . 'theme-parts/secondary-menu/class-secondary-menu-ignite.php';
10 | $secondary_menu = new Secondary_Menu_Ignite();
11 | $secondary_menu->the_menu( 'archive' );
12 |
13 | include_once CAHNRSIGNITEPATH . 'theme-parts/content/class-content-ignite.php';
14 | $content = new Content_Ignite();
15 | $content->the_content( 'search' );
16 |
17 | ignite_get_part('footer','search');
--------------------------------------------------------------------------------
/archive.php:
--------------------------------------------------------------------------------
1 | the_banner( 'archive' );
8 |
9 | include_once CAHNRSIGNITEPATH . 'theme-parts/secondary-menu/class-secondary-menu-ignite.php';
10 | $secondary_menu = new Secondary_Menu_Ignite();
11 | $secondary_menu->the_menu( 'archive' );
12 |
13 | include_once CAHNRSIGNITEPATH . 'theme-parts/content/class-content-ignite.php';
14 | $content = new Content_Ignite();
15 | $content->the_content( 'archive' );
16 |
17 | ignite_get_part('footer','archive');
--------------------------------------------------------------------------------
/category.php:
--------------------------------------------------------------------------------
1 | the_banner( 'category' );
8 |
9 | include_once CAHNRSIGNITEPATH . 'theme-parts/secondary-menu/class-secondary-menu-ignite.php';
10 | $secondary_menu = new Secondary_Menu_Ignite();
11 | $secondary_menu->the_menu( 'category' );
12 |
13 | include_once CAHNRSIGNITEPATH . 'theme-parts/content/class-content-ignite.php';
14 | $content = new Content_Ignite();
15 | $content->the_content( 'category' );
16 |
17 | ignite_get_part('footer','category');
--------------------------------------------------------------------------------
/lib/post-formats/scholarship-donor-profile/profile.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
11 |
16 |
--------------------------------------------------------------------------------
/lib/parts/search/basic-search.php:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/page.php:
--------------------------------------------------------------------------------
1 | the_banner( 'page' );
8 |
9 | include_once CAHNRSIGNITEPATH . 'theme-parts/secondary-menu/class-secondary-menu-ignite.php';
10 | $secondary_menu = new Secondary_Menu_Ignite();
11 | $secondary_menu->the_menu( 'page' );
12 |
13 | ob_start();
14 |
15 | include locate_template( 'includes/content/single-page.php', false );
16 |
17 | $html = ob_get_clean();
18 |
19 | echo apply_filters( 'cahnrs_ignite_page_html', $html );
20 |
21 | ignite_get_part('footer','page');
--------------------------------------------------------------------------------
/index.php:
--------------------------------------------------------------------------------
1 | the_banner( 'index' );
8 |
9 | include_once CAHNRSIGNITEPATH . 'theme-parts/secondary-menu/class-secondary-menu-ignite.php';
10 | $secondary_menu = new Secondary_Menu_Ignite();
11 | $secondary_menu->the_menu( 'index' );
12 |
13 | ob_start();
14 |
15 | include locate_template( 'includes/content/single-page.php', false );
16 |
17 | $html = ob_get_clean();
18 |
19 | echo apply_filters( 'cahnrs_ignite_page_html', $html );
20 |
21 | ignite_get_part('footer','index');
--------------------------------------------------------------------------------
/single.php:
--------------------------------------------------------------------------------
1 | the_banner( 'single' );
8 |
9 | include_once CAHNRSIGNITEPATH . 'theme-parts/secondary-menu/class-secondary-menu-ignite.php';
10 | $secondary_menu = new Secondary_Menu_Ignite();
11 | $secondary_menu->the_menu( 'single' );
12 |
13 | ob_start();
14 |
15 | include locate_template( 'includes/content/single.php', false );
16 |
17 | $html = ob_get_clean();
18 |
19 | echo apply_filters( 'cahnrs_ignite_page_html', $html );
20 |
21 | ignite_get_part('footer','front-page');
--------------------------------------------------------------------------------
/lib/parts/in-page-search/search.php:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/lib/theme-templates/redirect.php:
--------------------------------------------------------------------------------
1 |
8 |
9 |
10 |
11 | | Washington State University
12 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/ignite-404.php:
--------------------------------------------------------------------------------
1 | the_banner( '404', array('type' => '404' ) );
8 |
9 | include_once CAHNRSIGNITEPATH . 'theme-parts/secondary-menu/class-secondary-menu-ignite.php';
10 | $secondary_menu = new Secondary_Menu_Ignite();
11 | $secondary_menu->the_menu( '404' );
12 |
13 | ob_start();
14 |
15 | include locate_template( 'includes/content/404.php', false );
16 |
17 | $html = ob_get_clean();
18 |
19 | echo apply_filters( 'cahnrs_ignite_page_html', $html );
20 |
21 | ignite_get_part('footer','404');
--------------------------------------------------------------------------------
/front-page.php:
--------------------------------------------------------------------------------
1 | the_banner( 'front-page' );
8 |
9 | include_once CAHNRSIGNITEPATH . 'theme-parts/secondary-menu/class-secondary-menu-ignite.php';
10 | $secondary_menu = new Secondary_Menu_Ignite();
11 | $secondary_menu->the_menu( 'front-page' );
12 |
13 | ob_start();
14 |
15 | include locate_template( 'includes/content/single-page.php', false );
16 |
17 | $html = ob_get_clean();
18 |
19 | echo apply_filters( 'cahnrs_ignite_page_html', $html );
20 |
21 | ignite_get_part('footer','front-page');
--------------------------------------------------------------------------------
/single-post.php:
--------------------------------------------------------------------------------
1 | the_banner( 'single-post' );
8 |
9 | include_once CAHNRSIGNITEPATH . 'theme-parts/secondary-menu/class-secondary-menu-ignite.php';
10 | $secondary_menu = new Secondary_Menu_Ignite();
11 | $secondary_menu->the_menu( 'single-post' );
12 |
13 | ob_start();
14 |
15 | include locate_template( 'includes/content/single-post.php', false );
16 |
17 | $html = ob_get_clean();
18 |
19 | echo apply_filters( 'cahnrs_ignite_page_html', $html );
20 |
21 | ignite_get_part('footer','single-post');
--------------------------------------------------------------------------------
/font-awesome/less/bordered-pulled.less:
--------------------------------------------------------------------------------
1 | // Bordered & Pulled
2 | // -------------------------
3 |
4 | .@{fa-css-prefix}-border {
5 | padding: .2em .25em .15em;
6 | border: solid .08em @fa-border-color;
7 | border-radius: .1em;
8 | }
9 |
10 | .@{fa-css-prefix}-pull-left { float: left; }
11 | .@{fa-css-prefix}-pull-right { float: right; }
12 |
13 | .@{fa-css-prefix} {
14 | &.@{fa-css-prefix}-pull-left { margin-right: .3em; }
15 | &.@{fa-css-prefix}-pull-right { margin-left: .3em; }
16 | }
17 |
18 | /* Deprecated as of 4.4.0 */
19 | .pull-right { float: right; }
20 | .pull-left { float: left; }
21 |
22 | .@{fa-css-prefix} {
23 | &.pull-left { margin-right: .3em; }
24 | &.pull-right { margin-left: .3em; }
25 | }
26 |
--------------------------------------------------------------------------------
/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | // Use IntelliSense to learn about possible attributes.
3 | // Hover to view descriptions of existing attributes.
4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5 | "version": "0.2.0",
6 | "configurations": [
7 | {
8 | "name": "Listen for XDebug",
9 | "type": "php",
10 | "request": "launch",
11 | "port": 9000
12 | },
13 | {
14 | "name": "Launch currently open script",
15 | "type": "php",
16 | "request": "launch",
17 | "program": "${file}",
18 | "cwd": "${fileDirname}",
19 | "port": 9000
20 | }
21 | ]
22 | }
--------------------------------------------------------------------------------
/font-awesome/scss/_bordered-pulled.scss:
--------------------------------------------------------------------------------
1 | // Bordered & Pulled
2 | // -------------------------
3 |
4 | .#{$fa-css-prefix}-border {
5 | padding: .2em .25em .15em;
6 | border: solid .08em $fa-border-color;
7 | border-radius: .1em;
8 | }
9 |
10 | .#{$fa-css-prefix}-pull-left { float: left; }
11 | .#{$fa-css-prefix}-pull-right { float: right; }
12 |
13 | .#{$fa-css-prefix} {
14 | &.#{$fa-css-prefix}-pull-left { margin-right: .3em; }
15 | &.#{$fa-css-prefix}-pull-right { margin-left: .3em; }
16 | }
17 |
18 | /* Deprecated as of 4.4.0 */
19 | .pull-right { float: right; }
20 | .pull-left { float: left; }
21 |
22 | .#{$fa-css-prefix} {
23 | &.pull-left { margin-right: .3em; }
24 | &.pull-right { margin-left: .3em; }
25 | }
26 |
--------------------------------------------------------------------------------
/font-awesome/less/rotated-flipped.less:
--------------------------------------------------------------------------------
1 | // Rotated & Flipped Icons
2 | // -------------------------
3 |
4 | .@{fa-css-prefix}-rotate-90 { .fa-icon-rotate(90deg, 1); }
5 | .@{fa-css-prefix}-rotate-180 { .fa-icon-rotate(180deg, 2); }
6 | .@{fa-css-prefix}-rotate-270 { .fa-icon-rotate(270deg, 3); }
7 |
8 | .@{fa-css-prefix}-flip-horizontal { .fa-icon-flip(-1, 1, 0); }
9 | .@{fa-css-prefix}-flip-vertical { .fa-icon-flip(1, -1, 2); }
10 |
11 | // Hook for IE8-9
12 | // -------------------------
13 |
14 | :root .@{fa-css-prefix}-rotate-90,
15 | :root .@{fa-css-prefix}-rotate-180,
16 | :root .@{fa-css-prefix}-rotate-270,
17 | :root .@{fa-css-prefix}-flip-horizontal,
18 | :root .@{fa-css-prefix}-flip-vertical {
19 | filter: none;
20 | }
21 |
--------------------------------------------------------------------------------
/lib/shortcodes/cahnrs-publications/displays/basic.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
Published In
4 |
5 |
Authors:
6 |
7 |
--------------------------------------------------------------------------------
/includes/headers/college/college-global-nav.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "wsuwp-spine-child-theme-skeleton",
3 | "version": "0.0.1",
4 | "repository": {
5 | "type": "git",
6 | "url": "https://github.com/washingtonstateuniversity/wsuwp-spine-child-theme-skeleton"
7 | },
8 | "devDependencies": {
9 | "autoprefixer": "^7.1.1",
10 | "grunt": "~1.0.1",
11 | "grunt-contrib-clean": "^1.0.0",
12 | "grunt-contrib-concat": "~1.0.1",
13 | "grunt-contrib-connect": "^1.0.2",
14 | "grunt-contrib-cssmin": "~2.2.0",
15 | "grunt-contrib-jshint": "^1.0.0",
16 | "grunt-contrib-watch": "^1.0.0",
17 | "grunt-jscs": "^3.0.1",
18 | "grunt-phpcs": "^0.4.0",
19 | "grunt-postcss": "^0.8.0",
20 | "grunt-stylelint": "^0.8.0",
21 | "stylelint": "^7.10.1"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/classes/class-menus-cahnrs-ignite.php:
--------------------------------------------------------------------------------
1 | ';
16 |
17 | switch( $header_type ){
18 |
19 | case 'cahnrs-college':
20 | include locate_template( 'includes/headers/college/college-header.php', false );
21 | break;
22 |
23 | } // end switch
24 |
25 | echo '';
26 |
27 | } else {
28 |
29 | $this->get_the_spine();
30 |
31 | } // end if
32 |
--------------------------------------------------------------------------------
/font-awesome/scss/_rotated-flipped.scss:
--------------------------------------------------------------------------------
1 | // Rotated & Flipped Icons
2 | // -------------------------
3 |
4 | .#{$fa-css-prefix}-rotate-90 { @include fa-icon-rotate(90deg, 1); }
5 | .#{$fa-css-prefix}-rotate-180 { @include fa-icon-rotate(180deg, 2); }
6 | .#{$fa-css-prefix}-rotate-270 { @include fa-icon-rotate(270deg, 3); }
7 |
8 | .#{$fa-css-prefix}-flip-horizontal { @include fa-icon-flip(-1, 1, 0); }
9 | .#{$fa-css-prefix}-flip-vertical { @include fa-icon-flip(1, -1, 2); }
10 |
11 | // Hook for IE8-9
12 | // -------------------------
13 |
14 | :root .#{$fa-css-prefix}-rotate-90,
15 | :root .#{$fa-css-prefix}-rotate-180,
16 | :root .#{$fa-css-prefix}-rotate-270,
17 | :root .#{$fa-css-prefix}-flip-horizontal,
18 | :root .#{$fa-css-prefix}-flip-vertical {
19 | filter: none;
20 | }
21 |
--------------------------------------------------------------------------------
/lib/shortcodes/cahnrs-search/includes/display-basic.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/includes/headers/college/college-header.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ID, false, 'j' );?>
6 | ID, false, 'M' );?>
7 |
8 |
ID );?> ID );?>
9 |
Event Details
10 |
11 |
12 |
--------------------------------------------------------------------------------
/classes/class-abstract-theme-part-ignite.php:
--------------------------------------------------------------------------------
1 | get_the_part( $context, $args );
11 |
12 | return apply_filters( 'cahnrs_ignite_part_html', $html, $context, $args );
13 |
14 | } // End get_part
15 |
16 |
17 | protected function get_settings( $ctmzr_fields, $args = array() ){
18 |
19 | $settings = array();
20 |
21 | foreach( $ctmzr_fields as $key => $default ){
22 |
23 | if ( array_key_exists( $key, $args ) ){
24 |
25 | $settings[ $key ] = $args['key'];
26 |
27 | } else {
28 |
29 | $value = get_theme_mod( $key, $default );
30 |
31 | $settings[ $key ] = $value;
32 |
33 | } // End if
34 |
35 | } // End foreach
36 |
37 | return $settings;
38 |
39 | } // End get_settings
40 |
41 | } // End Abstract_Theme_Part
--------------------------------------------------------------------------------
/includes/content/single-page.php:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/includes/content/single-post.php:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/lib/parts/page-headers/header-banner.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/post-types/news-release/includes/style.css:
--------------------------------------------------------------------------------
1 | #news-release-options h2 {
2 | text-transform: uppercase;
3 | margin: 0;
4 | padding: 0;
5 | }
6 | #news-release-options input[type=checkbox] {
7 | transform: scale(1.25);
8 | }
9 | #news-release-options .ignite-field.checkbox-field {
10 | padding-right: 18px;
11 | }
12 | #news-release-options .ignite-field.checkbox-field label {
13 | font-size: 14px;
14 | color: #555;
15 | display: inline-block;
16 | vertical-align: top;
17 | }
18 | #news-release-options .horz-inputs .ignite-field {
19 | float: left;
20 | }
21 | #news-release-options .horz-inputs .ignite-field.checkbox-field {
22 | padding-top: 8px;
23 | }
24 | #news-release-options .horz-inputs:after {
25 | content:'';
26 | clear: both;
27 | display: block;
28 | }
29 | #news-release-options .set-wrapper {
30 | display: inline-block;
31 | vertical-align: top;
32 | padding-right: 22px;
33 | box-sizing: border-box;
34 | margin-bottom: 20px;
35 | }
--------------------------------------------------------------------------------
/lib/displays/video-banner/video.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/displays/slides/basic/slide.php:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/includes/headers/college/college-banner.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/displays/banners/college-banner/college-banner.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/includes/content/single.php:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/lib/shortcodes/cahnrs-news/includes/displays/spotlight.php:
--------------------------------------------------------------------------------
1 | post_images ) ):?>
2 |
6 |
7 |
8 |
9 |
post_title; ?>
10 |
Published on post_date ) );?>
11 |
post_excerpt, $atts['excerpt_length'] ); ?>
12 |
Read More
13 |
14 |
15 |
get_link_html(); ?>get_link_html( true ); ?>
16 |
--------------------------------------------------------------------------------
/includes/forms/edit-post/basic.php:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/lib/pagebuilder-items/cahnrs-events/class-cahnrs-events-pagebuilder-item-cahnrs-ignite.php:
--------------------------------------------------------------------------------
1 | form_fields->text_field( $this->get_input_name('part_id') , $settings['part_id'] , 'Part ID:' );
25 |
26 |
27 | return array('Basic' => $html );
28 |
29 | } // end form
30 |
31 |
32 | protected function clean( $settings ){
33 |
34 | $clean = array();
35 |
36 | $clean['part_id'] = ( ! empty( $settings['part_id'] ) )? sanitize_text_field( $settings['part_id'] ) : '';
37 |
38 | return $clean;
39 | }
40 |
41 |
42 | } // end Theme_Part_Pagebuilder_Item_CAHNRS_Ignite
--------------------------------------------------------------------------------
/lib/post-types/articles/includes/style.css:
--------------------------------------------------------------------------------
1 | #news-release-options h2 {
2 | text-transform: uppercase;
3 | margin: 0;
4 | padding: 0;
5 | }
6 | #news-release-options input[type=checkbox] {
7 | transform: scale(1.25);
8 | }
9 | #news-release-options .ignite-field.checkbox-field {
10 | padding-right: 18px;
11 | }
12 | #news-release-options .ignite-field.checkbox-field label {
13 | font-size: 14px;
14 | color: #555;
15 | display: inline-block;
16 | vertical-align: top;
17 | }
18 | #news-release-options .horz-inputs .ignite-field {
19 | float: left;
20 | }
21 | #news-release-options .horz-inputs .ignite-field.checkbox-field {
22 | padding-top: 8px;
23 | }
24 | #news-release-options .horz-inputs:after {
25 | content:'';
26 | clear: both;
27 | display: block;
28 | }
29 | #news-release-options .set-wrapper {
30 | display: inline-block;
31 | vertical-align: top;
32 | padding-right: 22px;
33 | box-sizing: border-box;
34 | margin-bottom: 20px;
35 | }
36 |
37 | #news-release-options textarea {
38 | width: 100%;
39 | height: 100px;
40 | }
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | sudo: false
2 | language: php
3 |
4 | # Cache some data across builds for performance.
5 | cache:
6 | apt: true
7 | directories:
8 | - node_modules
9 | - vendor
10 | - $HOME/.composer/cache
11 |
12 | notifications:
13 | email:
14 | on_success: never
15 | on_failure: change
16 | slack:
17 | on_pull_requests: true
18 | on_success: change
19 | on_failure: always
20 | on_start: never
21 | on_cancel: always
22 | rooms:
23 | - wsu-ucomm:n2TLZRJd84rMOMbkKthSEMgS
24 |
25 | branches:
26 | only:
27 | - master
28 |
29 | matrix:
30 | include:
31 | - php: 7.1
32 | env: WP_TRAVISCI=grunt
33 |
34 | before_script:
35 | - export PATH="$HOME/.composer/vendor/bin:$PATH"
36 | - mysql --version
37 | - phpenv config-rm xdebug.ini
38 | - phpenv versions
39 | - php --version
40 | - composer install
41 | - nvm install stable
42 | - npm install -g grunt-cli
43 | - npm install
44 | - npm --version
45 | - node --version
46 |
47 | script:
48 | - grunt --version
49 | - grunt default
50 |
--------------------------------------------------------------------------------
/lib/displays/headers/banners/college.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/parts/page-headers/top-header-bar.php:
--------------------------------------------------------------------------------
1 |
20 |
--------------------------------------------------------------------------------
/theme-parts/pagination/displays/default.php:
--------------------------------------------------------------------------------
1 |
2 |
Showing page page;?> of pages;?>
3 |
6 |
9 |
10 |
...
11 |
12 |
13 |
16 |
--------------------------------------------------------------------------------
/classes/class-scripts-cahnrs-ignite.php:
--------------------------------------------------------------------------------
1 | 'default',
7 | 'menu' => '',
8 | );
9 |
10 | protected $settings = array(
11 | 'menu' => '_cahnrswp_secondary_menu'
12 | );
13 |
14 | public function the_menu( $context = 'single', $args = array() ){
15 |
16 | $args = $this->get_customizer_args( $args );
17 |
18 | if ( ! empty( $args['menu'] ) ){
19 |
20 | $html = '';
21 |
22 | switch( $args['type'] ){
23 |
24 | default:
25 | $html = $this->get_default_menu( $context, $args );
26 | break;
27 |
28 | } // End switch
29 |
30 | echo apply_filters( 'cahnrs_ignite_page_html', $html );
31 |
32 | } // End if
33 |
34 | } // End get_footer
35 |
36 |
37 | protected function get_default_menu( $context, $args ){
38 |
39 | ob_start();
40 |
41 | include locate_template( 'theme-parts/secondary-menu/includes/default-secondary-menu.php', false );
42 |
43 | return ob_get_clean();
44 |
45 | } // End get_college_global_footer
46 |
47 | } // End Secondary_Menu_Ignite
--------------------------------------------------------------------------------
/lib/shortcodes/cahnrs-news/includes/displays/promo-list-news-item.php:
--------------------------------------------------------------------------------
1 | post_images ) ):?>
2 |
3 |
4 |
5 |
6 |
7 |
post_title; ?>
8 |
Published on post_date ) );?>
9 |
post_excerpt, $atts['excerpt_length'] ); ?>
10 |
Read More
11 |
12 | post_content ) || ! empty( $has_redirect ) ):?>
get_link_html(); ?>post_title; ?>get_link_html( true ); ?>
13 |
--------------------------------------------------------------------------------
/lib/post-types/publications/includes/editor.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/theme-parts/pagination/displays/default-shortcode.php:
--------------------------------------------------------------------------------
1 |
2 |
Showing page page;?> of pages;?>
3 |
6 |
9 |
10 |
...
11 |
12 |
13 |
16 |
--------------------------------------------------------------------------------
/theme-parts/theme-header/class-theme-header-ignite.php:
--------------------------------------------------------------------------------
1 | get_default_header( $context, $args );
11 | break;
12 |
13 | } // End switch
14 |
15 | echo apply_filters( 'cahnrs_ignite_page_html', $html );
16 |
17 | } // End get_footer
18 |
19 |
20 | public function get_theme_header( $context = 'single', $args = array() ){
21 |
22 | switch( $context ){
23 |
24 | default:
25 | $html .= $this->get_default_header( $context, $args );
26 | break;
27 |
28 | } // End switch
29 |
30 | return apply_filters( 'cahnrs_ignite_page_html', $html );
31 |
32 | } // End get_footer
33 |
34 |
35 | protected function get_default_header( $context, $args ){
36 |
37 | ob_start();
38 |
39 | include locate_template( 'includes/headers/header.php', false );
40 |
41 | include locate_template( 'includes/main/main-start.php', false );
42 |
43 | return ob_get_clean();
44 |
45 | } // End get_default_header
46 |
47 | } // End Theme_Header
48 |
--------------------------------------------------------------------------------
/lib/post-types/news-release/includes/slide-edit-form.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/post-types/articles/includes/slide-edit-form.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/post-types/videos/includes/editor.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
Video Options
4 |
5 |
Video URL
6 |
7 |
Video URL can be the full YouTube URL or the ID for the video. Example: https://www.youtube.com/watch?v=4rb8aOzy9t4 or simply the ID 4rb8aOzy9t4 .
8 |
9 |
10 |
Video Image
11 |
12 |
If the video image is left empty it will automatically be set to the default YouTube thumbnail. The "Featured Image" will override this setting.
13 |
14 |
15 |
Video Summary
16 |
17 |
Provide a plain text description of the video ( 1-4 sentances ). The summary will render on the video page above the "Video Page Content".
18 |
19 |
20 |
--------------------------------------------------------------------------------
/lib/post-formats/class-post-formats-ignite.php:
--------------------------------------------------------------------------------
1 | get_scholarship_donor_profile( $content, $post );
24 |
25 | } // End if
26 |
27 | } // End if
28 |
29 | return $content;
30 |
31 | } // End get_filtered_content
32 |
33 |
34 | protected function get_scholarship_donor_profile( $content, $post ){
35 |
36 | $image = ignite_get_post_image( get_the_ID(), 'medium' );
37 |
38 | ob_start();
39 |
40 | include dirname(__FILE__) . '/scholarship-donor-profile/profile.php';
41 |
42 | $content = ob_get_clean();
43 |
44 | return $content;
45 |
46 | } // End get_donor_profile_content
47 |
48 |
49 | } // End Post_Formats_Ignite
50 |
51 | $post_formats_ignite = new Post_Formats_Ignite();
--------------------------------------------------------------------------------
/includes/pagination/displays/basic.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/shortcodes/class-shortcode-cahnrs-ignite.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
BA & BS Degrees
4 |
5 |
Select Degree Type
6 |
7 | $label ):?>
8 | >
9 |
10 |
11 |
Selecting a Degree Type and Saving Will Display Type Specific Form Fields.
12 |
13 |
Intro Text
14 |
15 | post_content, 'content' );?>
16 |
17 |
What You'll Learn
18 |
19 | Override Title
20 |
21 |
22 |
23 |
24 |
25 |
Careers
26 |
27 | Override Title
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/lib/post-types/news-release/class-news-release-post-type-cahnrs-ignite.php:
--------------------------------------------------------------------------------
1 | is_main_query() && !is_admin() ) {
17 |
18 | $query->set( 'posts_per_page', -1 );
19 |
20 | }
21 |
22 | }
23 |
24 | public function templates( $template ) {
25 |
26 | if ( 'news-release' == get_post_type() ) {
27 |
28 | if ( is_search() ) {
29 |
30 | $template = locate_template( 'lib/post-types/news-release/templates/search.php', false );
31 |
32 | } else {
33 |
34 | $template = locate_template( 'lib/post-types/news-release/templates/single-news-release.php', false );
35 |
36 | } // End if
37 |
38 | }
39 |
40 | if ( is_post_type_archive( 'news-release' ) ) $template = locate_template( 'lib/post-types/news-release/templates/archive-news-release.php', false );
41 |
42 | if ( is_post_type_archive( 'news-release' ) && is_date() ) $template = locate_template( 'lib/post-types/news-release/templates/date-archive-news-release.php', false );
43 |
44 | return $template;
45 |
46 | }
47 |
48 | }
49 |
50 | $news_release_post_type = new News_Release_Post_Type_CAHNRS_Ignite();
--------------------------------------------------------------------------------
/lib/customizer/controls/multi-select/class-customizer-multi-select-control-ignite.php:
--------------------------------------------------------------------------------
1 | choices ) ) return;
10 |
11 | $cvalue = sanitize_text_field( $this->value() );
12 |
13 | $values = explode(',', $cvalue );
14 |
15 | $html .= '';
16 |
17 | $html .= '
';
34 |
35 | $html .= '
link . ' value="' . $cvalue . '">';
36 |
37 | $html .= '
';
38 |
39 | ob_start();
40 |
41 | include 'script.js';
42 |
43 | $html .= '';
44 |
45 | echo $html . test;
46 |
47 | } // End render_content
48 |
49 |
50 | } // End Customizer_Multi_Select_Control_Ignite
--------------------------------------------------------------------------------
/lib/taxonomies/slideshow-category/class-slideshow-category-ignite.php:
--------------------------------------------------------------------------------
1 | 'Slideshow Categories',
19 | 'singular_name' => 'Slideshow Category',
20 | 'search_items' => 'Search Categories',
21 | 'all_items' => 'All Categories',
22 | 'parent_item' => 'Parent Slideshow Category',
23 | 'parent_item_colon' => 'Parent Slideshow Category:',
24 | 'edit_item' => 'Edit Slideshow Category',
25 | 'update_item' => 'Update Slideshow Category',
26 | 'add_new_item' => 'Add New Slideshow Category',
27 | 'new_item_name' => 'New Slideshow Category',
28 | 'menu_name' => 'Slideshow Category',
29 | );
30 |
31 | $args = array(
32 | 'hierarchical' => true,
33 | 'labels' => $labels,
34 | 'show_ui' => true,
35 | 'show_admin_column' => true,
36 | 'query_var' => true,
37 | 'rewrite' => array( 'slug' => 'slideshows' ),
38 | );
39 |
40 | register_taxonomy( 'slideshow_category', array( 'slides' ), $args );
41 |
42 |
43 | } // End register taxonomy
44 |
45 |
46 | } // End Slideshow_Category_Ignite
47 |
48 | $slideshow_category_ignite = new Slideshow_Category_Ignite();
--------------------------------------------------------------------------------
/lib/displays/feature-banners/play-video-banner/player-js.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/theme-parts/footers/class-footer-ignite.php:
--------------------------------------------------------------------------------
1 | '',
7 | );
8 |
9 | protected $settings = array(
10 | 'type' => '_cahnrswp_footer_type'
11 | );
12 |
13 | public function the_footer( $context = 'single', $args = array() ){
14 |
15 | $html = '';
16 |
17 | if ( is_active_sidebar( 'footer_before' ) ) {
18 |
19 | ob_start();
20 |
21 | dynamic_sidebar( 'footer_before' );
22 |
23 | $html .= '';
24 |
25 | } // End if
26 |
27 | $args = $this->get_customizer_args( $args );
28 |
29 | switch( $args['type'] ){
30 |
31 | case 'college-global':
32 | $html .= $this->get_college_global_footer( $context, $args );
33 | break;
34 |
35 | } // End switch
36 |
37 | if ( is_active_sidebar( 'footer_after' ) ) {
38 |
39 | ob_start();
40 |
41 | dynamic_sidebar( 'footer_after' );
42 |
43 | $html .= '';
44 |
45 | } // End if
46 |
47 | echo apply_filters( 'cahnrs_ignite_page_html', $html );
48 |
49 | } // End get_footer
50 |
51 |
52 | protected function get_college_global_footer( $context, $args ){
53 |
54 | ob_start();
55 |
56 | include locate_template( 'includes/footers/college-footer/footer.php', false );
57 |
58 | return ob_get_clean();
59 |
60 | } // End get_college_global_footer
61 |
62 | } // End Footer_Ignite
--------------------------------------------------------------------------------
/lib/pagebuilder-items/theme-part/class-theme-part-pagebuilder-item-cahnrs-ignite.php:
--------------------------------------------------------------------------------
1 | -1,
25 | 'orderby' => 'date',
26 | 'order' => 'DESC',
27 | 'post_type' => 'theme_part',
28 | 'post_status' => 'publish',
29 | );
30 |
31 | $post_options = array();
32 |
33 | $posts_array = get_posts( $args );
34 |
35 | foreach( $posts_array as $tp_post ){
36 |
37 | $post_options[ $tp_post->ID ] = $tp_post->post_title;
38 |
39 | } // End foreach
40 |
41 | $html = $this->form_fields->select_field( $this->get_input_name('part_id'), $settings['part_id'], $post_options, 'Theme Part' );
42 |
43 |
44 | //$html = $this->form_fields->text_field( $this->get_input_name('part_id') , $settings['part_id'] , 'Part ID:' );
45 |
46 |
47 | return array('Basic' => $html );
48 |
49 | } // end form
50 |
51 |
52 | protected function clean( $settings ){
53 |
54 | $clean = array();
55 |
56 | $clean['part_id'] = ( ! empty( $settings['part_id'] ) )? sanitize_text_field( $settings['part_id'] ) : '';
57 |
58 | return $clean;
59 | }
60 |
61 |
62 | } // end Theme_Part_Pagebuilder_Item_CAHNRS_Ignite
--------------------------------------------------------------------------------
/lib/post-types/news-release/includes/data-edit-form.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/shortcodes/cahnrs-news/includes/displays/promo-list-style.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/shortcodes/theme-part/class-cahnrs-theme-part-shortcode-ignite.php:
--------------------------------------------------------------------------------
1 | '',
35 | );
36 |
37 | $atts = shortcode_atts( $default_atts, $atts, $tag );
38 |
39 | if ( $atts['part_id'] ){
40 |
41 | $post = get_post( $atts['part_id'] );
42 |
43 | //var_dump( $post );
44 |
45 | if ( $post ){
46 |
47 | $content = apply_filters( 'widget_content_ignite', $post->post_content );
48 |
49 | $html .= do_shortcode( $content );
50 |
51 | } // end if
52 |
53 | } // End if
54 |
55 | return $html;
56 |
57 | } // End render_shortcode
58 |
59 |
60 | } // end Search_Shortcode_Ignite
61 |
62 | $cahnrs_theme_part_shortcode_ignite = new CAHNRS_Theme_part_Shortcode_Ignite();
--------------------------------------------------------------------------------
/lib/post-types/articles/includes/data-edit-form.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/classes/class-theme-part-ignite.php:
--------------------------------------------------------------------------------
1 | $value ){
17 |
18 | if ( isset( $args[ $key ] ) ){
19 |
20 | $defaults[ $key ] = $args[ $key ];
21 |
22 | } // End if
23 |
24 | } // End foreach
25 |
26 | return $defaults;
27 |
28 | } // End parse_args
29 |
30 |
31 | protected function get_customizer_args( $args ){
32 |
33 | $new_args = array();
34 |
35 | foreach( $this->default_args as $key => $value ){
36 |
37 | if ( array_key_exists( $key, $args ) ){
38 |
39 | $new_args[ $key ] = $args[ $key ];
40 |
41 | } else if ( array_key_exists( $key, $this->settings ) ){
42 |
43 | $new_args[ $key ] = get_theme_mod( $this->settings[ $key ], $value );
44 |
45 | } else {
46 |
47 | $new_args[ $key ] = $value;
48 |
49 | }// End if
50 |
51 | } // End foreach
52 |
53 | return $new_args;
54 |
55 | } // End settings
56 |
57 |
58 | protected function get_post_image( $post_id, $size = 'full', $args = array(), $context = 'single' ) {
59 |
60 | $image = '';
61 |
62 | if ( $post_id && has_post_thumbnail( $post_id ) ){
63 |
64 | $img_id = get_post_thumbnail_id( $post_id );
65 |
66 | $img_url_array = wp_get_attachment_image_src( $img_id, $size, true );
67 |
68 | $image = $img_url_array[0];
69 |
70 | } // End if
71 |
72 | return $image;
73 |
74 | } // End get_post_image
75 |
76 | } // End Theme_Part_Ignite
--------------------------------------------------------------------------------
/font-awesome/less/mixins.less:
--------------------------------------------------------------------------------
1 | // Mixins
2 | // --------------------------
3 |
4 | .fa-icon() {
5 | display: inline-block;
6 | font: normal normal normal @fa-font-size-base/@fa-line-height-base FontAwesome; // shortening font declaration
7 | font-size: inherit; // can't have font-size inherit on line above, so need to override
8 | text-rendering: auto; // optimizelegibility throws things off #1094
9 | -webkit-font-smoothing: antialiased;
10 | -moz-osx-font-smoothing: grayscale;
11 |
12 | }
13 |
14 | .fa-icon-rotate(@degrees, @rotation) {
15 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=@{rotation})";
16 | -webkit-transform: rotate(@degrees);
17 | -ms-transform: rotate(@degrees);
18 | transform: rotate(@degrees);
19 | }
20 |
21 | .fa-icon-flip(@horiz, @vert, @rotation) {
22 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=@{rotation}, mirror=1)";
23 | -webkit-transform: scale(@horiz, @vert);
24 | -ms-transform: scale(@horiz, @vert);
25 | transform: scale(@horiz, @vert);
26 | }
27 |
28 |
29 | // Only display content to screen readers. A la Bootstrap 4.
30 | //
31 | // See: http://a11yproject.com/posts/how-to-hide-content/
32 |
33 | .sr-only() {
34 | position: absolute;
35 | width: 1px;
36 | height: 1px;
37 | padding: 0;
38 | margin: -1px;
39 | overflow: hidden;
40 | clip: rect(0,0,0,0);
41 | border: 0;
42 | }
43 |
44 | // Use in conjunction with .sr-only to only display content when it's focused.
45 | //
46 | // Useful for "Skip to main content" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1
47 | //
48 | // Credit: HTML5 Boilerplate
49 |
50 | .sr-only-focusable() {
51 | &:active,
52 | &:focus {
53 | position: static;
54 | width: auto;
55 | height: auto;
56 | margin: 0;
57 | overflow: visible;
58 | clip: auto;
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/lib/post-types/articles/includes/locations-edit-form.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/factories/class-slide-factory-ignite.php:
--------------------------------------------------------------------------------
1 | 'slides',
7 | 'post_status' => 'publish',
8 | 'per_page' => 4,
9 | );
10 |
11 |
12 | public function get_slides( $args ){
13 |
14 | $default_args = array(
15 | 'query_type' => 'recent',
16 | );
17 |
18 | $args = array_merge( $default_args, $args );
19 |
20 | $slides = array();
21 |
22 | switch( $args['query_type'] ){
23 |
24 | case 'recent':
25 | default:
26 | $query_args = $this->get_basic_query_args( $args );
27 | $slides = $this->get_slides_from_query( $query_args );
28 | break;
29 | } // End switch
30 |
31 |
32 | return $slides;
33 |
34 | } // End get_slides
35 |
36 |
37 | public function get_slide(){
38 |
39 | ignite_load_class( 'lib/objects/slides/class-slide-object-ignite.php', true );
40 |
41 | $slide = new Slide_Object_Ignite();
42 |
43 | return $slide;
44 |
45 | } // End get_slide
46 |
47 |
48 | protected function get_slides_from_query( $query_args ){
49 |
50 | $slides = array();
51 |
52 | $the_query = new WP_Query( $query_args );
53 |
54 | if ( $the_query->have_posts() ) {
55 |
56 | $i = 0;
57 |
58 | while ( $the_query->have_posts() ) {
59 |
60 | $the_query->the_post();
61 |
62 | $slide = $this->get_slide();
63 |
64 | $slide->set_from_loop( $i );
65 |
66 | $slides[] = $slide;
67 |
68 | $i++;
69 |
70 | } // End while
71 |
72 | wp_reset_postdata();
73 |
74 | } // End if
75 |
76 | return $slides;
77 |
78 | } // End get_slides_from_query
79 |
80 |
81 | protected function get_basic_query_args( $args ){
82 |
83 | return array_merge( $this->query_args, $args );
84 |
85 | } // End get_basic_query_args
86 |
87 | } // End Slide_Factory_Ignite
--------------------------------------------------------------------------------
/lib/post-types/news-release/includes/locations-edit-form.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/font-awesome/scss/_mixins.scss:
--------------------------------------------------------------------------------
1 | // Mixins
2 | // --------------------------
3 |
4 | @mixin fa-icon() {
5 | display: inline-block;
6 | font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // shortening font declaration
7 | font-size: inherit; // can't have font-size inherit on line above, so need to override
8 | text-rendering: auto; // optimizelegibility throws things off #1094
9 | -webkit-font-smoothing: antialiased;
10 | -moz-osx-font-smoothing: grayscale;
11 |
12 | }
13 |
14 | @mixin fa-icon-rotate($degrees, $rotation) {
15 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation})";
16 | -webkit-transform: rotate($degrees);
17 | -ms-transform: rotate($degrees);
18 | transform: rotate($degrees);
19 | }
20 |
21 | @mixin fa-icon-flip($horiz, $vert, $rotation) {
22 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}, mirror=1)";
23 | -webkit-transform: scale($horiz, $vert);
24 | -ms-transform: scale($horiz, $vert);
25 | transform: scale($horiz, $vert);
26 | }
27 |
28 |
29 | // Only display content to screen readers. A la Bootstrap 4.
30 | //
31 | // See: http://a11yproject.com/posts/how-to-hide-content/
32 |
33 | @mixin sr-only {
34 | position: absolute;
35 | width: 1px;
36 | height: 1px;
37 | padding: 0;
38 | margin: -1px;
39 | overflow: hidden;
40 | clip: rect(0,0,0,0);
41 | border: 0;
42 | }
43 |
44 | // Use in conjunction with .sr-only to only display content when it's focused.
45 | //
46 | // Useful for "Skip to main content" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1
47 | //
48 | // Credit: HTML5 Boilerplate
49 |
50 | @mixin sr-only-focusable {
51 | &:active,
52 | &:focus {
53 | position: static;
54 | width: auto;
55 | height: auto;
56 | margin: 0;
57 | overflow: visible;
58 | clip: auto;
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/lib/shortcodes/cahnrs-events/class-cahnrs-events-shortcode-ignite.php:
--------------------------------------------------------------------------------
1 | 'basic',
26 | 'per_page' => 3,
27 | 'show_venue' => 1,
28 | );
29 |
30 | $atts = shortcode_atts( $default_atts, $atts, $tag );
31 |
32 | if ( ! empty( $atts['per_page'] ) ) $atts['posts_per_page'] = $atts['per_page'];
33 |
34 | $events = $this->get_events( $atts, $tag );
35 |
36 | switch( $atts['display'] ){
37 |
38 | case 'basic':
39 | default:
40 | $html .= $this->get_display_basic( $events, $atts );
41 | break;
42 |
43 | } // End switch
44 |
45 | return $html;
46 |
47 | } // End render_shortcode
48 |
49 |
50 | protected function get_events( $atts, $tag ){
51 |
52 | $args = array(
53 | 'start_date' => date( 'Y-m-d H:i:s' ),
54 | 'eventDisplay' => 'custom',
55 | 'posts_per_page' => 3,
56 | );
57 |
58 | $args = array_merge( $args, $atts );
59 |
60 | $events = tribe_get_events( $args );
61 |
62 | foreach( $events as $key => $event ){
63 |
64 | $events[ $key ]->start_date = strtotime( tribe_get_start_date( $event->ID ) );
65 |
66 | } // End foreach
67 |
68 | return $events;
69 |
70 | } // End get_events
71 |
72 |
73 | protected function get_display_basic( $events, $atts ){
74 |
75 | $html = '';
76 |
77 | ob_start();
78 |
79 | include locate_template( 'lib/shortcodes/cahnrs-events/displays/basic.php', false );
80 |
81 | $html .= ob_get_clean();
82 |
83 | return $html;
84 |
85 | } // End get_display_basic
86 |
87 |
88 | } // end CAHNRS_Events_Shortcode_Ignite
89 |
90 | $cahnrs_events_shortcode_ignite = new CAHNRS_Events_Shortcode_Ignite();
--------------------------------------------------------------------------------
/lib/shortcodes/cwpaccordions/class-cwpaccordion-shortcode-ignite.php:
--------------------------------------------------------------------------------
1 | 'basic',
28 | 'title' => '',
29 | 'url' => '',
30 | );
31 |
32 | $atts = shortcode_atts( $default_atts, $atts, $tag );
33 |
34 | $title = $atts['title'];
35 |
36 | if ( $atts['url'] ){
37 |
38 | $rest_post = $this->get_rest_request( $atts['url'] );
39 |
40 | if ( empty( $title ) ) {
41 |
42 | $title = $rest_post['title'];
43 |
44 | } // End if
45 |
46 | $content = $rest_post['content'];
47 |
48 | } // End if
49 |
50 | $html .= $this->get_display_accordion( $title, $content, $atts );
51 |
52 |
53 | return $html;
54 |
55 | } // End render_shortcode
56 |
57 |
58 | protected function get_display_accordion( $title, $content, $atts ){
59 |
60 | ob_start();
61 |
62 | include ignite_get_theme_path( 'lib/post-formats/basic-accordion/accordion.php' );
63 |
64 | $html = ob_get_clean();
65 |
66 | return $html;
67 |
68 | } // End get_display_full
69 |
70 |
71 | protected function get_rest_request( $request_url ){
72 |
73 | $rest_post = array();
74 |
75 | $response = wp_remote_get( $request_url . '?get-post-json=true' );
76 |
77 | $content = wp_remote_retrieve_body( $response );
78 |
79 | $rest_post_array = json_decode( $content, true );
80 |
81 | if ( is_array( $rest_post_array ) ){
82 |
83 | $rest_post = array(
84 | 'title' => $rest_post_array['title']['rendered'],
85 | 'content' => $rest_post_array['content']['rendered'],
86 | 'excerpt' => $rest_post_array['excerpt']['rendered'],
87 | );
88 |
89 | } // End if
90 |
91 | return $rest_post;
92 |
93 | } // End get_rest_request
94 |
95 |
96 | } // end Search_Shortcode_Ignite
97 |
98 | $cahnrs_cwpaccordion_shortcode_ignite = new CAHNRS_Cwpaccordion_Shortcode_Ignite();
--------------------------------------------------------------------------------
/lib/post-types/indexed-content/class-indexed-content-post-type-ignite.php:
--------------------------------------------------------------------------------
1 | check_enabled( 'indexed_content' ) ){
17 |
18 | $labels = array(
19 | 'name' => 'Indexed Content',
20 | 'singular_name' => 'Indexed Content',
21 | 'menu_name' => 'Indexed Content',
22 | 'name_admin_bar' => 'Indexed Content',
23 | 'add_new' => 'Add Indexed Content',
24 | 'add_new_item' => 'Add Indexed Content',
25 | 'new_item' => 'New Indexed Content',
26 | 'edit_item' => 'Edit Indexed Content',
27 | 'view_item' => 'View Indexed Content',
28 | 'all_items' => 'All Indexed Content',
29 | 'search_items' => 'Search Indexed Content',
30 | 'parent_item_colon' => 'Parent Indexed Content:',
31 | 'not_found' => 'No Indexed Content found.',
32 | 'not_found_in_trash' => 'No Indexed Content found in Trash.',
33 | );
34 |
35 | $args = array(
36 | 'labels' => $labels,
37 | 'description' => 'Indexed Content for Theme use.',
38 | 'public' => true,
39 | 'show_in_menu' => true,
40 | 'rewrite' => array( 'slug' => 'content' ),
41 | 'capability_type' => 'post',
42 | 'show_in_rest' => true,
43 | 'has_archive' => true,
44 | 'hierarchical' => false,
45 | 'menu_position' => null,
46 | 'supports' => array( 'title','editor','thumbnail','excerpt','post-formats' )
47 | );
48 |
49 | register_post_type( 'indexed_content', $args );
50 |
51 | } // End if
52 |
53 |
54 | } // End register_post_type
55 |
56 |
57 | public function register_taxonomy(){
58 |
59 | register_taxonomy(
60 | 'content_category',
61 | 'indexed_content',
62 | array(
63 | 'label' => 'Content Categories',
64 | 'rewrite' => array( 'slug' => 'content-category' ),
65 | 'hierarchical' => true,
66 | )
67 | );
68 |
69 | } // End register_taxonomy
70 |
71 |
72 | } // Indexed_Content_Post_Type_Ignit
73 |
74 | $indexed_content_post_type_ignite = new Indexed_Content_Post_Type_Ignite();
--------------------------------------------------------------------------------
/lib/objects/slides/class-slide-object-ignite.php:
--------------------------------------------------------------------------------
1 | title = get_the_title();
25 |
26 | $this->post_id = get_the_ID();
27 |
28 | $this->excerpt = get_the_excerpt();
29 |
30 | $this->link = get_post_permalink();
31 |
32 | $this->images = ignite_get_post_image_array( get_the_ID() );
33 |
34 | $this->redirect = get_post_meta( $this->post_id, '_redirect_url', true );
35 |
36 | $this->index = $index;
37 |
38 | } // End set_from_loop
39 |
40 |
41 | public function set_show_caption( $value ){
42 |
43 | $this->show_caption = $value;
44 |
45 | } // end set_show_caption
46 |
47 |
48 | public function get_excerpt(){
49 |
50 | return $this->excerpt;
51 |
52 | } // End get_excerpt
53 |
54 |
55 | public function get_image_src( $size ){
56 |
57 | $image_src = '';
58 |
59 | if ( ! empty( $this->images ) && ! empty( $this->images[$size] ) ){
60 |
61 | $image_src = $this->images[ $size ]['src'];
62 |
63 | } // End if
64 |
65 | return $image_src;
66 |
67 | } // End get_image
68 |
69 |
70 | public function get_image_alt_text(){
71 |
72 | $alt = '';
73 |
74 |
75 | if ( ! empty( $this->images ) && ! empty( $this->images['thumbnail'] ) ){
76 |
77 | $alt = $this->images['thumbnail']['alt'];
78 |
79 | } // End if
80 |
81 | return $alt;
82 |
83 | } // End get_alt_text()
84 |
85 |
86 | public function get_index(){
87 |
88 | return $this->index;
89 |
90 | } // End get_index
91 |
92 |
93 | public function get_link( $include_post_link = false ){
94 |
95 | $link = '';
96 |
97 | if ( ! empty( $this->redirect ) ){
98 |
99 | $link = $this->redirect;
100 |
101 | } else if( $include_post_link ){
102 |
103 | $link = $this->link;
104 |
105 | } // End if
106 |
107 | return $link;
108 |
109 | } // End get_link
110 |
111 | public function get_title(){
112 |
113 | return $this->title;
114 |
115 | } // End get_title
116 |
117 |
118 | public function show_caption(){
119 |
120 | return $this->show_caption;
121 |
122 | } // End show_caption
123 |
124 | } // End Slide_Object_Ignite
--------------------------------------------------------------------------------
/css/admin.css:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------
2 | Hooks
3 | **
4 | Post Editor
5 | **
6 | Media Queries
7 | ---------------------------------------------*/
8 |
9 | /* Edit Form
10 | --------------------------------------------------------------- */
11 | .ignite-edit-form {
12 | margin: 24px 0;
13 | }
14 | .ignite-edit-form .ignite-field {
15 | display: inline-block;
16 | padding: 8px 10px;
17 | box-sizing: border-box;
18 | }
19 |
20 | .ignite-edit-form .ignite-field select {
21 | display: block;
22 | width: 100%;
23 | }
24 |
25 | .ignite-edit-form .ignite-field label {
26 | font-weight: bold;
27 | display: block;
28 | }
29 |
30 | .ignite-edit-form .post-editor-section-ignite {
31 | background: #f5f5f5;
32 | border: 1px solid #ddd;
33 | padding: 5px;
34 | box-sizing: border-box;
35 | }
36 | /* Post Editor
37 | --------------------------------------------------------------- */
38 | .ignite-post-editor .ignite-field-set {
39 | padding: 18px 0;
40 | }
41 | #poststuff .ignite-post-editor .ignite-field-set h2 {
42 | font-size: 18px;
43 | padding: 8px 0;
44 | border-bottom: 1px solid #fff;
45 | position: relative;
46 | margin: 8px 0 18px 0;
47 | }
48 | #poststuff .ignite-post-editor .ignite-field-set h2:after {
49 | content: '';
50 | display: block;
51 | position: absolute;
52 | background-color: #ccc;
53 | height: 1px;
54 | left: 0;
55 | right: 0;
56 | bottom:0;
57 | }
58 |
59 | .ignite-post-editor .ignite-field-set .ignite-field-set-description {
60 | margin-bottom: 8px;
61 | }
62 | .ignite-post-editor .ignite-field {
63 | width: 48%;
64 | display: inline-block;
65 | vertical-align: top;
66 | padding: 9px 22px 9px 0;
67 | box-sizing: border-box;
68 | }
69 | .ignite-post-editor .ignite-field label {
70 | display: block;
71 | font-size: 16px;
72 | padding-bottom: 6px;
73 | }
74 | .ignite-post-editor .ignite-field input[type="text"]{
75 | width: 100%;
76 | height: 40px;
77 | text-indent: 8px;
78 | font-size: 18px;
79 | }
80 | .ignite-post-editor .ignite-field.checkbox-field.checkbox-list {
81 | padding-top: 4px;
82 | padding-bottom: 4px;
83 | }
84 | .ignite-post-editor .ignite-field.checkbox-field label {
85 | display: inline-block;
86 | font-size: 14px;
87 | }
88 | .ignite-post-editor .ignite-field.ignite-field-full {
89 | width: auto;
90 | display: block;
91 | }
92 | .ignite-post-editor .ignite-field.ignite-field-33 {
93 | width: 32%;
94 | }
95 | .ignite-post-editor .ignite-field.ignite-field-25 {
96 | width: 24%;
97 | }
98 | .ignite-field input[type=checkbox] {
99 | transform: scale(1.25);
100 | }
101 | .ignite-field textarea {
102 | width: 100%;
103 | }
--------------------------------------------------------------------------------
/lib/post-types/class-post-type-ignite.php:
--------------------------------------------------------------------------------
1 | post_type}_redirect_url", true );
24 |
25 | if ( ! empty( $redirect_url ) ){
26 |
27 | wp_redirect( $redirect_url );
28 |
29 | exit;
30 |
31 | } // End if
32 |
33 | } // End if
34 |
35 | return $template;
36 |
37 | } // End check_redirect
38 |
39 |
40 | public function check_can_save( $post_id ){
41 |
42 | // If this is an autosave, our form has not been submitted, so we don't want to do anything.
43 | if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
44 |
45 | return false;
46 |
47 | } // end if
48 |
49 | // If this is an autosave, our form has not been submitted, so we don't want to do anything.
50 | if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
51 |
52 | return false;
53 |
54 | } // end if
55 |
56 | // Check the user's permissions.
57 | if ( isset( $_POST['post_type'] ) && 'page' == $_POST['post_type'] ) {
58 |
59 | if ( ! current_user_can( 'edit_page', $post_id ) ) {
60 |
61 | return false;
62 |
63 | } // end if
64 |
65 | } else {
66 |
67 | if ( ! current_user_can( 'edit_post', $post_id ) ) {
68 |
69 | return false;
70 |
71 | } // end if
72 |
73 | } // end if
74 |
75 | //if ( ! isset( $_POST['cahnrs_pagebuilder_key'] ) || ! wp_verify_nonce( $_POST['cahnrs_pagebuilder_key'], 'save_cahnrs_pagebuilder_' . $post_id ) ) {
76 |
77 | // return false;
78 |
79 | //}
80 |
81 | return true;
82 |
83 | }
84 |
85 | protected function get_clean_fields( $fields ){
86 |
87 | $clean = array();
88 |
89 | foreach( $fields as $key => $type ){
90 |
91 | if ( isset( $_POST[ $key ] ) ){
92 |
93 | $value = $_POST[ $key ];
94 |
95 | switch( $type ){
96 | case 'text':
97 | $clean[ $key ] = sanitize_text_field( $value );
98 | break;
99 |
100 | } // End swtich
101 |
102 | } // End if
103 |
104 | } // End foreach
105 |
106 | return $clean;
107 |
108 | } // End clean_fields
109 |
110 |
111 | } // End Post_Type_Ignite
--------------------------------------------------------------------------------
/lib/post-types/degrees/class-degree-post-type-ignite.php:
--------------------------------------------------------------------------------
1 | 'text',
7 | );
8 |
9 | public function __construct(){
10 |
11 | add_action( 'init', array( $this, 'register_post_type' ) );
12 |
13 | add_action( 'edit_form_after_title', array( $this, 'add_edit_form' ) );
14 |
15 | } // End __construct
16 |
17 |
18 | public function register_post_type(){
19 |
20 | if ( ignite_check_active_post_type( 'degree' ) ){
21 |
22 | $labels = array(
23 | 'name' => 'Degrees',
24 | 'singular_name' => 'Degree',
25 | 'menu_name' => 'Degrees',
26 | 'name_admin_bar' => 'Degree',
27 | 'add_new' => 'Add New',
28 | 'add_new_item' => 'Add New Degree',
29 | 'new_item' => 'New Degree',
30 | 'edit_item' => 'Edit Degree',
31 | 'view_item' => 'View Degree',
32 | 'all_items' => 'All Degrees',
33 | 'search_items' => 'Search Degrees',
34 | 'parent_item_colon' => 'Parent Degrees:',
35 | 'not_found' => 'No degrees found.',
36 | 'not_found_in_trash' => 'No degrees found in Trash.',
37 | );
38 |
39 | $args = array(
40 | 'labels' => $labels,
41 | 'description' => 'Description.',
42 | 'public' => true,
43 | 'rewrite' => array( 'slug' => 'degree' ),
44 | 'capability_type' => 'post',
45 | 'has_archive' => true,
46 | 'supports' => array( 'title', 'thumbnail', 'excerpt', )
47 | );
48 |
49 | register_post_type( 'degree', $args );
50 |
51 | } // End if
52 |
53 | } // End register_post_type
54 |
55 |
56 | public function add_edit_form( $post ){
57 |
58 | if ( 'degree' === $post->post_type ){
59 |
60 | $settings = $this->get_settings( $post->ID );
61 |
62 | $degree_types = array(
63 | 'ba' => 'BA',
64 | 'bs' => 'BS',
65 | 'ma' => 'MA',
66 | 'ms' => 'MS',
67 | 'phd' => 'PHD'
68 | );
69 |
70 | include ignite_get_theme_path('lib/post-types/degrees/editor/degree-type.php');
71 |
72 | include ignite_get_theme_path('lib/post-types/degrees/editor/degree-type-undergraduate.php');
73 |
74 | } // End if
75 |
76 | } // End add_edit_form
77 |
78 |
79 | public function get_settings( $post_id ){
80 |
81 | $settings = array();
82 |
83 | foreach( $this->fields as $key => $type ){
84 |
85 | $settings[$key] = get_post_meta( $post_id, $key, true );
86 |
87 | } // End foreach
88 |
89 | return $settings;
90 |
91 | } // End get_settings
92 |
93 | } // End Degree_Post_Type_Ignite
94 |
95 | $degrees_post_type_ignite = new Degree_Post_Type_Ignite();
--------------------------------------------------------------------------------
/lib/shortcodes/cwpinsert/class-cwpinsert-shortcode-ignite.php:
--------------------------------------------------------------------------------
1 | 'full',
26 | 'title' => '',
27 | 'url' => '',
28 | );
29 |
30 | $atts = shortcode_atts( $default_atts, $atts, $tag );
31 |
32 | if ( $atts['url'] ){
33 |
34 | $rest_post = $this->get_rest_request( $atts['url'] );
35 |
36 | switch( $atts['display'] ){
37 |
38 | case 'full':
39 | $html .= $this->get_display_full( $rest_post, $atts );
40 | break;
41 | case 'article-accordion':
42 | $html .= $this->get_display_accordion( $rest_post, $atts );
43 | break;
44 | } // End switch
45 |
46 | } // End if
47 |
48 | return $html;
49 |
50 | } // End render_shortcode
51 |
52 |
53 | protected function get_display_full( $rest_post, $atts ){
54 |
55 | $html = $rest_post['content'];
56 |
57 | return $html;
58 |
59 | } // End get_display_full
60 |
61 | protected function get_display_accordion( $rest_post, $atts ){
62 |
63 | $title = ( $atts['title'] ) ? $atts['title'] : $rest_post['title'];
64 |
65 | $content = $rest_post['content'];
66 |
67 | ob_start();
68 |
69 | include ignite_get_theme_path( 'lib/post-formats/content-accordion/accordion.php' );
70 |
71 | $html = ob_get_clean();
72 |
73 | return $html;
74 |
75 | } // End get_display_full
76 |
77 |
78 | protected function get_rest_request( $request_url ){
79 |
80 | $rest_post = array();
81 |
82 | $response = wp_remote_get( $request_url . '?get-post-json=true', array( 'timeout' => 20) );
83 |
84 | $content = wp_remote_retrieve_body( $response );
85 |
86 | $rest_post_array = json_decode( $content, true );
87 |
88 | if ( is_array( $rest_post_array ) ){
89 |
90 | $rest_post = array(
91 | 'title' => $rest_post_array['title']['rendered'],
92 | 'content' => $rest_post_array['content']['rendered'],
93 | 'excerpt' => $rest_post_array['excerpt']['rendered'],
94 | );
95 |
96 | } // End if
97 |
98 | return $rest_post;
99 |
100 | } // End get_rest_request
101 |
102 |
103 | } // end Search_Shortcode_Ignite
104 |
105 | $cahnrs_cwpinsert_shortcode_ignite = new CAHNRS_Cwpinsert_Shortcode_Ignite();
--------------------------------------------------------------------------------
/lib/shortcodes/cahnrs-search/class-cahnrs-search-shortcode-ignite.php:
--------------------------------------------------------------------------------
1 | '',
28 | 'post_type' => '',
29 | 'per_page' => '',
30 | 'show_images' => '',
31 | 'show_title' => '',
32 | 'show_date' => '',
33 | 'do_link' => '',
34 | 'display' => 'basic',
35 | 'search_type' => 'site',
36 | 'tags' => '',
37 | 'categories' => '',
38 | 'excerpt_length' => '',
39 | 'order_by' => '',
40 | 'offset' => '',
41 | 'category_relation' => '',
42 | 'tag_relation' => '',
43 | 'order' => '',
44 | 'exclude' => '',
45 | 'article_placement' => '',
46 | 'article_topic' => '',
47 | 'article_subject' => '',
48 | 'subject_relation' => '',
49 | 'topic_relation' => '',
50 | 'article_relation' => '',
51 | 'sites' => '',
52 | 'site_relation' => '',
53 | 'meta_relation' => '',
54 | 'include_remote' => '',
55 | 'include_local' => '',
56 | 'exclude_already_shown' => '',
57 | 'remote_exclude' => '',
58 | 'remote_categories' => '',
59 | 'remote_category_relation' => '',
60 | 'remote_tags' => '',
61 | 'remote_tag_relation' => '',
62 | 'keyword' => '',
63 | 'resluts_page' => '',
64 | 'show_results' => 1,
65 | );
66 |
67 | $atts = shortcode_atts( $default_atts, $atts, $tag );
68 |
69 | ob_start( );
70 |
71 | $exclude = array('resluts_page','show_results','keyword','display');
72 |
73 | switch( $atts['display'] ){
74 |
75 | case 'cahnrs-query':
76 | $keyword_name = 'ci-keyword';
77 | break;
78 | case 'site':
79 | default:
80 | $keyword_name = 's';
81 | break;
82 | } // End switch
83 |
84 | switch( $atts['display'] ) {
85 |
86 | default:
87 | include locate_template( 'lib/shortcodes/cahnrs-search/includes/display-basic.php', false );
88 | break;
89 |
90 | } // End switch
91 |
92 | $html .= ob_get_clean();
93 |
94 | return $html;
95 |
96 | } // End render_shortcode
97 |
98 |
99 | } // end Search_Shortcode_Ignite
100 |
101 | $cahnrs_search_shortcode_ignite = new CAHNRS_Search_Shortcode_Ignite();
--------------------------------------------------------------------------------
/lib/theme-parts/footer/class-footer-ignite.php:
--------------------------------------------------------------------------------
1 | '',
8 | );
9 |
10 |
11 | public function get_the_part( $context = 'single', $args = array() ){
12 |
13 | $html = '';
14 |
15 | $html .= ignite_get_widget_area( 'footer_before', 'footer-before' );
16 |
17 | $settings = $this->get_settings( $this->ctmzr_fields, $args );
18 |
19 | switch ( $settings['_cahnrswp_footer_type'] ){
20 |
21 | case 'college-global':
22 | $html .= $this->get_college_global_footer( $context, $args );
23 | break;
24 |
25 | } // End switch
26 |
27 | $html .= ignite_get_widget_area( 'footer_after', 'footer-after' );
28 |
29 | $html .= $this->get_template_parts();
30 |
31 | return $html;
32 |
33 | } // End get_the_footer
34 |
35 |
36 | protected function get_template_parts(){
37 |
38 | ob_start();
39 |
40 | include ignite_get_theme_path( 'lib/theme-parts/main/main-end.php' );
41 |
42 | get_footer();
43 |
44 | return ob_get_clean();
45 |
46 | } // End
47 |
48 |
49 | protected function get_college_global_footer( $context, $args ){
50 |
51 | ob_start();
52 |
53 | include ignite_get_theme_path( 'lib/displays/footers/college-footer/footer.min.php', false );
54 |
55 | return ob_get_clean();
56 |
57 | } // End get_college_global_footer */
58 |
59 |
60 |
61 | /* public function the_footer( $context = 'single', $args = array() ){
62 |
63 | $html = '';
64 |
65 | if ( is_active_sidebar( 'footer_before' ) ) {
66 |
67 | ob_start();
68 |
69 | dynamic_sidebar( 'footer_before' );
70 |
71 | $html .= '';
72 |
73 | } // End if
74 |
75 | $args = $this->get_customizer_args( $args );
76 |
77 | switch( $args['type'] ){
78 |
79 | case 'college-global':
80 | $html .= $this->get_college_global_footer( $context, $args );
81 | break;
82 |
83 | } // End switch
84 |
85 | if ( is_active_sidebar( 'footer_after' ) ) {
86 |
87 | ob_start();
88 |
89 | dynamic_sidebar( 'footer_after' );
90 |
91 | $html .= '';
92 |
93 | } // End if
94 |
95 | echo apply_filters( 'cahnrs_ignite_page_html', $html );
96 |
97 | } // End get_footer
98 |
99 |
100 | protected function get_college_global_footer( $context, $args ){
101 |
102 | ob_start();
103 |
104 | include locate_template( 'includes/footers/college-footer/footer.php', false );
105 |
106 | return ob_get_clean();
107 |
108 | } // End get_college_global_footer */
109 |
110 | } // End Footer_Ignite
--------------------------------------------------------------------------------
/widgets/theme-parts/class-theme-part-widget-cahnrs-ignite.php:
--------------------------------------------------------------------------------
1 | 'Theme_Part_Widget_CAHNRS_Ignite',
19 | 'description' => 'Widget for adding custom theme parts',
20 | );
21 | parent::__construct( 'theme_part_widget', 'Insert Theme Part', $widget_ops );
22 | }
23 |
24 | /**
25 | * Outputs the content of the widget
26 | *
27 | * @param array $args
28 | * @param array $instance
29 | */
30 | public function widget( $args, $instance ) {
31 |
32 | if ( ! empty( $instance['part_id'] ) ) {
33 |
34 | $post = get_post( $instance['part_id'] );
35 |
36 | //var_dump( $post );
37 |
38 | if ( $post ){
39 |
40 | $content = apply_filters( 'widget_content_ignite', $post->post_content );
41 |
42 | echo do_shortcode( $content );
43 |
44 | } // end if
45 |
46 | } // End if
47 |
48 | // outputs the content of the widget
49 | }
50 |
51 | /**
52 | * Outputs the options form on admin
53 | *
54 | * @param array $instance The widget options
55 | */
56 | public function form( $instance ) {
57 |
58 | $args = array(
59 | 'posts_per_page' => -1,
60 | 'orderby' => 'date',
61 | 'order' => 'DESC',
62 | 'post_type' => 'theme_part',
63 | 'post_status' => 'publish',
64 | );
65 |
66 | $post_options = array();
67 |
68 | $posts_array = get_posts( $args );
69 |
70 | foreach( $posts_array as $tp_post ){
71 |
72 | $post_options[ $tp_post->ID ] = $tp_post->post_title;
73 |
74 | } // End foreach
75 |
76 | $part_id = ( ! empty( $instance['part_id'] ) ) ? $instance['part_id'] :'';
77 |
78 | include locate_template( 'widgets/theme-parts/includes/widget-form.php', false );
79 | // outputs the options form on admin
80 | }
81 |
82 | /**
83 | * Processing widget options on save
84 | *
85 | * @param array $new_instance The new options
86 | * @param array $old_instance The previous options
87 | *
88 | * @return array
89 | */
90 | public function update( $new_instance, $old_instance ) {
91 |
92 | $instance = array();
93 |
94 | $instance['part_id'] = ( ! empty( $new_instance['part_id'] ) ) ? sanitize_text_field( $new_instance['part_id'] ) : '';
95 |
96 | return $instance;
97 |
98 | // processes widget options to be saved
99 | }
100 | }
--------------------------------------------------------------------------------
/classes/class-post-editor-cahnrs-ignite.php:
--------------------------------------------------------------------------------
1 | 'H1' ), $tags );
28 |
29 | } // End if
30 |
31 | } // End if
32 |
33 | return $tags;
34 |
35 | } // End add_h1_tags
36 |
37 |
38 | public function edit_form_after_title( $post ){
39 |
40 | $settings = array();
41 |
42 | $setting_keys = array(
43 | '_show_title_single_ignite' => '',
44 | '_remove_page_banner' => 0,
45 |
46 | );
47 |
48 | foreach( $setting_keys as $setting_key => $default_value ){
49 |
50 | $settings[ $setting_key ] = get_post_meta( $post->ID, $setting_key, true );
51 |
52 | } // End foreach
53 |
54 | $post_id = $post->ID;
55 |
56 | echo '';
57 |
58 | wp_nonce_field( 'save_ignite_post_' . $post_id, 'save_ignite_post' );
59 |
60 | include locate_template( 'includes/forms/edit-post/basic.php', false );
61 |
62 | echo '
';
63 |
64 | } // end edit_form_after_title
65 |
66 |
67 | public function save_post( $post_id ){
68 |
69 | if ( ! is_admin() ) return;
70 |
71 | if( ( wp_is_post_revision( $post_id) || wp_is_post_autosave( $post_id ) ) ) return;
72 |
73 | if ( ! isset( $_POST['save_ignite_post'] ) ) return;
74 |
75 | $nonce = $_POST['save_ignite_post'];
76 |
77 | if ( ! wp_verify_nonce( $nonce, 'save_ignite_post_' . $post_id ) ) return;
78 |
79 | $fields = array(
80 | '_show_title_single_ignite' => 'text',
81 | '_remove_page_banner' => 'text',
82 | );
83 |
84 | foreach( $fields as $key => $type ){
85 |
86 | if ( isset( $_POST[ $key ] ) ){
87 |
88 | $clean_value = $this->sanitize_input( $_POST[ $key ], $type );
89 |
90 | update_post_meta( $post_id, $key, $clean_value );
91 |
92 | } // end if
93 |
94 | } // end foreach
95 |
96 | } // end save_post
97 |
98 |
99 | protected function sanitize_input( $value, $type ){
100 |
101 | switch( $type ){
102 |
103 | case 'text':
104 | default:
105 | $clean_value = sanitize_text_field( $value );
106 |
107 | } // end switch
108 |
109 | return $clean_value;
110 |
111 | } // end sanitize_input
112 |
113 |
114 | } // end Post_Editor_CAHNRS_Ignite
115 |
116 | $post_editor_cahnrs_ignite = new Post_Editor_CAHNRS_Ignite();
--------------------------------------------------------------------------------
/lib/post-types/slides/class-slide-post-type-ignite.php:
--------------------------------------------------------------------------------
1 | check_enabled( 'slides' ) ){
23 |
24 | $labels = array(
25 | 'name' => 'Slides',
26 | 'singular_name' => 'Slides',
27 | 'menu_name' => 'Slides',
28 | 'name_admin_bar' => 'Slides',
29 | 'add_new' => 'Add Slide',
30 | 'add_new_item' => 'Add Slide',
31 | 'new_item' => 'New Slide',
32 | 'edit_item' => 'Edit Slide',
33 | 'view_item' => 'View Slide',
34 | 'all_items' => 'All Slides',
35 | 'search_items' => 'Search Slides',
36 | 'parent_item_colon' => 'Parent Slides:',
37 | 'not_found' => 'No slides found.',
38 | 'not_found_in_trash' => 'No slides found in Trash.',
39 | );
40 |
41 | $args = array(
42 | 'labels' => $labels,
43 | 'description' => 'Slides for Theme use.',
44 | 'public' => true,
45 | 'exclude_from_search' => true,
46 | //'publicly_queryable' => true,
47 | //'show_ui' => true,
48 | 'show_in_menu' => true,
49 | 'rewrite' => array( 'slug' => 'slides' ),
50 | 'capability_type' => 'post',
51 | 'show_in_rest' => true,
52 | 'has_archive' => false,
53 | 'hierarchical' => false,
54 | 'menu_position' => null,
55 | 'supports' => array( 'title','revisions','excerpt','thumbnail' )
56 | );
57 |
58 | register_post_type( 'slides', $args );
59 |
60 | } // End if
61 |
62 |
63 | } // End register_post_type
64 |
65 |
66 | public function add_edit_form( $post ){
67 |
68 | $subtitle = get_post_meta( $post->ID, '_subtitle', true );
69 |
70 | $redirect_url = get_post_meta( $post->ID, '_redirect_url', true );
71 |
72 | if ( 'slides' === $post->post_type ){
73 |
74 | include 'includes/editor.php';
75 |
76 | } // End if
77 |
78 | } // End add_edit_form
79 |
80 |
81 | public function save( $post_id){
82 |
83 | $save_fields = array(
84 | '_redirect_url' => 'text',
85 | '_subtitle' => 'text',
86 | );
87 |
88 | if ( $this->check_can_save( $post_id ) ){
89 |
90 | $clean_fields = $this->get_clean_fields( $save_fields );
91 |
92 | foreach( $clean_fields as $key => $value ){
93 |
94 | update_post_meta( $post_id, $key, $value );
95 |
96 | } // End if
97 |
98 | } // End if
99 |
100 | } // End save
101 |
102 |
103 | } // End Slide_Post_Type_Ignite
104 |
105 | $slides_post_type_ignite = new Slide_Post_Type_Ignite();
--------------------------------------------------------------------------------
/Gruntfile.js:
--------------------------------------------------------------------------------
1 | module.exports = function( grunt ) {
2 | grunt.initConfig( {
3 | pkg: grunt.file.readJSON( "package.json" ),
4 |
5 | stylelint: {
6 | src: [ "css/*.css" ]
7 | },
8 |
9 | concat: {
10 | options: {
11 | sourceMap: true
12 | },
13 | dist: {
14 | src: "css/*.css",
15 | dest: "tmp-style.css"
16 | }
17 | },
18 |
19 | postcss: {
20 | options: {
21 | map: true,
22 | diff: false,
23 | processors: [
24 | require( "autoprefixer" )( {
25 | browsers: [ "> 1%", "ie 8-11", "Firefox ESR" ]
26 | } )
27 | ]
28 | },
29 | dist: {
30 | src: "tmp-style.css",
31 | dest: "style.css"
32 | }
33 | },
34 |
35 | clean: {
36 | options: {
37 | force: true
38 | },
39 | temp: [ "tmp-style.css", "tmp-style.css.map" ]
40 | },
41 |
42 | jscs: {
43 | scripts: {
44 | src: [ "Gruntfile.js", "src/js/*.js" ],
45 | options: {
46 | preset: "jquery",
47 | requireCamelCaseOrUpperCaseIdentifiers: false, // We rely on name_name too much to change them all.
48 | maximumLineLength: 250,
49 | validateIndentation: "\t"
50 | }
51 | }
52 | },
53 |
54 | jshint: {
55 | grunt_script: {
56 | src: [ "Gruntfile.js" ],
57 | options: {
58 | curly: true,
59 | eqeqeq: true,
60 | noarg: true,
61 | quotmark: "double",
62 | undef: true,
63 | unused: false,
64 | node: true // Define globals available when running in Node.
65 | }
66 | },
67 | theme_scripts: {
68 | src: [ "src/js/*.js" ],
69 | options: {
70 | bitwise: true,
71 | curly: true,
72 | eqeqeq: true,
73 | forin: true,
74 | freeze: true,
75 | noarg: true,
76 | nonbsp: true,
77 | quotmark: "double",
78 | undef: true,
79 | unused: true,
80 | browser: true, // Define globals exposed by modern browsers.
81 | jquery: true // Define globals exposed by jQuery.
82 | }
83 | }
84 | },
85 |
86 | phpcs: {
87 | plugin: {
88 | src: "./"
89 | },
90 | options: {
91 | bin: "vendor/bin/phpcs --extensions=php --ignore=\"*/vendor/*,*/node_modules/*\"",
92 | standard: "phpcs.ruleset.xml"
93 | }
94 | },
95 |
96 | watch: {
97 | styles: {
98 | files: [ "css/*.css", "js/*.js" ],
99 | tasks: [ "default" ],
100 | option: {
101 | livereload: 8000
102 | }
103 | }
104 | },
105 |
106 | connect: {
107 | server: {
108 | options: {
109 | open: "http://localhost:8000/style-guide/home.html",
110 | port: 8000,
111 | hostname: "localhost"
112 | }
113 | }
114 | }
115 |
116 | } );
117 |
118 | grunt.loadNpmTasks( "grunt-postcss" );
119 | grunt.loadNpmTasks( "grunt-contrib-concat" );
120 | grunt.loadNpmTasks( "grunt-contrib-connect" );
121 | grunt.loadNpmTasks( "grunt-contrib-clean" );
122 | grunt.loadNpmTasks( "grunt-contrib-watch" );
123 | grunt.loadNpmTasks( "grunt-phpcs" );
124 | grunt.loadNpmTasks( "grunt-stylelint" );
125 | grunt.loadNpmTasks( "grunt-jscs" );
126 | grunt.loadNpmTasks( "grunt-contrib-jshint" );
127 |
128 | // Default task(s).
129 | grunt.registerTask( "default", [ "jscs", "jshint", "stylelint", "concat", "postcss", "clean" ] );
130 |
131 | grunt.registerTask( "serve", [ "connect", "watch" ] );
132 | };
133 |
--------------------------------------------------------------------------------
/lib/post-types/articles/includes/sources-form.php:
--------------------------------------------------------------------------------
1 | ID, '_sources', true );
6 |
7 | //var_dump( $value );
8 |
9 | //print_r($value);
10 |
11 | echo 'News Sources: (Optional) ';
12 |
13 | // Here comes the inelegant part...
14 |
15 | echo '
';
16 | echo 'Name, Title ';
17 | echo ' ';
18 | echo 'Phone, Email ';
19 | echo ' ';
20 | echo '
';
21 |
22 | /*if ( $value['name_2'] ) {
23 | echo '
';
24 | echo 'Name, Title ';
25 | echo ' ';
26 | echo 'Phone, Email ';
27 | echo ' ';
28 | echo '
';
29 | }
30 |
31 | if ( $value['name_3'] ) {
32 | echo '
';
33 | echo 'Name, Title ';
34 | echo ' ';
35 | echo 'Phone, Email ';
36 | echo ' ';
37 | echo '
';
38 | }
39 |
40 | if ( $value['name_4'] ) {
41 | echo '
';
42 | echo 'Name, Title ';
43 | echo ' ';
44 | echo 'Phone, Email ';
45 | echo ' ';
46 | echo '
';
47 | }
48 |
49 | if ( $value['name_5'] ) {
50 | echo '
';
51 | echo 'Name, Title ';
52 | echo ' ';
53 | echo 'Phone, Email ';
54 | echo ' ';
55 | echo '
';
56 | }*/
57 |
58 | echo '
';
59 |
60 | echo '
+ Add additional source
';?>
61 |
--------------------------------------------------------------------------------
/lib/shortcodes/cahnrs-posts/class-cahnrs-posts-shortcode-ignite.php:
--------------------------------------------------------------------------------
1 | 'post',
30 | 'per_page' => 5,
31 | 'show_images' => 1,
32 | 'show_title' => 1,
33 | 'show_date' => 1,
34 | 'do_link' => 1,
35 | 'display' => 'promo-list',
36 | 'tags' => '',
37 | 'page' => 1,
38 | 'categories' => '',
39 | 'excerpt_length' => 25,
40 | 'order_by' => 'date',
41 | 'offset' => 0,
42 | 'category_relation' => 'IN',
43 | 'tag_relation' => 'IN',
44 | 'order' => 'ASC',
45 | 'exclude' => '',
46 | 'meta_relation' => 'OR',
47 | 'keyword' => '',
48 | 'show_pagination' => 1,
49 | 'show_pagination_after' => 1,
50 | 'is_ajax' => 0,
51 | 'allow_paged' => 1,
52 | );
53 |
54 | $atts = shortcode_atts( $default_atts, $atts, $tag );
55 |
56 | $query_args = $this->get_query_args( $atts );
57 |
58 | $html .= '';
59 |
60 | switch( $atts['display'] ){
61 |
62 | default:
63 | $html .= $this->get_default_display( $query_args, $atts );
64 |
65 | break;
66 |
67 | } // End switch
68 |
69 | $html .= '
';
70 |
71 | return $html;
72 |
73 | } // End render_shortcode
74 |
75 |
76 | protected function get_default_display( $query_args, $atts ){
77 |
78 | $the_query = new WP_Query( $query_args );
79 |
80 | ignite_load_class( 'classes/class-paginiation-cahnrs-ignite.php' );
81 |
82 | $page = ( ! empty( $query_args['paged'] ) ) ? $query_args['paged'] : 1;
83 |
84 | $pagination = new Pagination_CAHNRS_Ignite( $page, $query_args['posts_per_page'], $the_query->found_posts );
85 |
86 | $html = '';
87 |
88 | if ( $atts['show_pagination'] && $atts['allow_paged'] ) {
89 |
90 | $html .= $pagination->get_pagination( 'default', array('is_shortcode' => true ) );
91 |
92 | } // End if
93 |
94 | if ( $the_query->have_posts() ){
95 |
96 | while ( $the_query->have_posts() ){
97 |
98 | $the_query->the_post();
99 |
100 | $classes = array('ignite-display-promo-list-item');
101 |
102 | $image = ignite_get_post_image( get_the_ID(), 'medium' );
103 |
104 | if ( $image ) $classes[] = 'has-image';
105 |
106 | if ( ! empty( $args['class'])) $classes[] = $args['class'];
107 |
108 | ob_start();
109 |
110 | include locate_template( 'lib/displays/promo-list-loop.php', false );
111 |
112 | $html .= ob_get_clean();
113 |
114 | }// End while
115 |
116 | if ( $atts['show_pagination'] && $atts['show_pagination_after'] && $atts['allow_paged'] ) {
117 |
118 | $html .= $pagination->get_pagination( 'default', array('is_shortcode' => true, 'is_after' => true ) );
119 |
120 | } // End if
121 |
122 | wp_reset_postdata();
123 |
124 | }// End if
125 |
126 | return $html;
127 |
128 | } // End get_default_display
129 |
130 |
131 | protected function get_query_args( $atts ){
132 |
133 | ignite_load_class('classes/class-query-posts-cahnrs-ignite.php');
134 |
135 | $ignite_query = new Query_Posts_CAHNRS_Ignite( $atts );
136 |
137 | $query_args = $ignite_query->get_query_args();
138 |
139 | return $query_args;
140 |
141 | } // End get_query_args_set
142 |
143 |
144 | } // end CAHNRS_Posts_Shortcode_Ignite
145 |
146 | $cahnrs_Posts_shortcode_ignite = new CAHNRS_Posts_Shortcode_Ignite();
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | WSUWP Spine Child Theme Skeleton
2 | ===============================
3 |
4 | [](https://travis-ci.org/washingtonstateuniversity/WSUWP-Spine-Child-Theme-Skeleton)
5 |
6 | A framework for building a [WordPress child theme](http://codex.wordpress.org/Child_Themes) for the [WSUWP Spine Parent Theme](https://github.com/washingtonstateuniversity/WSUWP-spine-parent-theme) at WSU.
7 |
8 | ## Initial setup
9 |
10 | ### Setup the theme repository
11 |
12 | 1. Create a [new repository](https://github.com/organizations/washingtonstateuniversity/repositories/new) under the Washington State University organization. This should have a name like "website.wsu.edu" that matches the address of the site where the theme will be used. If this is a more general theme, feel free to use something like "WSUWP Descriptive Theme".
13 | 1. Clone this [WSUWP Spine Child Theme Skeleton](https://github.com/washingtonstateuniversity/WSUWP-Spine-Child-Theme-Skeleton) repository to a directory on your computer named for the new theme.
14 | 1. Change into that new directory.
15 | 1. Remove the `.git` directory that provides the history for the WSUWP Spine Child Theme Skeleton project.
16 | 1. Initialize a new git repository in the directory.
17 | 1. Add the new repository you created in step 1 as the `origin` remote.
18 |
19 | #### In terminal
20 |
21 | ```
22 | git clone https://github.com/washingtonstateuniversity/WSUWP-Spine-Child-Theme-Skeleton.git website-theme-dev
23 | cd website-theme-dev
24 | rm -fr .git
25 | git init
26 | git remote add origin https://github.com/washingtonstateuniversity/website.wsu.edu.git
27 | git status
28 | ```
29 |
30 | ### Alter the theme to be its own project
31 |
32 | There are several places throughout the WSUWP Child Theme Skeleton code that should be changed to match the new theme.
33 |
34 | 1. The theme header portion of the stylesheet in `css/00-banner.css` should be adjusted.
35 | 1. Update the project name in `composer.json`.
36 | 1. Update the project name and URL in `package.json`.
37 | 1. Update the ruleset name and description in `phpcs.ruleset.xml`.
38 | 1. Update the name and description of the project in `README.md`, replacing all of this text.
39 | 1. Update the name, copyright, and URL in `LICENSE`.
40 | 1. If desired, replace `screenshot.png` with a screenshot of the child theme.
41 |
42 | ### Testing the initial theme structure
43 |
44 | 1. Install the NPM dependencies.
45 | 1. Install the Composer dependencies.
46 | 1. Ensure code standards are sniffed properly.
47 | 1. Ensure CSS files are properly processed into `style.css` and `style.css.map`.
48 |
49 | #### In terminal
50 |
51 | ```
52 | npm install
53 | composer install
54 | grunt phpcs
55 | grunt
56 | ```
57 |
58 | ### Add the updated theme files to the repository
59 |
60 | The theme should now be in its initial state, with all pieces renamed to fit the new project. An initial commit can be added with all of these files.
61 |
62 | 1. Check `git status` to be sure only the intended files are being added.
63 | 1. Add all files to staging.
64 | 1. Add an initial commit.
65 | 1. Push the initial commit to the master branch on the origin remote.
66 |
67 | #### In terminal
68 |
69 | ```
70 | git status
71 | git add -A
72 | git commit -m "Initial commit"
73 | git push origin master
74 | ```
75 |
76 | ### Maintaining the project structure
77 |
78 | The child theme CSS is maintained in the `css/` directory. Grunt tasks are responsible for concatenating these files in alphabetical order, running autoprefixer, and then linting the compiled CSS for errors. The final destination for the CSS is `style.css`. A source map is created in `style.css.map`.
79 |
80 | * CSS should be added and edited in the `css/` directory.
81 | * The built `style.css` is automatically generated **and** tracked in version control.
82 | * Run `grunt` to generate `style.css` before committing changes.
83 | * Use `grunt serve` to start a local web server and view the style guide.
84 |
85 | When JavaScript is added to the theme, similar tasks can be added for linting, concatenating, and minifying the JavaScript as needed.
86 |
--------------------------------------------------------------------------------
/classes/class-query-posts-cahnrs-ignite.php:
--------------------------------------------------------------------------------
1 | '',
9 | 'post_type' => 'post',
10 | 'post_status' => 'publish',
11 | 'per_page' => 5,
12 | 'page' => 0,
13 | 'tags' => '',
14 | 'categories' => '',
15 | 'order_by' => 'date',
16 | 'offset' => 0,
17 | 'category_relation' => 'IN',
18 | 'tag_relation' => 'IN',
19 | 'order' => 'ASC',
20 | 'exclude' => '',
21 | 'meta_relation' => 'OR',
22 | 'include_remote' => false,
23 | 'include_local' => true,
24 | 'exclude_already_shown' => 0,
25 | 'remote_exclude' => '',
26 | 'remote_categories' => '',
27 | 'remote_category_relation' => 'OR',
28 | 'remote_tags' => '',
29 | 'remote_tag_relation' => 'OR',
30 | 'keyword' => '',
31 | 'allow_paged' => 1,
32 | 'is_ajax' => 0,
33 | 'prefix' => '',
34 | );
35 |
36 | protected $args = array();
37 |
38 |
39 | public function __construct( $args = array() ){
40 |
41 | $this->args = shortcode_atts( $this->default_args, $args );
42 |
43 | $this->set_query_args();
44 |
45 | } // End __construct
46 |
47 |
48 | public function get_query_args(){
49 |
50 | return $this->query_args;
51 |
52 | } // End get_query_args
53 |
54 |
55 | protected function set_query_args(){
56 |
57 | $q_args = array(
58 | 'post_type' => $this->args['post_type'],
59 | 'posts_per_page' => $this->args['per_page'],
60 | 'post_status' => $this->args['post_status'],
61 | );
62 |
63 | $this->set_page_args( $q_args );
64 |
65 | $this->set_category_args( $q_args );
66 |
67 | $this->set_order_args( $q_args );
68 |
69 | $this->set_tag_args( $q_args );
70 |
71 | //if ( isset( $_GET['test'])) var_dump( $q_args );
72 |
73 | $this->query_args = array_merge( $this->query_args, $q_args );
74 |
75 | } // End set_query_args
76 |
77 |
78 | protected function set_page_args( &$q_args ){
79 |
80 | if ( $this->args['allow_paged'] ){
81 |
82 | $page = false;
83 |
84 | $key = ( ! empty( $this->args['prefix'] ) )? $this->args['prefix'] . '-ci-page' : 'ci-page';
85 |
86 | if ( ! empty( $_REQUEST[ $key ] ) ){
87 |
88 | $page = sanitize_text_field( $_REQUEST[ $key ] );
89 |
90 | } else if ( $this->args['page'] ){
91 |
92 | $page = $this->args['page'];
93 |
94 | } // End if
95 |
96 | if ( $page ){
97 |
98 | $q_args['paged'] = $page;
99 |
100 | } // End if
101 |
102 | } // End if
103 |
104 | } // End set_page_args
105 |
106 | protected function set_category_args( &$q_args ){
107 |
108 | if ( ! empty( $this->args['categories'] ) ){
109 |
110 | $cats = explode( ',', $this->args['categories'] );
111 |
112 | $cat_query = array(
113 | 'taxonomy' => 'category',
114 | 'terms' => $cats,
115 | 'field' => ( is_numeric( $cats[0] )) ? 'term_id' : 'slug',
116 | 'operator' => $this->args['category_relation'],
117 | );
118 |
119 | if ( ! isset( $q_args['tax_query'] ) ) $q_args['tax_query'] = array();
120 |
121 | $q_args['tax_query'][] = $cat_query;
122 |
123 | } // End if
124 |
125 | } // End get_category_args
126 |
127 | protected function set_tag_args( &$q_args ){
128 |
129 | if ( ! empty( $this->args['tags'] ) ){
130 |
131 | $tags = explode( ',', $this->args['tags'] );
132 |
133 | $tag_query = array(
134 | 'taxonomy' => 'post_tag',
135 | 'terms' => $tags,
136 | 'field' => ( is_numeric( $tags[0] )) ? 'term_id' : 'slug',
137 | 'operator' => $this->args['tag_relation'],
138 | );
139 |
140 | if ( ! isset( $q_args['tax_query'] ) ) $q_args['tax_query'] = array();
141 |
142 | $q_args['tax_query'][] = $tag_query;
143 |
144 | } // End if
145 |
146 | } // End get_category_args
147 |
148 |
149 | protected function set_order_args( &$q_args ){
150 |
151 | $q_args['order'] = $this->args['order'];
152 |
153 | $q_args['order_by'] = $this->args['order_by'];
154 |
155 | } // End set_order_args
156 |
157 | } // End Query_Posts_CAHNRS_Ignite
--------------------------------------------------------------------------------
/includes/banners/types/wide-static-slides/wide-static-slides.js:
--------------------------------------------------------------------------------
1 | if ( typeof ci_slideshow === 'undefined' ) {
2 |
3 | var ci_slideshow = function( slideshow ){
4 |
5 | this.show = slideshow;
6 |
7 | var self = this;
8 |
9 | this.init = function(){
10 |
11 | self.bind_events();
12 |
13 | } // End init
14 |
15 | this.bind_events = function(){
16 |
17 | self.show.on( 'click', '.ci-slide-controls div', function(){ self.do_slide_nav( jQuery( this ) ) });
18 |
19 | self.show.on( 'click', '.ci-slide-thumb', function(){ self.do_slide_thumb( jQuery( this ) ) });
20 |
21 | } // End bind_events
22 |
23 | this.do_slide_thumb = function( item_clicked ) {
24 |
25 | var active_slide = self.get_active_side();
26 |
27 | var next_index = item_clicked.index();
28 |
29 | if ( active_slide.index() == next_index ) return;
30 |
31 | var next_slide = self.show.find('.ci-slide').eq( next_index );
32 |
33 | var dir = ( active_slide.index() > next_index )? -1:1;
34 |
35 | if ( next_slide.length ){
36 |
37 | self.do_slide( active_slide, next_slide, dir );
38 |
39 | } // end if
40 |
41 | } // End do_slide_thumb
42 |
43 | this.do_slide_nav = function( item_clicked ){
44 |
45 | dir = ( item_clicked.hasClass('ci-prev-slide') ) ? -1:1;
46 |
47 | var active_slide = self.get_active_side();
48 |
49 | var next_index = self.get_next_slide_index( active_slide, dir );
50 |
51 | if ( next_index !== false ){
52 |
53 | var next_slide = self.show.find('.ci-slide').eq( next_index );
54 |
55 | if ( next_slide.length ){
56 |
57 | self.do_slide( active_slide, next_slide, dir );
58 |
59 | } // end if
60 |
61 | } // End if
62 |
63 | } // End do_slide_nav
64 |
65 | this.get_active_side = function(){
66 |
67 | var active = self.show.find('.ci-slide.active').first();
68 |
69 | if ( ! active.length ) {
70 |
71 | var active = self.show.find('.ci-slide').first();
72 |
73 | active.addClass('active');
74 |
75 | } // End if
76 |
77 | return active;
78 |
79 | } // End get_active_side
80 |
81 | this.get_next_slide_index = function( active_slide, dir ){
82 |
83 | var next_slide_index = false;
84 |
85 | var slides = self.show.find('.ci-slide');
86 |
87 | var count = slides.length;
88 |
89 | var active_slide_index = active_slide.index();
90 |
91 | if ( dir > 0 ){
92 |
93 | if ( active_slide_index < ( count - 1 ) ) {
94 |
95 | next_slide_index = ( active_slide_index + 1 );
96 |
97 | } else {
98 |
99 | next_slide_index = 0;
100 |
101 | } // End if
102 |
103 | } else {
104 |
105 | if ( active_slide_index === 0 ) {
106 |
107 | next_slide_index = ( count - 1 );
108 |
109 | } else {
110 |
111 | next_slide_index = ( active_slide_index - 1 );
112 |
113 | } // End if
114 |
115 | } // End if
116 |
117 | return next_slide_index;
118 |
119 | } // End get_next_slide
120 |
121 | this.do_slide = function( active_slide, next_slide, dir ) {
122 |
123 | if ( dir > 0 ){
124 |
125 | var active_left = '-100%';
126 | var next_left = '100%';
127 |
128 | } else {
129 |
130 | var active_left = '100%';
131 | var next_left = '-100%';
132 | }
133 |
134 | next_slide.css( { left : next_left, top:0 });
135 |
136 | active_slide.animate({left: active_left}, 1000);
137 | next_slide.animate({left: 0}, 1000, function(){
138 | active_slide.removeClass('active');
139 | active_slide.removeAttr('style');
140 | next_slide.addClass('active');
141 | });
142 | } // End do_slide
143 |
144 | this.init();
145 |
146 | } // End ci_slideshow
147 |
148 | } // End if
149 |
150 | if ( typeof ci_slideshow_array === 'undefined' ) {
151 |
152 | var ci_slideshow_array = new Array();
153 |
154 | } // End if
155 |
156 | jQuery('.ci-slideshow.inactive').each(
157 |
158 | function(){
159 |
160 | var show = new ci_slideshow( jQuery( this ) );
161 |
162 | ci_slideshow_array.push( show );
163 |
164 | } // End function
165 |
166 | ) // End each
--------------------------------------------------------------------------------
/classes/class-post-cahnrs-ignite.php:
--------------------------------------------------------------------------------
1 | id = get_the_ID();
22 |
23 | $this->post = $post;
24 |
25 | $this->post_id = get_the_ID();
26 |
27 | $this->post_title = apply_filters( 'the_title', get_the_title() );
28 |
29 | $this->post_content = apply_filters( 'the_content', get_the_content() );
30 |
31 | $this->post_excerpt = get_the_excerpt();
32 |
33 | $this->post_type = get_post_type();
34 |
35 | $this->post_date = get_the_date();
36 |
37 | $this->post_status = get_post_status();
38 |
39 | $this->post_images = $this->get_local_images( get_the_ID() );
40 |
41 | $this->post_link = get_post_permalink();
42 |
43 | } // End set_local
44 |
45 |
46 | public function set_remote( $remote_post ){
47 |
48 | //var_dump( $remote_post );
49 |
50 | $this->post = $remote_post;
51 |
52 | $this->post_id = ( ! empty( $remote_post['id'] ) ) ? $remote_post['id'] : '';
53 |
54 | $this->post_images = ( ! empty( $remote_post['post_images'] ) ) ? $remote_post['post_images'] : '';
55 |
56 | $this->post_link = ( ! empty( $remote_post['link'] ) ) ? $remote_post['link'] : '';
57 |
58 | $this->post_title = ( ! empty( $remote_post['title']['rendered'] ) ) ? $remote_post['title']['rendered'] : '';
59 |
60 | $this->post_content = ( ! empty( $remote_post['content']['rendered'] ) ) ? $remote_post['content']['rendered'] : '';
61 |
62 | $this->post_excerpt = ( ! empty( $remote_post['excerpt']['rendered'] ) ) ? $remote_post['excerpt']['rendered'] : '';
63 |
64 | $this->post_date = ( ! empty( $remote_post['date'] ) ) ? $remote_post['date'] : '';
65 |
66 | $this->id = ( ! empty( $remote_post['id'] ) ) ? $remote_post['id'] : '';
67 |
68 | $this->post_type = ( ! empty( $remote_post['type'] ) ) ? $remote_post['type'] : '';
69 |
70 | $this->is_remote = true;
71 |
72 | //$this->post_type = '';
73 |
74 | //$this->post_status = '';
75 |
76 | } // End set_remote
77 |
78 |
79 | public function set_displayed(){
80 |
81 | global $cahnrs_displayed_posts;
82 |
83 | if ( ! isset( $cahnrs_displayed_posts ) ) $cahnrs_displayed_posts = array();
84 |
85 | if ( ! isset( $cahnrs_displayed_posts[ $this->post_type ] ) ) $cahnrs_displayed_posts[ $this->post_type ] = array();
86 |
87 | if ( ! isset( $cahnrs_displayed_posts[ $this->post_type ]['local'] ) ) $cahnrs_displayed_posts[ $this->post_type ]['local'] = array();
88 |
89 | if ( ! isset( $cahnrs_displayed_posts[ $this->post_type ]['remote'] ) ) $cahnrs_displayed_posts[ $this->post_type ]['remote'] = array();
90 |
91 | if ( $this->is_remote ){
92 |
93 | $cahnrs_displayed_posts[ $this->post_type ]['remote'][] = $this->id;
94 |
95 | } else {
96 |
97 | $cahnrs_displayed_posts[ $this->post_type ]['local'][] = $this->id;
98 |
99 | } // End if
100 |
101 | } // End set_displayed
102 |
103 |
104 | public function get_link_html( $end = false ){
105 |
106 | if ( $end ){
107 |
108 | return '';
109 |
110 | } else {
111 |
112 | return '';
113 |
114 | } // End if
115 |
116 | } // End get_link_html
117 |
118 |
119 | protected function get_local_images( $post_id ){
120 |
121 | $post_images = array();
122 |
123 | $sizes = array( 'thumbnail','medium','large','full');
124 |
125 | if ( has_post_thumbnail( $post_id ) ){
126 |
127 | $img_id = get_post_thumbnail_id( $post_id );
128 |
129 | foreach( $sizes as $size ){
130 |
131 | $img = wp_get_attachment_image_src( $img_id, $size, true );
132 |
133 | $post_images[ $size ] = $img[0];
134 |
135 | } // End foreach
136 |
137 | } // End if
138 |
139 | return $post_images;
140 |
141 | } // End get_local_images
142 |
143 |
144 |
145 | } // End Post_CAHNRS_Ignite
--------------------------------------------------------------------------------
/lib/post-types/news-release/templates/single-news-release.php:
--------------------------------------------------------------------------------
1 | the_header( 'single' );
12 |
13 | include_once CAHNRSIGNITEPATH . 'theme-parts/page-banners/class-page-banner-cahnrs-ignite.php';
14 | $page_banner = new Page_Banner_CAHNRS_Ignite();
15 | $page_banner->the_banner( 'single' ); ?>
16 |
17 |
32 |
33 |
34 |
35 |
36 | Published On
37 | ' . get_the_author() . '';
43 | echo ' ';
44 | if ( the_author_meta( 'phone' ) != '' )
45 | echo get_the_author_meta( 'phone' ) . ', ';
46 | } else {
47 | the_author();
48 | }
49 | }
50 | ?>
51 |
52 |
53 |
54 |
55 |
56 |
57 | Source Contact'; if ( $sources['name_2'] ) echo 's'; echo '';
63 |
64 | //echo '';
65 |
66 | // Here comes the horribly inelegant part...
67 | if ( $sources['name_1'] ) {
68 | echo '' . $sources['name_1'];
69 | if ( $sources['info_1'] ) echo ' ' . $sources['info_1'];
70 | echo '
';
71 | }
72 |
73 | if ( $sources['name_2'] ) {
74 | echo '' . $sources['name_2'];
75 | if ( $sources['info_2'] ) echo ' ' . $sources['info_2'];
76 | echo '
';
77 | }
78 |
79 | if ( $sources['name_3'] ) {
80 | echo '' . $sources['name_3'];
81 | if ( $sources['info_3'] ) echo ' ' . $sources['info_3'];
82 | echo '
';
83 | }
84 |
85 | if ( $sources['name_4'] ) {
86 | echo '' . $sources['name_4'];
87 | if ( $sources['info_4'] ) echo ' ' . $sources['info_4'];
88 | echo '
';
89 | }
90 |
91 | if ( $sources['name_5'] ) {
92 | echo '' . $sources['name_5'];
93 | if ( $sources['info_5'] ) echo ' ' . $sources['info_5'];
94 | echo '
';
95 | }
96 |
97 | //echo ' ';
98 |
99 | endif;
100 | ?>
101 |
102 |
103 |
104 |
105 | the_footer( 'single' );
109 |
110 | include locate_template( 'includes/main/main-end.php', false );
111 |
112 | get_footer();
113 |
114 | $html = ob_get_clean();
115 |
116 | echo apply_filters( 'cahnrs_ignite_page_html', $html );
--------------------------------------------------------------------------------
/lib/post-types/theme-parts/class-theme-part-post-type-cahnrs-ignite.php:
--------------------------------------------------------------------------------
1 | 'Theme_Part_Pagebuilder_Item_CAHNRS_Ignite',
27 | 'file_path' => locate_template( 'lib/pagebuilder-items/theme-part/class-theme-part-pagebuilder-item-cahnrs-ignite.php', false ),
28 | 'exclude' => 1,
29 | 'priority' => 8,
30 | );
31 |
32 | } // End if
33 |
34 | return $items_array;
35 |
36 | } // End add_pagebuilder_item
37 |
38 |
39 | public function register_post_type(){
40 |
41 | if ( $this->check_enabled() ){
42 |
43 | $labels = array(
44 | 'name' => 'Theme Parts',
45 | 'singular_name' => 'Theme Parts',
46 | 'menu_name' => 'Theme Parts',
47 | 'name_admin_bar' => 'Theme Parts',
48 | 'add_new' => 'Add Theme Part',
49 | 'add_new_item' => 'Add Theme Part',
50 | 'new_item' => 'New Theme Part',
51 | 'edit_item' => 'Edit Theme Part',
52 | 'view_item' => 'View Theme Part',
53 | 'all_items' => 'All Theme Parts',
54 | 'search_items' => 'Search Theme Parts',
55 | 'parent_item_colon' => 'Parent Theme Parts:',
56 | 'not_found' => 'No parts found.',
57 | 'not_found_in_trash' => 'No parts found in Trash.',
58 | );
59 |
60 | $args = array(
61 | 'labels' => $labels,
62 | 'description' => 'Reusable Theme Content.',
63 | 'public' => true,
64 | //'publicly_queryable' => true,
65 | //'show_ui' => true,
66 | 'show_in_menu' => true,
67 | 'taxonomies' => array( 'category', ' post_tag' ),
68 | 'rewrite' => array( 'slug' => 'parts' ),
69 | 'capability_type' => 'post',
70 | 'show_in_rest' => true,
71 | 'has_archive' => false,
72 | 'hierarchical' => false,
73 | 'menu_position' => null,
74 | 'supports' => array( 'title', 'editor', 'revisions','excerpt','thumbnail' )
75 | );
76 |
77 | register_post_type( 'theme_part', $args );
78 |
79 | } // End if
80 |
81 |
82 | } // End register_post_type
83 |
84 |
85 | public function add_edit_form( $post ){
86 |
87 | if ( 'theme_part' == $post->post_type ){
88 |
89 | include locate_template( 'lib/post-types/theme-parts/includes/edit-form.php', false );
90 |
91 | } // End if
92 |
93 | } // End add_edit_form
94 |
95 |
96 | public function check_enabled(){
97 |
98 | return ( get_theme_mod( '_cahnrswp_enable_theme_parts', false ) ) ? true : false;
99 |
100 | } // End check_enabled
101 |
102 |
103 | public function save( $post_id ){
104 |
105 | if ( isset( $_POST['_redirect_url'] ) ){
106 |
107 | $clean = sanitize_text_field( $_POST['_redirect_url'] );
108 |
109 | update_post_meta( $post_id, '_redirect_url', $clean );
110 |
111 | } // End if
112 |
113 | } // End save
114 |
115 |
116 | public function check_redirect( $template ){
117 |
118 | if ( is_singular( 'theme_part' ) ){
119 |
120 | global $post;
121 |
122 | $redirect = get_post_meta( $post->ID, '_redirect_url', true );
123 |
124 | if ( ! empty( $redirect ) ){
125 |
126 | wp_redirect( $redirect );
127 |
128 | exit;
129 |
130 | //$template = locate_template( 'lib/theme-templates/redirect.php', false );
131 |
132 | //wp_redirect( $redirect );
133 |
134 | } // End if
135 |
136 | } // End if
137 |
138 | return $template;
139 |
140 | } // End check_redirect
141 |
142 |
143 | } // End Theme_Part_Post_Type_CAHNRS_Ignite
144 |
145 | $theme_part_post_type_cahnrs_ignite = new Theme_Part_Post_Type_CAHNRS_Ignite();
--------------------------------------------------------------------------------
/lib/shortcodes/cahnrs-publications/class-cahnrs-publications-shortcode-ignite.php:
--------------------------------------------------------------------------------
1 | 6,
8 | 'display' => 'basic',
9 | );
10 |
11 |
12 | public function __construct(){
13 |
14 | add_action( 'init', array( $this, 'register_shortcode' ) );
15 |
16 | } // End __construct
17 |
18 |
19 | public function register_shortcode(){
20 |
21 | add_shortcode( 'cahnrs_publications', array( $this, 'render_shortcode' ) );
22 |
23 | } // End register_shortcode
24 |
25 |
26 | public function render_shortcode( $atts, $content, $tag ){
27 |
28 | $html = '';
29 |
30 | $atts = shortcode_atts( $this->default_atts, $atts, $tag );
31 |
32 | $publications = $this->get_publicatons( $atts );
33 |
34 | $html .= '';
35 |
36 | switch( $atts['display'] ) {
37 |
38 | default:
39 | $html .= $this->get_display_basic( $publications, $atts );
40 | break;
41 |
42 | } // End switch
43 |
44 | $html .= '
';
45 |
46 | return $html;
47 |
48 | } // End render_shortcode
49 |
50 |
51 | protected function get_publicatons( $atts ){
52 |
53 | $args = array(
54 | 'post_type' => 'publications',
55 | 'status' => 'publish',
56 | 'posts_per_page' => ( ! empty( $atts['per_page'] ) ) ? $atts['per_page'] : 6,
57 | 'display' => 'basic',
58 | );
59 |
60 | $publications = array();
61 |
62 | $the_query = new WP_Query( $args );
63 |
64 | if ( $the_query->have_posts() ) {
65 |
66 | while ( $the_query->have_posts() ) {
67 |
68 | $the_query->the_post();
69 |
70 | $publications[] = array(
71 | 'title' => get_the_title(),
72 | 'link' => get_post_meta( get_the_ID(), '_redirect_url', true ),
73 | 'authors' => get_post_meta( get_the_ID(), '_authors', true ),
74 | 'journal' => $this->get_journal( get_the_ID() ),
75 | 'units' => $this->get_units( get_the_ID() ),
76 | );
77 |
78 | } // End while
79 |
80 | wp_reset_postdata();
81 |
82 | } // End if
83 |
84 | return $publications;
85 |
86 | } // End get_publicatons
87 |
88 |
89 | protected function get_journal( $pub_id ){
90 |
91 | $term = array();
92 |
93 | $terms = wp_get_post_terms( $pub_id, 'journals' );
94 |
95 | if ( ! empty( $terms ) ){
96 |
97 | $term['name'] = $terms[0]->name;
98 |
99 | $term['slug'] = $terms[0]->slug;
100 |
101 | } // End if
102 |
103 | return $term;
104 |
105 | } // End get_journal
106 |
107 | protected function get_units( $pub_id ){
108 |
109 | $depts = array();
110 |
111 | $terms = wp_get_post_terms( $pub_id, 'departments' );
112 |
113 | if ( ! empty( $terms ) ){
114 |
115 | foreach( $terms as $term ){
116 |
117 | $depts[] = array(
118 | 'name' => $term->name,
119 | 'slug' => $term->slug,
120 | );
121 |
122 | } // End if
123 |
124 | } // End if
125 |
126 |
127 | return $depts;
128 |
129 | } // End get_unit
130 |
131 |
132 | protected function get_display_basic( $publications, $atts ){
133 |
134 | $html = '';
135 |
136 | foreach( $publications as $publication ){
137 |
138 | $authors = ( ! empty( $publication['authors'] ) ) ? $publication['authors'] : array();
139 |
140 | $author_html = array();
141 |
142 | foreach( $authors as $author ){
143 |
144 | $auth = $author['name'];
145 |
146 | if ( ! empty( $author['email'] ) ){
147 |
148 | $auth = ' ' . $auth . ' ';
149 |
150 | } // end if
151 |
152 | if ( ! empty( $author['dept'] ) ){
153 |
154 | $auth .= ' (' . $author['dept'] . ')';
155 |
156 | } // end if
157 |
158 | $author_html[] = $auth;
159 |
160 | } // End foreach
161 |
162 | $author_html = implode( ', ', $author_html );
163 |
164 | ob_start();
165 |
166 | include locate_template( 'lib/shortcodes/cahnrs-publications/displays/basic.php', false );
167 |
168 | $html .= ob_get_clean();
169 |
170 | } // End foreach
171 |
172 | return $html;
173 |
174 | } // End get_display_basic
175 |
176 |
177 | } // end Search_Shortcode_Ignite
178 |
179 | $cahnrs_Publications_shortcode_ignite = new CAHNRS_Publications_Shortcode_Ignite();
--------------------------------------------------------------------------------
/theme-parts/page-banners/wide-static-slides/wide-static-slides.js:
--------------------------------------------------------------------------------
1 | if ( typeof ci_slideshow === 'undefined' ) {
2 |
3 | var ci_slideshow = function( slideshow ){
4 |
5 | this.show = slideshow;
6 |
7 | var self = this;
8 |
9 | this.init = function(){
10 |
11 | self.bind_events();
12 |
13 | } // End init
14 |
15 | this.bind_events = function(){
16 |
17 | self.show.on( 'click', '.ci-slide-controls div', function(){ self.do_slide_nav( jQuery( this ) ) });
18 |
19 | self.show.on( 'click', '.ci-slide-thumb', function(){ self.do_slide_thumb( jQuery( this ) ) });
20 |
21 | } // End bind_events
22 |
23 | this.do_slide_thumb = function( item_clicked ) {
24 |
25 | if ( self.show.hasClass('active-slide') ) return;
26 |
27 | var active_slide = self.get_active_side();
28 |
29 | var next_index = item_clicked.index();
30 |
31 | if ( active_slide.index() == next_index ) return;
32 |
33 | var next_slide = self.show.find('.ci-slide').eq( next_index );
34 |
35 | var dir = ( active_slide.index() > next_index )? -1:1;
36 |
37 | if ( next_slide.length ){
38 |
39 | self.do_slide( active_slide, next_slide, dir );
40 |
41 | } // end if
42 |
43 | } // End do_slide_thumb
44 |
45 | this.do_slide_nav = function( item_clicked ){
46 |
47 | if ( self.show.hasClass('active-slide') ) return;
48 |
49 | dir = ( item_clicked.hasClass('ci-prev-slide') ) ? -1:1;
50 |
51 | var active_slide = self.get_active_side();
52 |
53 | var next_index = self.get_next_slide_index( active_slide, dir );
54 |
55 | if ( next_index !== false ){
56 |
57 | var next_slide = self.show.find('.ci-slide').eq( next_index );
58 |
59 | if ( next_slide.length ){
60 |
61 | self.do_slide( active_slide, next_slide, dir );
62 |
63 | } // end if
64 |
65 | } // End if
66 |
67 | } // End do_slide_nav
68 |
69 | this.get_active_side = function(){
70 |
71 | var active = self.show.find('.ci-slide.active').first();
72 |
73 | if ( ! active.length ) {
74 |
75 | var active = self.show.find('.ci-slide').first();
76 |
77 | active.addClass('active');
78 |
79 | } // End if
80 |
81 | return active;
82 |
83 | } // End get_active_side
84 |
85 | this.get_next_slide_index = function( active_slide, dir ){
86 |
87 | var next_slide_index = false;
88 |
89 | var slides = self.show.find('.ci-slide');
90 |
91 | var count = slides.length;
92 |
93 | var active_slide_index = active_slide.index();
94 |
95 | if ( dir > 0 ){
96 |
97 | if ( active_slide_index < ( count - 1 ) ) {
98 |
99 | next_slide_index = ( active_slide_index + 1 );
100 |
101 | } else {
102 |
103 | next_slide_index = 0;
104 |
105 | } // End if
106 |
107 | } else {
108 |
109 | if ( active_slide_index === 0 ) {
110 |
111 | next_slide_index = ( count - 1 );
112 |
113 | } else {
114 |
115 | next_slide_index = ( active_slide_index - 1 );
116 |
117 | } // End if
118 |
119 | } // End if
120 |
121 | return next_slide_index;
122 |
123 | } // End get_next_slide
124 |
125 | this.do_slide = function( active_slide, next_slide, dir ) {
126 |
127 | self.show.addClass('active-slide');
128 |
129 | if ( dir > 0 ){
130 |
131 | var active_left = '-100%';
132 | var next_left = '100%';
133 |
134 | } else {
135 |
136 | var active_left = '100%';
137 | var next_left = '-100%';
138 | }
139 |
140 | next_slide.css( { left : next_left, top:0 });
141 |
142 | active_slide.animate({left: active_left}, 1000);
143 | next_slide.animate({left: 0}, 1000, function(){
144 | active_slide.removeClass('active');
145 | active_slide.removeAttr('style');
146 | next_slide.addClass('active');
147 | self.show.removeClass('active-slide');
148 | });
149 | } // End do_slide
150 |
151 | this.init();
152 |
153 | } // End ci_slideshow
154 |
155 | } // End if
156 |
157 | if ( typeof ci_slideshow_array === 'undefined' ) {
158 |
159 | var ci_slideshow_array = new Array();
160 |
161 | } // End if
162 |
163 | jQuery('.ci-slideshow.inactive').each(
164 |
165 | function(){
166 |
167 | var show = new ci_slideshow( jQuery( this ) );
168 |
169 | ci_slideshow_array.push( show );
170 |
171 | } // End function
172 |
173 | ) // End each
--------------------------------------------------------------------------------
/.stylelintrc:
--------------------------------------------------------------------------------
1 | "rules": {
2 | "at-rule-empty-line-before": [ "always", {
3 | except: ["blockless-after-blockless"],
4 | ignore: ["after-comment"],
5 | } ],
6 | "at-rule-name-case": "lower",
7 | "at-rule-name-space-after": "always-single-line",
8 | "at-rule-no-unknown": true,
9 | "at-rule-semicolon-newline-after": "always",
10 | "block-closing-brace-newline-after": "always",
11 | "block-closing-brace-newline-before": "always",
12 | "block-opening-brace-newline-after": "always",
13 | "block-opening-brace-space-before": "always",
14 | "color-hex-case": "lower",
15 | "color-hex-length": "short",
16 | "color-named": "never",
17 | "color-no-invalid-hex": true,
18 | "comment-empty-line-before": [ "always", {
19 | ignore: ["stylelint-commands"],
20 | } ],
21 | "declaration-bang-space-after": "never",
22 | "declaration-bang-space-before": "always",
23 | "declaration-block-no-duplicate-properties": [ true, {
24 | ignore: ["consecutive-duplicates"],
25 | } ],
26 | "declaration-block-no-shorthand-property-overrides": true,
27 | "declaration-block-semicolon-newline-after": "always",
28 | "declaration-block-semicolon-space-before": "never",
29 | "declaration-block-trailing-semicolon": "always",
30 | "declaration-colon-newline-after": "always-multi-line",
31 | "declaration-colon-space-after": "always-single-line",
32 | "declaration-colon-space-before": "never",
33 | "font-family-name-quotes": "always-where-recommended",
34 | "font-weight-notation": "numeric",
35 | "function-calc-no-unspaced-operator": true,
36 | "function-comma-space-after": "always",
37 | "function-comma-space-before": "never",
38 | "function-linear-gradient-no-nonstandard-direction": true,
39 | "function-max-empty-lines": 1,
40 | "function-name-case": "lower",
41 | "function-parentheses-space-inside": "never",
42 | "function-url-quotes": "never",
43 | "function-whitespace-after": "always",
44 | "indentation": "tab",
45 | "keyframe-declaration-no-important": true,
46 | "length-zero-no-unit": true,
47 | "max-empty-lines": 2,
48 | "max-line-length": [ 80, {
49 | "ignore": "non-comments",
50 | } ],
51 | "media-feature-colon-space-after": "always",
52 | "media-feature-colon-space-before": "never",
53 | "media-feature-range-operator-space-after": "always",
54 | "media-feature-range-operator-space-before": "always",
55 | "media-query-list-comma-newline-after": "always-multi-line",
56 | "media-query-list-comma-space-after": "always-single-line",
57 | "media-query-list-comma-space-before": "never",
58 | "no-eol-whitespace": true,
59 | "no-extra-semicolons": true,
60 | "no-invalid-double-slash-comments": true,
61 | "no-missing-end-of-source-newline": true,
62 | "number-leading-zero": "never",
63 | "number-no-trailing-zeros": true,
64 | "property-case": "lower",
65 | "property-no-unknown": true,
66 | "rule-empty-line-before": [ "always", {
67 | except: ["after-single-line-comment"]
68 | } ],
69 | "selector-attribute-brackets-space-inside": "never",
70 | "selector-attribute-operator-space-after": "never",
71 | "selector-attribute-operator-space-before": "never",
72 | "selector-attribute-quotes": "always",
73 | "selector-class-pattern": [
74 | "^[a-z]+(-[a-z]+)*",
75 | {
76 | "message": "Selector should use lowercase and separate words with hyphens (selector-class-pattern)",
77 | },
78 | ],
79 | "selector-id-pattern": [
80 | "^[a-z]+(-[a-z]+)*",
81 | {
82 | "message": "Selector should use lowercase and separate words with hyphens (selector-id-pattern)",
83 | },
84 | ],
85 | "selector-combinator-space-after": "always",
86 | "selector-combinator-space-before": "always",
87 | "selector-list-comma-newline-after": "always",
88 | "selector-list-comma-space-before": "never",
89 | "selector-max-empty-lines": 0,
90 | "selector-pseudo-class-case": "lower",
91 | "selector-pseudo-class-no-unknown": true,
92 | "selector-pseudo-class-parentheses-space-inside": "never",
93 | "selector-pseudo-element-case": "lower",
94 | "selector-pseudo-element-colon-notation": "single",
95 | "selector-pseudo-element-no-unknown": true,
96 | "selector-type-case": "lower",
97 | "selector-type-no-unknown": true,
98 | "shorthand-property-no-redundant-values": true,
99 | "string-no-newline": true,
100 | "string-quotes": "double",
101 | "unit-case": "lower",
102 | "unit-no-unknown": true,
103 | "value-keyword-case": "lower",
104 | "value-list-comma-newline-after": "always-multi-line",
105 | "value-list-comma-space-after": "always-single-line",
106 | "value-list-comma-space-before": "never",
107 | }
108 |
--------------------------------------------------------------------------------
/classes/class-sidebars-cahnrs-ignite.php:
--------------------------------------------------------------------------------
1 | 'Header Before',
17 | 'id' => 'header_before',
18 | 'description' => 'Widgets in this area will be shown before the Header.',
19 | 'before_widget' => '',
20 | 'after_widget' => '
',
21 | ) );
22 |
23 | register_sidebar( array(
24 | 'name' => 'Header After',
25 | 'id' => 'header_after',
26 | 'description' => 'Widgets in this area will be shown after the Header.',
27 | 'before_widget' => '',
28 | 'after_widget' => '
',
29 | ) );
30 |
31 | register_sidebar( array(
32 | 'name' => 'Top Header Bar Primary',
33 | 'id' => 'global-top-header-bar-primary',
34 | 'description' => 'Widgets in this area will be shown first in the top header bar.',
35 | 'before_widget' => '',
36 | 'after_widget' => '',
37 | ) );
38 |
39 | register_sidebar( array(
40 | 'name' => 'Top Header Bar Secondary',
41 | 'id' => 'global-top-header-bar-secondary',
42 | 'description' => 'Widgets in this area will be shown to the right in the top header bar.',
43 | 'before_widget' => '',
44 | 'after_widget' => '',
45 | ) );
46 |
47 | register_sidebar( array(
48 | 'name' => 'Banner After',
49 | 'id' => 'banner_after',
50 | 'description' => 'Widgets in this area will be shown after the Banner.',
51 | 'before_widget' => '',
52 | 'after_widget' => '
',
53 | ) );
54 |
55 | register_sidebar( array(
56 | 'name' => 'Banner Inner',
57 | 'id' => 'banner_inner',
58 | 'description' => 'Widgets in this area will be shown before the Banner.',
59 | 'before_widget' => '',
60 | 'after_widget' => '
',
61 | ) );
62 |
63 | register_sidebar( array(
64 | 'name' => 'Banner Before',
65 | 'id' => 'banner_before',
66 | 'description' => 'Widgets in this area will be shown before the Banner.',
67 | 'before_widget' => '',
68 | 'after_widget' => '
',
69 | ) );
70 |
71 | register_sidebar( array(
72 | 'name' => 'Footer Before',
73 | 'id' => 'footer_before',
74 | 'description' => 'Widgets in this area will be shown before the footer.',
75 | 'before_widget' => '',
76 | 'after_widget' => '
',
77 | ) );
78 |
79 | register_sidebar( array(
80 | 'name' => 'Footer After',
81 | 'id' => 'footer_after',
82 | 'description' => 'Widgets in this area will be shown after the footer.',
83 | 'before_widget' => '',
84 | 'after_widget' => '
',
85 | ) );
86 |
87 | register_sidebar( array(
88 | 'name' => 'Header Banner Inner',
89 | 'id' => 'header_banner_inner',
90 | 'description' => 'Widgets in this area will be shown after site logo text.',
91 | 'before_widget' => '',
92 | 'after_widget' => '
',
93 | ) );
94 |
95 | $this->add_banner_sidebars();
96 |
97 |
98 | $this->add_customizer_sidebars();
99 |
100 | } // end register_sidebars
101 |
102 |
103 | protected function add_banner_sidebars(){
104 |
105 | if ( 'video-banner' === get_theme_mod( '_cahnrswp_ignite_fronpage_feature', '' ) ){
106 |
107 | register_sidebar( array(
108 | 'name' => 'Video Banner Content',
109 | 'id' => 'video_banner',
110 | 'description' => 'Widgets in this area will be shown in the front page video.',
111 | 'before_widget' => '',
112 | 'after_widget' => '
',
113 | ) );
114 |
115 | } // End if
116 |
117 | } // End add_banner_sidebars
118 |
119 |
120 | protected function add_customizer_sidebars(){
121 |
122 | $sidebars = get_theme_mod( '_cahnrswp_ignite_sidebars', array() );
123 |
124 | if ( ! is_array( $sidebars ) ) $sidebars = array();
125 |
126 | foreach( $sidebars as $sidebar ){
127 |
128 | $id = str_replace( array('\'','"'), '', strtolower( $sidebar ) );
129 |
130 | $id = str_replace( array('_',' '), '-', $id );
131 |
132 | register_sidebar( array(
133 | 'name' => $sidebar,
134 | 'id' => $id,
135 | 'description' => 'Custom Sidebar Create in Customizer.',
136 | 'before_widget' => '',
137 | 'after_widget' => '
',
138 | ) );
139 |
140 | } // End foreach
141 |
142 | } // End add_customizer_sidebars
143 |
144 |
145 | } // end Sidebars_CAHNRS_Ignite
146 |
147 | $sidebars_cahnrs_ignite = new Sidebars_CAHNRS_Ignite();
--------------------------------------------------------------------------------
/theme-parts/content/class-content-ignite.php:
--------------------------------------------------------------------------------
1 | 'promo-list',
7 | );
8 |
9 | protected $settings = array();
10 |
11 |
12 | public function the_content( $context = 'single', $args = array() ){
13 |
14 | $html = '';
15 |
16 | if ( is_active_sidebar( 'content_before' ) ) {
17 |
18 | ob_start();
19 |
20 | dynamic_sidebar( 'content_before' );
21 |
22 | $html .= '' . ob_get_clean() .'
';
23 |
24 | } // End if
25 |
26 | $args = $this->get_customizer_args( $args );
27 |
28 | $html .= '';
29 |
30 | $html .= $this->get_content( $context, $args );
31 |
32 | $html .= '
';
33 |
34 | echo apply_filters( 'cahnrs_ignite_page_html', $html );
35 |
36 | } // End the_content
37 |
38 |
39 | protected function get_html_promo_list( $context, $args ){
40 |
41 | global $wp_query;
42 |
43 | ignite_load_class( 'classes/class-paginiation-cahnrs-ignite.php' );
44 |
45 | $pagination = new Pagination_CAHNRS_Ignite( max( 1, get_query_var('paged') ), get_query_var('posts_per_page'), $wp_query->found_posts );
46 |
47 | $html .= $pagination->get_pagination();
48 |
49 | if ( have_posts() ){
50 |
51 | while ( have_posts() ){
52 |
53 | the_post();
54 |
55 | $classes = array('ignite-display-promo-list-item');
56 |
57 | $image = ignite_get_post_image( get_the_ID(), 'medium' );
58 |
59 | $image = apply_filters('ignite-post-image', $image, get_the_ID(), get_post_type() );
60 |
61 | if ( $image ) $classes[] = 'has-image';
62 |
63 | if ( ! empty( $args['class'])) $classes[] = $args['class'];
64 |
65 | ob_start();
66 |
67 | include locate_template( 'theme-parts/content/displays/promo-list.php', false );
68 |
69 | $html .= ob_get_clean();
70 |
71 | }// End while
72 |
73 | }// End if
74 |
75 | $html .= $pagination->get_pagination( 'default', array('is_after' => true ) );
76 |
77 | return $html;
78 |
79 | } // End get_college_global_footer
80 |
81 |
82 | protected function get_content( $context, $args ){
83 |
84 | $html = apply_filters( 'ignite_content_template', '', $context, $args );
85 |
86 | switch( $context ){
87 |
88 | case 'search':
89 | $html .= $this->get_search_content( $context, $args );
90 | break;
91 | } // End switch
92 |
93 |
94 |
95 | if ( empty( $html ) ){
96 |
97 | if ( is_archive() ){
98 |
99 | $html .= '' . $this->get_content_title( $context, $args ) . ' ';
100 |
101 | $html .= $this->get_search( 'archive' );
102 |
103 | $html .= $this->get_content_archive( $context, $args );
104 |
105 | } else {
106 |
107 | $html .= $this->get_html_promo_list( $context, $args );
108 |
109 | } // End if
110 |
111 | $html .= get_after_content_sidebar_ignite();
112 |
113 | } // End if
114 |
115 | return apply_filters( 'ignite_content_template_after', $html, $context, $args );
116 |
117 | } // End get_content
118 |
119 |
120 | protected function get_search( $class = '' ){
121 |
122 | ob_start();
123 |
124 | include ignite_get_theme_path( 'lib/parts/in-page-search/search.php' );
125 |
126 | $html = ob_get_clean();
127 |
128 | return $html;
129 |
130 | } // End get_search
131 |
132 |
133 | protected function get_content_archive( $context, $args ){
134 |
135 | $html = '';
136 |
137 | $html .= '' . do_shortcode( category_description() ) . '
';
138 |
139 | $html .= $this->get_html_promo_list( $context, $args );
140 |
141 | return $html;
142 |
143 | } // End get_content_archive
144 |
145 |
146 | protected function get_content_title( $context, $args ){
147 |
148 | $title = '';
149 |
150 | if ( is_archive() ){
151 |
152 | $title = get_the_archive_title();
153 |
154 | //$title = post_type_archive_title( '', false );
155 |
156 | } // End if
157 |
158 | return $title;
159 |
160 | } // End get_content_title
161 |
162 |
163 | protected function get_search_content( $context, $args ){
164 |
165 | $html = '';
166 |
167 | $html .= 'Search ';
168 |
169 | $html .= $this->get_search( 'archive' );
170 |
171 | $content = $this->get_content_archive( $context, $args );
172 |
173 | $html .= apply_filters( 'ignite_content_html_inner', $content, $context, $args ) ;
174 |
175 | return $html;
176 |
177 | } // End get_search_content
178 |
179 |
180 | protected function get_recent_posts(){
181 |
182 |
183 | }
184 |
185 | protected function get_promo_display( $context, $args ){
186 |
187 | } // End get_promo_display
188 |
189 | } // End Content_Ignite
--------------------------------------------------------------------------------