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
$cache = JFactory::getCache('', 'Output'); //This is how you get the instance of 'Output' cache handler, default is 'Callback' which needs a method to call and it will cache the output of the method, but If you want to cache a variable or an object or array ... like a vbug | |
$cache->setCaching(1); //force caching as caching can be disabled globally from joomla 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 ( false === ( $cache_data = $cache->get( 'your_key_here', '' ) ) ) { | |
// we are here, means there is no data in cache. so let's put something in cache | |
$cache_data = 'I fucking love Joomla documentation!'; | |
//now cache the data $cache_data | |
$cache->store($data, 'your_key_here', '' ); //if cache stored | |
} | |
//$cache_data is the data we get from cache | |
var_dump($cache_data); |
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 | |
if(method_exists('CBXLatestTweetsHelper', 'cbxlatesttweets_display')){ | |
//prepare the params, same params as shortcode | |
$attr = array(); | |
$attr['username'] = 'codeboxr'; //at least the username param is needed | |
//call the function to display tweets | |
CBXLatestTweetsHelper::cbxlatesttweets_display($attr); |
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 admin_init() { | |
//register settings sections | |
foreach ( $this->settings_sections as $section ) { | |
if ( false == get_option( $section['id'] ) ) { | |
$section_default_value = $this->getDefaultValueBySection( $section['id'] ); | |
add_option( $section['id'], $section_default_value ); |
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
$login_url = wp_login_url(); | |
if(is_singular()){ | |
$login_url = wp_login_url( get_permalink() );; | |
} | |
else{ | |
global $wp; | |
//$login_url = wp_login_url( home_url( $wp->request ) );; | |
$login_url = wp_login_url( home_url( add_query_arg(array(),$wp->request) ) );; | |
} |
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 lt IE 9]> | |
<script type='text/javascript' src='assets/js/css3-mediaqueries.min.js?ver=1.0'></script> | |
<![endif]--> | |
<!--[if lt IE 9]> | |
<script type='text/javascript' src='assets/js/html5shiv.min.js?ver=3.7'></script> | |
<![endif]--> | |
<!--[if lt IE 9]> | |
<script type='text/javascript' src='assets/js/html5shiv-printshiv.min.js?ver=3.7'></script> | |
<![endif]--> | |
<!--[if lt IE 9]> |
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
$forms_modified = array(); | |
if ( get_option( 'ninja_forms_load_deprecated', false ) ) { | |
$forms = Ninja_Forms()->forms()->get_all(); | |
foreach ( $forms as $form_id ) { | |
$forms_modified[ $form_id ] = Ninja_Forms()->form( $form_id )->get_setting( 'form_title' );; | |
} | |
} else { | |
$forms = Ninja_Forms()->form()->get_forms(); |
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(class_exists('CBXWPBookmarkHelper')){ | |
//get total bookmark count for category by category id $cat_id | |
$bookmark_category_count = CBXWPBookmarkHelper::getTotalBookmarkByCategory($cat_id); | |
} |
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
[title]Example of different shortcodes[/title] | |
[margin] | |
[content]<strong>Button shortcode</strong>[/content] | |
[button url="http://themeboxr.com" type="defaul" text="Default"] [button url="http://themeboxr.com" type="primary" text="Primary"] [button url="http://themeboxr.com" type="success" text="Success"] [button url="http://themeboxr.com" type="info" text="info"] [button url="http://themeboxr.com" type="warning" text="Warning"] [button url="http://themeboxr.com" type="danger" text="Danger"] | |
[margin] | |
[content]<strong> Alerts shortcode</strong>[/content] | |
[alert type="info" text="This is Alert Info"] [alert type="success" text="This is Alert Success"] [alert type="danger" text="This is Alert Danger "] | |
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
https://codeboxr.com/product/cbx-wordpress-ready-mix/ | |
https://wordpress.org/plugins/cbxwpreadymix/ | |
Team: [cbxwpreadymix_team] | |
Possible Params: | |
[cbxwpreadymix_team column="4" hide_designation="show" hide_social="show" count="9" order="DESC" orderby='title'] | |
column default value '3' possible values 1-12 | |
hide_designation default 'show' possible values show, hide | |
hide_social default 'show' possible values show, hide |