Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

David Decker deckerweb

🏠
Working from home
Block or report user

Report or block deckerweb

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@deckerweb
deckerweb / maybe-add-post-states-for-blocks.php
Last active Nov 8, 2019
Adds optional new post states if a Post has Blocks, has the "Classic" Block or no Blocks at all. *** Note: This respects also the popular "Disable Gutenberg" plugin (free, by Jeff Starr) which allows for disabling the "Block Editor" for entire post types.
View maybe-add-post-states-for-blocks.php
<?php
/** Do NOT include the opening php tag */
if ( ! function_exists( 'ddw_cf_maybe_add_post_state_blocks' ) ) :
add_filter( 'display_post_states', 'ddw_cf_maybe_add_post_state_blocks', 10, 2 );
/**
* Adds optional new post states if a Post has Blocks, has the "Classic" Block or no Blocks at all.
*
@deckerweb
deckerweb / sermon-manager-german-bibles.php
Last active Nov 6, 2019
Plugin - Sermon Manager for WordPress: Adds German Bible translations from biblia.com to the Bible select field in the plugin settings - that way you can offer also verse links in German language ;-)
View sermon-manager-german-bibles.php
<?php
/** Do NOT include the opening php tag */
if ( ! function_exists( 'ddw_sm_bible_selection' ) ) :
add_filter( 'sm_verse_settings', 'ddw_sm_bible_selection' );
/**
* Plugin: Sermon Manager for WordPress
* For "Verse" settings add German bible versions from biblia.com
@deckerweb
deckerweb / inc-remove-comments.php
Created Oct 11, 2019 — forked from functionsfile/inc-remove-comments.php
Remove WordPress comments functionality.
View inc-remove-comments.php
<?php
/**
* Code taken from the plugin 'Remove Comments Absolutely' by Frank Bültge
* http://wpengineer.com/2230/removing-comments-absolutely-wordpress/
* https://github.com/bueltge/Remove-Comments-Absolutely/blob/master/remove-comments-absolute.php
* http://bueltge.de/
*/
if ( ! class_exists( 'Remove_Comments_Absolute' ) ) {
add_action( 'plugins_loaded', array( 'Remove_Comments_Absolute', 'get_object' ) );
@deckerweb
deckerweb / elementor-remove-wp-widgets.php
Created Sep 11, 2019
For Elementor Page Builder Plugin: Remove the regular WordPress Widgets from the left-hand Panel in the Live Editor. --- CAUTION: Use at your own risk! No support here!!!
View elementor-remove-wp-widgets.php
<?php
/** Do NOT include the opening php tag */
if ( ! function_exists( 'ddw_tweak_elementor_remove_wp_widgets' ) ) :
add_filter( 'elementor/widgets/black_list', 'ddw_tweak_elementor_remove_wp_widgets' );
/**
* Optionally remove all WordPress widgets from the Elementor Live Editor.
* Note: A native Elementor filter is used.
@deckerweb
deckerweb / make-elementor-default-editor.php
Created Sep 10, 2019 — forked from heyfletch/make-elementor-default-editor.php
Make Elementor the Default Editor, Not the WordPress Editor (Gutenberg or Classic)
View make-elementor-default-editor.php
<?php
/**
* Make Elementor the default editor, not the WordPress Editor (Gutenberg or Classic)
* Clicking the page title will take you to the Elementor editor directly
* Even non-Elementor-edited pages will become Elementor-edited pages now
* You can revert by clicking the "Back to WordPress Editor" button
*
* Author: Joe Fletcher, https://fletcherdigital.com
* URL: https://gist.github.com/heyfletch/7c59d1c0c9c56cbad51ef80290d86df7
@deckerweb
deckerweb / v1-tbex-unloading-translations-premium-addons.php
Last active May 13, 2019
Toolbar Extras plugin: Unload also translations for the Elementor Add-On "Premium Addons for Elementor" (free, by Leap13) --- website: https://toolbarextras.com
View v1-tbex-unloading-translations-premium-addons.php
<?php
/** Do NOT include the opening php tag */
/** Version 1 - strict unloading */
if ( ! function_exists( 'ddw_tbex_unload_textdomain_premium_addons' ) ) :
add_action( 'init', 'ddw_tbex_unload_textdomain_premium_addons' );
/**
@deckerweb
deckerweb / functions.php
Created Apr 8, 2019 — forked from nickcernis/functions.php
Wrap Custom HTML WordPress blocks in a div wrapper
View functions.php
<?php
add_filter( 'render_block', 'custom_wrap_html_block_output', 10, 2 );
/**
* Wrap output of HTML blocks.
*
* @param string $block_content Original block content.
* @param array $block Block info.
* @return string The block content with a wrapper.
*/
@deckerweb
deckerweb / wp-admin-add-posts-state.php
Created Mar 26, 2019 — forked from martijn94/wp-admin-add-posts-state.php
Snippet to add post state to a WordPress page
View wp-admin-add-posts-state.php
<?php
//======================================================================
// Add post state to the projects page
//======================================================================
add_filter( 'display_post_states', 'ecs_add_post_state', 10, 2 );
function ecs_add_post_state( $post_states, $post ) {
View elementor-form-additional-webhook.php
<?php
/**
* Plugin Name: Elementor Form Additional Webhook
* Plugin URI: https://coreysalzano.com/
* Description: Adds a second Webhook to the Lot Wizard trial signup form
* Version: 1.0.0
* Author: Corey Salzano
* Author URI: https://github.com/mistercorey
* License: GPLv2 or later
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
@deckerweb
deckerweb / tbex-custom-cap-unloading-translations.php
Last active Dec 21, 2018
Toolbar Extras plugin v1.3.9+: Set a custom capability for unloading translations
View tbex-custom-cap-unloading-translations.php
<?php
/** Do NOT include the opening php tag */
if ( function_exists( 'tbex_capability_unloading_translations' ) ) :
add_filter( 'tbex_filter_capability_unloading_translations', 'tbex_capability_unloading_translations' );
/**
* Set a custom capability for the Smart Tweak feature for unloading certain translations.
* This filter is available since Toolbar Extras version 1.3.9
*
You can’t perform that action at this time.