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', function () { | |
if (function_exists('gdpr_cookie_is_accepted')) : | |
if (gdpr_cookie_is_accepted('thirdparty')) : | |
//Aquí va el código a ejecutar |
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
.chosen-container-single .chosen-single { | |
border: 0; | |
box-shadow: none; | |
background: 0; | |
} | |
.chosen-container { | |
font-size: 15px; | |
} |
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
//https://ivanbarreda.com/wptv-shortcode/ | |
/* | |
Guide of css elements in plugin | |
.wptv_novideos | |
.wptv_container |
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 | |
//https://es.wordpress.org/plugins/acf-to-rest-api/ | |
//Versión minima para funcione 3 | |
define( 'ACF_TO_REST_API_REQUEST_VERSION', 3 ); | |
// Opción de mostrar o no en RestAPI | |
add_filter( 'acf/rest_api/field_settings/show_in_rest', '__return_true' ); |
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 | |
/* | |
Plugin Name: WP-JSON.com Cambiar el SLUG Base | |
Plugin URI: https://wp-json.com/cammbiar-slug-base | |
Description: WP-JSON.com Cambiar el SLUG Base | |
Version: 1.0 | |
Author: Ivan Barreda | |
Author URI: https://ivanbarreda.com | |
License: GPL3 |
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 | |
/* | |
Plugin Name: WP-JSON.com Cambiar el SLUG Base | |
Plugin URI: https://wp-json.com/cammbiar-slug-base | |
Description: WP-JSON.com Cambiar el SLUG Base | |
Version: 1.0 | |
Author: Ivan Barreda | |
Author URI: https://ivanbarreda.com | |
License: GPL3 | |
*/ |
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('login_form', 'ib_extra_field_login_form_func'); | |
function ib_extra_field_login_form_func() | |
{ | |
?> | |
<p> | |
<label for="ib_extra_login_field">My extra field<br> | |
<input type="text" tabindex="20" size="20" value="" class="input" id="ib_extra_login_field" name="ib_extra_login_field"></label> |
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
//Check if the header HTTP_CF_CONNECTING_IP exist | |
if (isset($_SERVER["HTTP_CF_CONNECTING_IP"])) { | |
$_SERVER['REMOTE_ADDR'] = $_SERVER["HTTP_CF_CONNECTING_IP"]; | |
} | |
/* That's all, stop editing! Happy blogging. */ |
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
//bulk_actions- The Hook | |
//edit-shop The Custom Action | |
//_order The Post Type | |
add_filter( 'bulk_actions-force-guest-owner_order', 'buzz_force_guest_owner_woocommerce_order_bulk', 20, 1 ); | |
function buzz_force_guest_owner_woocommerce_order_bulk( $actions ) { | |
$actions['force_guest_owner'] = __( 'Force Guest Owner', 'woocommerce' ); | |
return $actions; | |
} | |
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 get_all_orders_that_have_a_product_variation( $variation_id ){ | |
global $wpdb; | |
// Getting all Order IDs with that variation ID | |
$order_ids_arr = $wpdb->get_col( $wpdb->prepare( " | |
SELECT DISTINCT items.order_id | |
FROM {$wpdb->prefix}woocommerce_order_items AS items | |
LEFT JOIN {$wpdb->prefix}woocommerce_order_itemmeta AS itemmeta ON items.order_item_id = itemmeta.order_item_id | |
WHERE meta_key LIKE '_variation_id' |
NewerOlder