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
/** | |
* trigger the before and after images | |
*/ | |
var beforeafter = function() { | |
/* get the preceeding element before the toggle button - hides all the after images */ | |
$( '.before-after-toggle' ).prev().hide(); | |
/* when the element with 'before-after-toggle' class is clicked */ | |
$( '.before-after-toggle' ).click(function() { |
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 wpmark_add_before_after_shortcode() | |
* adds the shortcode to output the before and after image | |
*/ | |
function wpmark_add_before_after_shortcode( $attr ) { | |
$attr = wp_parse_args( | |
$attr, | |
array( |
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 wpbasis_dashboard_content() | |
* Pulls in the new dashboard page content from plugin file | |
***************************************************************/ | |
function wpbasis_dashboard() { | |
/* check for a dashboard content file in the theme folder */ | |
if( file_exists( STYLESHEETPATH . '/wpbasis/dashboard.php' ) ) { | |
/* load the dashboard content file from the theme folder */ | |
get_template_part( 'wpbasis/dashboard', 'content' ); |
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 terms for the taxonomy */ | |
$terms = get_terms( | |
'taxonomy_name_here', | |
array( | |
'hide_empty' => false | |
) | |
); |
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
/** | |
* function spts_site_options() | |
* sets the options which appear on the theme options page under | |
* appearance in the dashboard. | |
* for a detailed list of all the example options that can be used here see | |
* https://github.com/devinsays/options-framework-plugin/blob/master/options-check/options.php | |
* @param (array) $options an array of options to filter | |
* @filtered $of_options | |
* @return (array) $options to new array of options to use | |
*/ |
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 wpmark_get_option() | |
* gets a theme options specificed from the options table | |
* @param (string) $name is the name of the options to get | |
* @param (string) $default is the default value to return if no value is present | |
*/ | |
function wpmark_get_option( $name, $default = false ) { | |
/* get the options framework setting 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 | |
/** | |
* function optionsframework_option_name() | |
* | |
* overwrites the function in the options framework which | |
* names the options value that stores all the options | |
*/ | |
function optionsframework_option_name() { | |
/* get the options framework setting from options */ |
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 wpmark_add_wpbb_taxonmies() | |
* adds new taxonomies for jobs | |
* @param (array) $tax is the current array of taxonomies to add | |
* @return (array) $tax is the new array of modified taxonomies to add | |
*/ | |
function wpmark_add_wpbb_taxonmies( $tax ) { | |
$tax[ 'country' ] = array( |
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 wpmark_add_wpbb_fields() | |
* @param (array) $fields is an array of current fields in the filter | |
* @return (array) $fields is the newly modified array of fields | |
* | |
* each array passed here should contain the following: | |
* array( | |
* 'name' => 'the label given to the field used in the admin', | |
* 'id' => 'meta key used when saving the data as post meta - should be prefixed with _wpbb_job_', |
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 | |
/* setup a counter for the sections to use as class */ | |
$counter = 0; | |
/* loop through each section */ | |
foreach( $sections as $section ) { | |
/* increment the counter */ | |
$counter++; | |