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
/** | |
* import helper functions | |
*/ | |
import { strUcWords } from './helper-functions'; | |
let str = strUcWords( 'hello world in lowercase' ); | |
// output : 'Hello World In Lowercase' |
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
/** | |
* uppercase words in string. | |
* | |
* @param str | |
* @returns {string} | |
*/ | |
export function strUcWords ( str ) { | |
return ( str + '' ).replace(/\b[a-z]/g, function (letter) { | |
return letter.toUpperCase() | |
}) |
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 | |
/* | |
* filter pattern: manage_{taxonomy}_custom_column | |
* where {taxonomy} is the name of taxonomy e.g; 'carousel_category' | |
* codex ref: https://codex.wordpress.org/Plugin_API/Filter_Reference/manage_$taxonomy_id_columns | |
*/ | |
add_filter( 'manage_carousel_category_custom_column', 'wptc_carousel_category_column_content', 10, 3 ); | |
function wptc_carousel_category_column_content( $content, $column_name, $term_id ) { | |
// get the term object | |
$term = get_term( $term_id, 'carousel_category' ); |
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 | |
/* | |
* filter pattern: manage_edit-{taxonomy}_columns | |
* where {taxonomy} is the name of taxonomy e.g; 'carousel_category' | |
* codex ref: https://codex.wordpress.org/Plugin_API/Filter_Reference/manage_$taxonomy_id_columns | |
*/ | |
add_filter( 'manage_edit-carousel_category_columns' , 'wptc_carousel_category_columns' ); | |
function wptc_carousel_category_columns( $columns ) { | |
// remove slug column | |
unset($columns['slug']); |
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 wptc_add_intervals( $schedules ) { | |
// add a 'weekly' interval | |
if( ! isset( $schedules['weekly'] ) ) { | |
$schedules['weekly'] = array( | |
'interval' => 604800, // seconds in a week | |
'display' => __('Once Weekly') | |
); | |
} | |
// add a 'monthly' interval |
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 | |
// using 30min time interval | |
wp_schedule_event( time(), '30min', 'wptc_custom_schedule_hook', $args ); | |
// using weekly time interval | |
wp_schedule_event( time(), 'weekly', 'wptc_custom_schedule_hook', $args ); | |
// using monthly time interval | |
wp_schedule_event( time(), 'montly', 'wptc_custom_schedule_hook', $args ); |
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
x,y,z,i,o,name,color | |
-38.65,-5.68,50.94,0,1,Precentral-L,red | |
41.37,-8.21,52.09,0,1,Precentral-R,red | |
-18.45,34.81,42.2,0,1,Frontal-Sup-L,blue | |
21.9,31.12,43.82,0,1,Frontal-Sup-R,blue | |
-16.56,47.32,-13.31,0,1,Frontal-Sup-Orb-L,orange | |
18.49,48.1,-14.02,0,1,Frontal-Sup-Orb-R,orange | |
-33.43,32.73,35.46,0,1,Frontal-Mid-L,green | |
37.59,33.06,34.04,0,1,Frontal-Mid-R,green | |
-30.65,50.43,-9.62,0,1,Frontal-Mid-Orb-L,blue |
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 id="wrapper" class="properties-filter"> | |
<div class="container"> | |
<h1 class="section-heading text-center upper color-blue mb-30 font-48">Available Properties</h1> | |
<nav class="primary clearfix"> | |
<ul class="properties-filter-menu list-inline mb-30"> | |
<?php | |
$args = array( | |
'orderby' => 'name', | |
'order' => 'ASC', |
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 | |
/** | |
* Theme Directories & Paths | |
* =================================== | |
*/ | |
if (!defined('FRAMEWORK_DIR')) | |
define('FRAMEWORK_DIR', trailingslashit(get_template_directory())); | |
if (!defined('FRAMEWORK_URI')) | |
define('FRAMEWORK_URI', trailingslashit(get_template_directory_uri())); |
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
/** | |
* custom js functions | |
*/ | |
jQuery(function ($) { | |
// filterable properties. | |
var $container = $('.properties'); | |
$container.isotope({ | |
filter: '*', | |
animationOptions: { |
NewerOlder