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
<div class="table container"> | |
<div class="table-cell"> | |
<code>display: table-cell;</code> | |
</div> | |
</div> | |
<div class="wrapper container"> | |
<div class="inline-block"> | |
<code>display: inline-block;</code> | |
</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
<?php if ( function_exists('icl_get_languages')):?> | |
<?php | |
$languages = icl_get_languages('skip_missing=N'); | |
$active = $languages[ICL_LANGUAGE_CODE]; | |
echo '<li class="has-dropdown"><a href="#">'. | |
'<i class="icon-'.ICL_LANGUAGE_CODE.' flag"></i>'. | |
'</a>'; | |
if(!empty($languages)){ | |
echo '<ul class="dropdown">'; |
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
/** | |
* Retrieve a post's terms as a list with specified format. | |
* | |
* @since 2.5.0 | |
* | |
* @param int $id Post ID. | |
* @param string $taxonomy Taxonomy name. | |
* @param string $before Optional. Before list. | |
* @param string $sep Optional. Separate items using this. | |
* @param string $after Optional. After list. |
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
/** | |
* Returns a cached json object with forecast info of a city | |
* forecast info from openweathermap.org api | |
* you need and API key | |
* | |
* @param $city string with city name | |
* @return mixed|string json object with forecast info | |
*/ | |
function get_city_weather( $city ) { | |
/** |
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
$(".goToCategory").change( function() { | |
if ( this.options[this.selectedIndex].value !== 0 ) { | |
location.href = this.options[this.selectedIndex].getAttribute('data-permalink'); | |
} | |
}); |
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
/** | |
* Removes facebook avatar URL save in user metas by wp fb autoconnect plugin | |
* requires Buddypress & wp-fb-autoconnect | |
* @global type $bp | |
*/ | |
function remove_facebook_avatar () { | |
global $bp; | |
delete_user_meta($bp->displayed_user->id, 'facebook_avatar_full'); | |
delete_user_meta($bp->displayed_user->id, 'facebook_avatar_thumb'); | |
} |
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 bulk_insert_buddypress_fields ( $group_id, $parent_id, $type ) { | |
$fields = | |
"Afganistán | |
Albania | |
Alemania | |
Andorra | |
Angola | |
Anguilla | |
Antártida | |
Antigua y Barbuda |
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
/*********************************************************************************** | |
* 2. FILTRO POR PRODUCTOS EN PEDIDOS | |
***********************************************************************************/ | |
define('FILTRO_PRODUCT_NAME', 'filtro_producto'); | |
define('ORDER_POST_TYPE', 'shop_order'); | |
/** | |
* Añade la query de las sedes | |
* Hook 'pre_get_posts' |
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('wpcf7_before_send_mail', 'cf7_create_post', 10, 1); | |
function cf7_create_post( $data ) { | |
extract($data->posted_data); | |
$post_id = wp_insert_post( array( | |
'post_status' => 'draft', | |
'post_title' => $nombre, | |
'post_content' => $consulta |