Skip to content

Instantly share code, notes, and snippets.

View MarieComet's full-sized avatar

Marie Comet MarieComet

View GitHub Profile
<?php
use Automattic\WooCommerce\Blocks\Package;
/*
Plugin Name: Remove WooCommerce patterns
Version: 1.0.0
Plugin URI: https://mariecomet.fr/
Description: Remove all WooCommerce patterns
Author: Marie Comet
Author URI: https://mariecomet.fr/
@MarieComet
MarieComet / elementor-posts-widget-multiple-post-types.php
Last active March 18, 2024 22:57
Allow to select multiple post types as query source in Elementor Posts widget
<?php
function elementor_posts_widget_multiple_post_types( $element, $args ) {
$element->update_control(
'posts_post_type', // control ID
[
'type' => Elementor\Controls_Manager::SELECT2,
'multiple' => true,
]
);
}
@MarieComet
MarieComet / accessconfig.scss
Last active January 26, 2023 11:16
Access Config with variables
@charset "UTF-8";
/*
* AccessConfig Variables
*/
:root {
--accessconfig-dark: #323644;
--accessconfig-dark-rgb: 50, 54, 68;
--accessconfig-light: #fff;
@MarieComet
MarieComet / divi-overlays-ie-edge.css
Created October 21, 2018 15:17
Fallback for Divi overlays option in EDGE/IE
/* IE / EDGE */
.overlayDiv {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
}
var addFilter = wp.hooks.addFilter;
var Fragment = wp.element.Fragment;
var RichText = wp.editor.RichText;
var InnerBlocks = wp.editor.InnerBlocks;
var el = wp.element.createElement;
// Hook function to add a caption to the core code block
function addColorColumns(settings) {
@MarieComet
MarieComet / divi-custom-link-options.php
Last active July 25, 2018 08:06
Add divi general settings theme options
@MarieComet
MarieComet / divi-theme-options.php
Created June 8, 2018 09:58
Add Divi theme options
if ( is_admin() ) {
add_filter( 'et_epanel_layout_data', 'custom_et_epanel_layout_data' );
}
/**
* Hooked into the et_epanel_layout_data filter
* Add additional social media options to the Divi Theme Options panel
*
* @param $options
*
* @return array