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
if ( function_exists( 'cbxscratingreview_postAvgRatingInfo' ) ) | |
{ | |
echo cbxscratingreview_postAvgRatingRender( get_the_ID() ); | |
} | |
if(function_exists('cbxscratingreview_reviewformRender')){ | |
echo cbxscratingreview_reviewformRender(); | |
} | |
if ( function_exists( 'cbxscratingreview_postReviewsRender' ) ) |
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 | |
/** | |
* @package Joomla.Plugin | |
* @subpackage System.CBXDebug | |
* | |
* @copyright Copyright (C) 2018 Codeboxr.com. All rights reserved. | |
* @license GNU General Public License version 2 or later; see LICENSE.txt | |
*/ | |
defined('_JEXEC') or die; |
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
//category doesn't show as admin column | |
$cat_args = apply_filters('', array( | |
'hierarchical' => true, | |
'label' => esc_html__('Categories', 'cbxgooglemappro'), | |
'show_ui' => true, | |
'query_var' => true, | |
'rewrite' => array( 'slug' => 'cbxgooglemapcat' ), | |
'singular_label' => esc_html__('Categories', 'cbxgooglemappro') | |
)); | |
register_taxonomy( 'cbxgooglemapcat', array( 'cbxgooglemap' ), $cat_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
/** | |
* Setup a post object and store the original loop item so we can reset it later | |
* | |
* @param obj $post_to_setup The post that we want to use from our custom loop | |
*/ | |
function setup_admin_postdata( $post_to_setup ) { | |
//only on the admin side | |
if ( is_admin() ) { |
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
if(JComponentHelper::isEnabled('com_authorposts', true)){ | |
$author_id = ''; //set author id here | |
require_once JPATH_SITE . '/components/com_authorposts/helpers/route.php'; | |
$author_archive_link = AuthorpostsHelperRoute::getAuthorRoute($author_id, $language = 0); | |
} |
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
$url = 'https://www.youtube.com/watch?v=08f0tiLdk7w'; //a youtube video url | |
$autoembed = new WP_Embed(); //initialize the wordpress oEmbed helper class | |
$content = $autoembed->autoembed($url); //let's parse the url and get the embeded 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
//put this code in functions.php | |
if ( ! function_exists( 'interested_in_product' ) ) { | |
/** | |
* Returns url that takes to contact page with product or product with variation selected | |
* | |
* @param int $page_id page id where the contact form is added | |
* @param string $product_id main product id | |
* @param string $variation_id variation, you should put product id if you want to add variation id | |
* | |
* @return string |
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
/** | |
* Is the frontpage a page ? | |
* | |
* @return bool | |
*/ | |
function is_frontpage_is_page(){ | |
if('page' == get_option( 'show_on_front') && get_option( 'page_on_front' ) && is_page( get_option( 'page_on_front' ) )) return true; | |
return 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
.placeholdercolor(@color, @opacity: 1){ | |
&::-webkit-input-placeholder { /* Chrome/Opera/Safari */ | |
color: @color !important; | |
opacity: @opacity; | |
} | |
&::-moz-placeholder { /* Firefox 19+ */ | |
color: @color !important; | |
opacity: @opacity; | |
} | |
&:-ms-input-placeholder { /* IE 10+ */ |