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('init', 'cloneRole'); | |
function cloneRole() | |
{ | |
global $wp_roles; | |
if ( ! isset( $wp_roles ) ) | |
$wp_roles = new WP_Roles(); | |
$adm = $wp_roles->get_role('administrator'); |
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
RewriteEngine on | |
#eccezioni pagine specifiche | |
RewriteCond %{REQUEST_URI} !/catalogues | |
RewriteCond %{REQUEST_URI} !/gallery-parquet-pavimenti-legno | |
RewriteCond %{REQUEST_URI} !/parquet/natural-wood-floor/types-of-wood | |
RewriteCond %{REQUEST_URI} !/parquet/natural-wood-floor/antico-asolo-3-ply | |
RewriteCond %{REQUEST_URI} !/parquet/natural-wood-floor/antico-asolo-2-ply | |
RewriteCond %{REQUEST_URI} !/parquet/natural-wood-floor/parquet-mosaici-dasolo | |
RewriteCond %{REQUEST_URI} !/contacts |
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 | |
//perchè funzioni strtotime è necessario sostituire / con - | |
$data = strtotime(str_replace('/', '-' ,$_POST['data_nascita_cliente']); | |
//ottengo il formato richiesto | |
$data_nascita_cliente = date('Y-m-d', $data)); |
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 fix_gmaps_api_key() { | |
if(mb_strlen(acf_get_setting("google_api_key")) <= 0){ | |
acf_update_setting("google_api_key", "AIzaSyDXiH2aFtmW-8TYE2Tyll702wwlwyOsEZQ"); | |
} | |
} | |
add_action( 'admin_enqueue_scripts', 'fix_gmaps_api_key' ); |
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 | |
// *F001* filtro per permettere il redirect | |
//allow redirection, even if your theme starts to send output to the browser | |
add_action('init', 'clean_output_buffer'); | |
function clean_output_buffer() { | |
ob_start(); | |
} |
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($) { | |
$('#form_tesseramento #ek_province').on('change', function(){ | |
var provincia_id = $(this).val(); | |
console.log(provincia_id); | |
jQuery.ajax({ | |
url : postdata.ajax_url, //definito riga 8 precedente script | |
type : 'post', | |
data : { | |
action : 'ek_skipay_getComuneByProvincia', //function ajax da richiamare | |
provincia_id : provincia_id //dato da passare, in questo caso id estratto da option selezionata |
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_filter('manage_upload_columns', 'size_column_register'); | |
function size_column_register($columns) { | |
$columns['dimensions'] = 'Dimensions'; | |
return $columns; | |
} | |
add_action('manage_media_custom_column', 'size_column_display', 10, 2); |
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 | |
$id = get_the_ID(); | |
$taxonomy = 'your-taxonomy'; | |
$terms = get_the_terms( $id, $taxonomy ); | |
foreach ($terms as $term) { | |
// Here you can display the terms how you want | |
echo 'TERM: '.$term->name; |
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 | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.com | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query | |
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php | |
*/ | |
$args = array( |
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
$query = new WP_Query( array( | |
'post_type' => array('salplesk_profili','salplesk_aziende','salplesk_offerte'), | |
'posts_per_page' => -1, | |
'fields' => 'ids' | |
) ); |
OlderNewer