This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'allowed_block_types_all', 'restrict_blocks'); | |
function restrict_blocks( $allowed_blocks ) { | |
if ( ! is_super_admin() ) { | |
$allowed_blocks = array( | |
'core/block', | |
'core/image', | |
'core/gallery', | |
'core/paragraph', | |
'core/heading', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Template Name: SIS Courses | |
* | |
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/ | |
* | |
* @package KSAS_Academic_Department | |
*/ | |
get_header(); ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Template part for displaying images from Photoshelter | |
* | |
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/ | |
* | |
* @package Flagship_Tailwind | |
*/ | |
$username = get_field( 'username', 'option' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Template Name: SIS Courses (Graduate) | |
*/ | |
get_header(); ?> | |
<?php get_template_part( 'template-parts/featured-image' ); ?> | |
<?php | |
// Load Zebra Curl | |
//require_once TEMPLATEPATH . '/library/Zebra_cURL.php'; | |
// the callback function to be executed for each and every |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="grid-container"> | |
<div class="grid-x grid-padding-x padding-top"> | |
<?php $curated_content_query = new WP_Query($curated_content); | |
$count = 0; | |
if ($curated_content_query->have_posts()) : ?> | |
<div class="curated-posts grid-x"> | |
<?php | |
while ($curated_content_query->have_posts()) : $curated_content_query->the_post(); | |
$count++; | |
if ($count == 1 || $count == 6) :?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Get the page number from the query string | |
* In production, get this value from WordPress | |
* @return integer | |
*/ | |
function getPage() | |
{ | |
// deafult page number |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php function mindbreeze_query_vars_filter($vars) { | |
$vars[] = 'q'; | |
return $vars; | |
} | |
add_filter( 'query_vars', 'mindbreeze_query_vars_filter' ); | |
// pagination | |
$page = get_query_var( 'page', 1 ); | |
$site_path = site_url('/search'); | |
if ($body->resultset->prev_avail) : |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function add_opengraph_doctype($output) { | |
return $output . ' | |
xmlns="https://www.w3.org/1999/xhtml" | |
xmlns:og="https://ogp.me/ns#" | |
xmlns:fb="http://www.facebook.com/2008/fbml"'; | |
} | |
add_filter('language_attributes', 'add_opengraph_doctype'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(document).ready( function($) { | |
// debounce so filtering doesn't happen every millisecond | |
function debounce( fn, threshold ) { | |
var timeout; | |
return function debounced() { | |
if ( timeout ) { | |
clearTimeout( timeout ); | |
} | |
function delayed() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Template Name: SIS Courses | |
*/ | |
get_header(); ?> | |
<?php // Load Zebra Curl | |
require_once TEMPLATEPATH . "/library/Zebra_cURL.php"; | |
//Set query sting variables | |
$theme_option = flagship_sub_get_global_options(); |
NewerOlder