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
add_filter( 'woocommerce_shortcode_products_query', | |
function ( $query_args, $attributes, $type ) { | |
if ( $type == 'best_selling_products' ) { | |
unset( $query_args['meta_key'] ); | |
unset( $query_args['meta_query'] ); | |
add_filter( 'posts_clauses', | |
function ( $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
//save_topic_meta_boxes method is hooked from 'save_post' | |
//this just code sample from my code | |
/** | |
* Save topic meta boxes | |
* | |
* @param $topic_id | |
* | |
* @return mixed |
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
add_action( 'woocommerce_before_account_orders', 'woo_my_orders_display_status' ); | |
function woo_my_orders_display_status( $has_orders = false ) { | |
//if($has_orders){ | |
$post_status = isset( $_REQUEST['post_status'] ) ? sanitize_text_field( $_REQUEST['post_status'] ) : 'all'; | |
$order_page_url = get_permalink( wc_get_page_id( 'orders' ) ); | |
echo '<div class="clear clearfix"></div>'; |
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
<!-- Global site tag (gtag.js) - Google Analytics --> | |
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-87486323-2"></script> | |
<script> | |
window.dataLayer = window.dataLayer || []; | |
function gtag(){dataLayer.push(arguments);} | |
gtag('js', new Date()); | |
gtag('config', 'UA-87486323-2'); | |
</script> |
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
echo do_shortcode('[cbxwpbookmarkbtn object_id="'.$post->ID.'" object_type="'.$post->post_type.'"]'); | |
//echo do_shortcode('[cbxwpbookmarkbtn]'); |
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
add_filter('number_format_i18n', 'wpbanglatools_i18n_digit', 10, 1); | |
add_filter('date_i18n', 'wpbanglatools_i18n_date',10,2); | |
function wpbanglatools_i18n_digit($en_number){ | |
$en_digits = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9'); | |
$bn_digits = array('০', '১', '২', '৩', '৪', '৫', '৬', '৭', '৮', '৯'); | |
$en_number = str_replace($en_digits, $bn_digits, $en_number); | |
//var_dump($en_number); | |
return $en_number; | |
} |
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
/** | |
* on init call shortcode function | |
*/ | |
add_action('init', 'init_shortcodes'); | |
/** | |
* Init shortcodes | |
*/ | |
function init_shortcodes(){ | |
add_shortcode('cbxwoodigitalfiles_simple_product', 'cbxwoodigitalfiles_simple_product_display'); |
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
[05-Sep-2019 07:51:15 UTC] Array | |
( | |
[PlateNumber] => LSN4149 | |
[VehicleList] => Array | |
( | |
[ConsultaID] => 3369212 | |
[Placa] => LSN4149 | |
[Chassi] => 8A1LZBW3TCL848007 | |
[Fabricante] => RENAULT | |
[GrupoModelo] => FLUENCE |
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 | |
/** | |
* Plugin Name: CBX Simple Restrict Content | |
* Description: Simple or hard coded wordpress content restrict for any role | |
* Author: Codeboxr | |
* Version: 1.0.0 | |
* Licence: MIT | |
* Author URI: https://codeboxr.com | |
*/ | |
//if you want to use this code in theme ignore lines from 1-10 or use code from 11 to bottom of this page. |
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($) { | |
$(document).ready(function($) { | |
//hash link click | |
$('a[href*="#"]').on('click', function(e) { | |
e.preventDefault(); | |
//console.log('hash clicked'); //uncomment this link to understand if click is working |