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
/* | |
* | |
* Add Twitter Bootstrap 3 markup to Yoast Breadcrumbs | |
* | |
*/ | |
add_filter( 'wpseo_breadcrumb_output_wrapper', 'my_breadcrumbs_wrapper', 10, 1 ); | |
add_filter( 'wpseo_breadcrumb_output_class', 'my_breadcrumbs_wrapper_class', 10, 1 ); | |
add_filter( 'wpseo_breadcrumb_single_link_wrapper', 'my_breadcrumbs_wrapper_element', 10, 1 ); | |
function my_breadcrumbs_wrapper($wrapper){ |
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
function qtranxf_custom_language_chooser($style='', $id='') { | |
global $q_config; | |
if($style=='') $style='text'; | |
if(is_bool($style)&&$style) $style='image'; | |
if(is_404()) $url = get_option('home'); else $url = ''; | |
if($id=='') $id = 'qtranslate'; | |
$id .= '-chooser'; | |
$flag_location=qtranxf_flag_location(); | |
switch($style) { | |
case 'image': |
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 | |
$province = array( | |
'AG' => 'Agrigento', | |
'AL' => 'Alessandria', | |
'AN' => 'Ancona', | |
'AO' => 'Aosta', | |
'AR' => 'Arezzo', | |
'AP' => 'Ascoli Piceno', | |
'AT' => 'Asti', | |
'AV' => 'Avellino', |
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_action( 'wpo_wcpdf_after_order_data', 'wpo_wcpdf_receipt_number', 10, 2 ); | |
function wpo_wcpdf_receipt_number ($template_type, $order) { | |
global $wpo_wcpdf; | |
if ($template_type == 'receipt') { | |
// get number from order | |
$receipt_number = get_post_meta( $order->id, 'Receipt Number', true ); | |
// get number from database if no number present yet | |
if (empty($receipt_number)) { | |
$receipt_number = get_option( 'wcpdf_next_receipt_number', 1001 ); // change 1001 to define the first number |
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 | |
function modify_setefi_plugin_params( $value ) { | |
// consente di impostare la lingua della pagina di pagamento sul server della banca in base alla lingua corrente nello shop | |
/*if( ICL_LANGUAGE_CODE == 'it' ) { | |
$value['language'] = 'ITA'; | |
} else if (ICL_LANGUAGE_CODE == 'en') { | |
$value['language'] = 'USA'; | |
} */ |
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 | |
function modify_setefi_plugin_params( $value ) { | |
$value['currencyCode'] = '840'; | |
return $value; | |
} | |
add_filter( 'wc_setefi_payment_args', 'modify_setefi_plugin_params' ); | |
?> |
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
// leaflet.js required | |
// the properties array can contain multiple pointers (markers) and is included with wordpress wp_localize_script | |
//var properties = [{"title":"Some title","lat":"42.75410269263614","lng":"12.758049219846725","thumb":"http:\/\/www.mysite.ext\/wp-content\/uploads\/2016\/05\/image.jpg","url":"http:\/\/www.www.mysite.ext\/"}]; | |
var map; | |
function render_map( $el ) { | |
var $markers = properties; | |
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
function properties_map_script() { | |
wp_register_style( | |
'leaflet', | |
"https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.3.1/leaflet.css", | |
array(), | |
null | |
); | |
wp_register_script( |
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
a:5:{s:12:"pa_categoria";a:7:{s:4:"name";s:12:"pa_categoria";s:5:"value";s:7:"Orologi";s:8:"position";i:0;s:10:"is_visible";i:1;s:12:"is_variation";i:1;s:11:"is_taxonomy";i:1;s:24:"is_create_taxonomy_terms";i:1;}s:13:"pa_collezione";a:7:{s:4:"name";s:13:"pa_collezione";s:5:"value";s:4:"Octo";s:8:"position";i:2;s:10:"is_visible";i:1;s:12:"is_variation";i:1;s:11:"is_taxonomy";i:1;s:24:"is_create_taxonomy_terms";i:1;}s:9:"materiale";a:6:{s:4:"name";s:9:"Materiale";s:5:"value";s:8:"Ceramica";s:8:"position";i:3;s:10:"is_visible";i:1;s:12:"is_variation";i:1;s:11:"is_taxonomy";i:0;}s:10:"dimensione";a:6:{s:4:"name";s:10:"Dimensione";s:5:"value";s:5:"40 MM";s:8:"position";i:4;s:10:"is_visible";i:1;s:12:"is_variation";i:1;s:11:"is_taxonomy";i:0;}s:12:"pa_materiale";a:7:{s:4:"name";s:12:"pa_materiale";s:5:"value";s:8:"Ceramica";s:8:"position";i:3;s:10:"is_visible";i:1;s:12:"is_variation";i:1;s:11:"is_taxonomy";i:1;s:24:"is_create_taxonomy_terms";i:1;}} |
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_action( 'wp_ajax_ccom_regenerate', function() { | |
$offset = empty( $_POST['offset'] ) | |
? 0 : intval( $_POST['offset'] ); | |
$args = [ | |
'status' => array('wc-completed'), | |
'type' => 'shop_order', | |
'limit' => 100, | |
'offset' => $offset, | |
]; |