Skip to content

Instantly share code, notes, and snippets.

View bantunesm's full-sized avatar
🦊

Bruno ANTUNES bantunesm

🦊
View GitHub Profile
@bantunesm
bantunesm / index.html
Created February 23, 2022 23:58
Slick Slider with auto play YouTube, Vimeo and HTML5 video
<header>
<h1>SITE TITLE</h1>
<nav>
<ul>
<li><a href="#">HOME</a></li>
<li><a href="#">ABOUT</a></li>
<li><a href="#">SERVICES</a></li>
<li><a href="#">CONTACT</a></li>
</ul>
</nav>
@bantunesm
bantunesm / googleSheets.js
Last active June 25, 2022 02:13
Scriptable widget Google Sheets for iOS
let spreadsheetid = "ID Spreadsheet"
let sheetname = "Sheet Name"
let apikey = "COMPLETE" // Activate Google Sheets Service
const endpoint = 'https://sheets.googleapis.com/v4/spreadsheets/' + spreadsheetid + '/values/' + sheetname + '?alt=json&key=' + apikey;
console.log(endpoint)
// The URL of your JSON endpoint
@bantunesm
bantunesm / wysiwyg.php
Created June 28, 2022 06:42
Add options to wysiwyg Wordpress
// Options wisywg
add_filter('mce_buttons_2', function( $buttons ) {
array_shift( $buttons );
array_unshift( $buttons, 'fontsizeselect');
return $buttons;
} );
add_filter( 'tiny_mce_before_init', function( $initArray ){
$initArray['theme_advanced_font_sizes'] = "9px 10px 12px 13px 14px 16px 18px 22px 24px 28px 32px 36px";
@bantunesm
bantunesm / gist:bafedb58d85a8524618d64078d4b0486
Created March 21, 2023 07:24
Utiliser des champs meta dans la box Données produits de Woocommerce
// Ajouter le champ de case à cocher à l'interface d'administration WooCommerce
add_action( 'woocommerce_product_options_general_product_data', 'custom_product_checkbox' );
function custom_product_checkbox() {
woocommerce_wp_checkbox( array(
'id' => 'is_rare',
'label' => __( 'Is Rare', 'woocommerce' ),
'description' => __( 'Check this box if the product is rare', 'woocommerce' ),
'desc_tip' => true,
) );
}
@bantunesm
bantunesm / gist:b9e33a422ea8038c549ab76af685ea3b
Created August 25, 2023 09:01
WordPress Importer Hooks for decoding base64 and unserialize content
<?php
/**
* WordPress Importer Hooks for decoding base64 and unserialize content
* @see https://medium.com/@bantunes/wordpress-comment-jai-importé-500-articles-encodés-en-base64-d-un-builder-à-gutenberg-29c3d9d9e694
* @author Bruno ANTUNES
* @version 1.0.0
*/