Skip to content

Instantly share code, notes, and snippets.

View oxygen-add-extra-tags-to-the-div-element.php
<?php
add_action("oxygen_after_add_components", function () {
global $oxygen_vsb_components;
$div_component = $oxygen_vsb_components["div_block"];
$div_params = &$div_component->options["params"];
foreach ($div_params as $i => $param) {
if ($param["param_name"] == "tag") {
@ERROPiX
ERROPiX / oxy-cm-theme.scss
Created Sep 21, 2020
An Advanced Scripts snippet to enhance the Oxygen code editor theme
View oxy-cm-theme.scss
/*
Title: Oxygen Code Editor Theme
Type: CSS > Compile SCSS Code
Location: Custom Hooks
Hook name: oxygen_enqueue_ui_scripts
Priority: 10
*/
#oxygen-ui {
.cm-s-default {
@ERROPiX
ERROPiX / cf7-conditional-assets-loader.php
Created Oct 22, 2020
Load CF7 assets in whitelisted pages only
View cf7-conditional-assets-loader.php
/*
Title: Load CF7 assets in whitelisted pages only
Type: PHP > Custom Code
Location: Plugins loaded
Priority: 10
*/
// stop loading Contact form 7 JavaScript and CSS files
add_filter('wpcf7_load_js', '__return_false');
add_filter('wpcf7_load_css', '__return_false');
@ERROPiX
ERROPiX / remove-comments-menus.php
Created Sep 21, 2020
Remove comments links from admin bar and admin menu
View remove-comments-menus.php
/*
Title: Hide Comments Menu
Type: PHP > Custom Code
Location: Init
Priority: 10
*/
// Remove comments from admin bar
add_action('wp_before_admin_bar_render', function () {
global $wp_admin_bar;
View sisable-gutenberg-fullscreen-mode.js
/*
Title: Disable Gutenberg fullscreen mode
Type: JavaScript > Custom Code
Location: Custom Hooks
Hook name: enqueue_block_editor_assets
Priority: 10
*/
window.addEventListener('load', function() {
if (wp.data.select('core/edit-post').isFeatureActive('fullscreenMode')) {