Skip to content

Instantly share code, notes, and snippets.

View timelsass's full-sized avatar
🦠

Tim Elsass timelsass

🦠
View GitHub Profile
@timelsass
timelsass / WPSE356451-toggle-comment-column.php
Created January 15, 2020 22:00
Adds screen option for toggle the display of the comment column in WP Dashboard comments list.
<?php
/**
* Plugin Name: WPSE356451 Toggle Comment Column
* Description: Adds screen option for toggle the display of the comment column in WP Dashboard comments list.
* Plugin URI: https://wordpress.stackexchange.com/questions/356451/add-a-comment-on-off-option-in-screen-options-for-comments
* Author: Tim Elsass
* Author URI: tim.ph
*/
/**
@timelsass
timelsass / bgtfw-enable-back-to-top-button.php
Created January 14, 2020 05:05
Enables the back to top button in BoldGrid Theme Framework v1 based themes.
<?php
/**
* Plugin Name: BGTFW Back To Top Button
* Description: Enables the back to top button in BoldGrid Theme Framework v1 based themes.
* Plugin URI: https://gist.github.com/timelsass/b709976db58c9f5a6172a5cae5dbbe35
* Author: Tim Elsass
* Author URI: tim.ph
*/
/**
@timelsass
timelsass / bgtfw-v1-e-signature-patch.php
Last active September 24, 2019 23:21
This is a patch plugin for an issue with "E-Signature Plugin" not having mce buttons appear in TinyMCE editors when using BGTFW v1 based themes.
<?php
/**
* Plugin Name: BGTFW v1 E-Signature Plugin Patch
* Description: This is a patch plugin for an issue with "E-Signature Plugin" not having mce buttons appear in TinyMCE editors when using BGTFW v1 based themes.
* Plugin URI: https://gist.github.com/timelsass/8ad0e7b3b7444b149097ac1ace250a30
* Author: Tim Elsass
* Author URI: tim.ph
*/
add_action( 'admin_init', 'bgtfw_v1_e_signature_patch_remove_bgtfw_hook' );
add_action( 'mce_external_plugins', 'bgtfw_v1_e_signature_patch_post_bgtfw' );
@timelsass
timelsass / functions.php
Last active January 14, 2022 06:59
Add and use a new stock status in WooCommerce
<?php
/**
* This code adds a lowstock stock status to WooCommerce products. There is more code
* included here for examples of usage, such as hiding the lowstock status products from
* queries so they aren't displayed in shop pages,add badges to products, and update the
* availability messages on product pages.
*
* Please see this WordPress Stack Exchange question for more information and background:
*
* https://wordpress.stackexchange.com/questions/348759/exclude-products-with-a-stock-lower-than-the-low-stock-threshold-from-the-shop-l
@timelsass
timelsass / base-page-clean-page.php
Last active June 11, 2019 18:53
Clean Page template child theme example using "Swifty" theme by BoldGrid
<?php
/**
* Base Template for Clean Page without a Header, Footer, or Sidebar added.
*
* This file contains the base structure of a BoldGrid Theme.
*/
?>
<!doctype html>
<html <?php language_attributes(); ?>>
<?php get_template_part( 'templates/head' ); ?>
@timelsass
timelsass / bgtfw-allow-nav-menu-link-title-attributes.php
Last active June 4, 2019 00:22
Enables the nav menu link title attributes to work properly in BoldGrid Theme Framework v1 based themes.
.custom-background.palette-primary #boldgrid-sticky-push,
.custom-background.palette-primary #boldgrid-sticky-filler {
background-color: transparent;
}
@timelsass
timelsass / disable-sticky-footer.php
Last active May 22, 2019 05:34
Disables the sticky footer in BoldGrid Theme Framework v1 based themes.
@timelsass
timelsass / custom-at-a-glance-item.php
Created May 12, 2019 07:04
Adds the post ID's link to edit that page in the dashboard's at a glance widget.
<?php
/**
* Plugin Name: Custom At a Glance Item
* Description: Adds the post ID's link to edit that page in the dashboard's at a glance widget.
* Plugin URI: https://gist.github.com/timelsass/345f810ded211fd6b3e9510bd56ebd9a
* Author: Tim Elsass
* Author URI: tim.ph
*/
/**
== Resources ==
The following resources are used in the production of creating the experience this theme provides. Additional images, code, and documentation included with this package is released under the same license as this theme. For a full list of development dependencies, license information, and URLs - please refer to licenses.txt. A special thanks goes out to all of the developers who have spent their time and energy to help make something special and share it with the rest of the world!
= normalize.css =
* © 2012-2018 Nicolas Gallagher and Jonathan Neal
* MIT
= Underscores =
* © 2012-2018 Automattic, Inc.
* GPL-2.0-or-later