This file contains 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
<gmap-info-box :visible="infoWinOpen" :marker="infoWinPos" :offset-y="infoWinOffset.y" :offset-x="infoWinOffset.x"> | |
<div> | |
CONTENT FOR INFOBOX | |
</div> | |
</gmap-info-box> |
This file contains 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
// Linear | |
$linear : cubic-bezier(0.250, 0.250, 0.750, 0.750); | |
// Ease (defaults) | |
$ease : cubic-bezier(0.250, 0.100, 0.250, 1.000); | |
$easeIn : cubic-bezier(0.420, 0.000, 1.000, 1.000); | |
$easeOut : cubic-bezier(0.000, 0.000, 0.580, 1.000); | |
$easeInOut : cubic-bezier(0.420, 0.000, 0.580, 1.000); | |
// Cubic |
This file contains 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: Catalog Template */ | |
function renderAlphabetTermsCatalog($terms, $maxTermCountForLetter = 5) { | |
$termsTitle = array_map(function($term) { | |
return mb_convert_encoding($term->name, 'utf-8'); | |
}, $terms); | |
$lastLetter = ''; |
This file contains 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 | |
/** | |
* Excerpt content | |
*/ | |
function iv_excerpt($excerpt_length, $added) | |
{ | |
$text = apply_filters( 'the_excerpt', get_the_excerpt() ); | |
$text = preg_replace('/\[.+\]/', '', $text ); | |
$chars_text = strlen($text); | |
$text = $text." "; |
This file contains 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 | |
$primary_cat_id = get_post_meta(get_the_ID(), '_yoast_wpseo_primary_category', true); | |
if ( $primary_cat_id != null ) { | |
$category = get_category($primary_cat_id); | |
} else { | |
$categories = get_the_category(); | |
$category = $categories[0]; | |
} |
This file contains 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 | |
/* | |
* Remove '/category/' from category archive url | |
* */ | |
function remcat_function($link) { | |
return str_replace("/category/", "/", $link); | |
} | |
add_filter('user_trailingslashit', 'remcat_function'); | |
function remcat_flush_rules() { |
This file contains 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 | |
/* | |
* Search only in posts | |
* */ | |
function search_only_in_posts($query) { | |
if ($query->is_search) { | |
$query->set('post_type', 'post'); | |
} | |
return $query; | |
} |
This file contains 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 | |
/** | |
* Custom AJAX Action | |
*/ | |
function load_more_post_gallery_image_callback() { | |
$url = wp_get_referer(); | |
$post_id = url_to_postid( $url ); | |
$imageInitialCount = intval( $_POST['imageInitialCount'] ); | |
$imageLoadingCount = intval( $_POST['imageLoadingCount'] ); |
This file contains 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 | |
class CustomStyleForMenuItemWalker extends Walker_Nav_Menu { | |
function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) { | |
// add classes for menu item | |
$class_names = join( ' ', $item->classes ); | |
$class_names = ' class="' .esc_attr( $class_names ). '"'; | |
$output.= '<li id="menu-item-' . $item->ID . '"' .$class_names. '>'; | |
//first get the current category ID | |
$cat_id = $item->object_id; |
This file contains 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 | |
//add extra fields to category edit form callback function | |
function extra_category_fields( $tag ) { //check for existing featured ID | |
$t_id = $tag->term_id; | |
$cat_meta = get_option( "category_$t_id"); | |
?> | |
<tr class="form-field"> | |
<th scope="row" valign="top"><label for="cat_meta[custom_color]"><?php _e('Custom Color'); ?></label></th> | |
<td> | |
<input type="text" name="cat_meta[custom_color]" id="cat_meta[custom_color]" value="<?php echo $cat_meta['custom_color'] ? $cat_meta['custom_color'] : ''; ?>"><br /> |
NewerOlder