Skip to content

Instantly share code, notes, and snippets.

@solagirl
solagirl / class-pluginname-loader
Created July 5, 2023 04:25 — forked from cjwd-snippets/class-pluginname-loader
Register all actions,filters and shortcodes for the plugin
<?php
/**
* Register all actions and filters for the plugin
*
* @link http://chinarajames.com
* @since 1.0.0
*
* @package Studiousapp_Notes
* @subpackage Studiousapp_Notes/includes
@solagirl
solagirl / wc-delay-email-notifications.php
Created June 26, 2023 04:31 — forked from lomars/wc-delay-email-notifications.php
Delay WooCommerce emails - Delay WooCommerce emails for a specified time in settings (In progress).
<?php
/*
Plugin Name: Delay WooCommerce emails
Plugin URI: https://stackoverflow.com/questions/66157566/delay-woocommerce-order-processing-mail
Description: Delay WooCommerce emails for a specified time in settings.
Author: LoicTheAztec
Author URI: https://stackoverflow.com/users/3730754/loictheaztec?tab=profile
Version: 1.0
*/
@solagirl
solagirl / wp-config.php
Last active March 18, 2023 09:51 — forked from MikeNGarrett/wp-config.php
All those damned wp-config constants you can never remember.
<?php
// PHP memory limit for this site
define( 'WP_MEMORY_LIMIT', '128M' );
define( 'WP_MAX_MEMORY_LIMIT', '256M' ); // Increase admin-side memory limit.
// Database
define( 'WP_ALLOW_REPAIR', true ); // Allow WordPress to automatically repair your database.
define( 'DO_NOT_UPGRADE_GLOBAL_TABLES', true ); // Don't make database upgrades on global tables (like users)
// Explicitely setting url
@solagirl
solagirl / add-wpcli.sh
Created March 13, 2023 02:58 — forked from ladislavsulc/add-wpcli.sh
Add WP CLI to Laragon
cd C:\laragon\usr\bin && curl -L -O https://raw.github.com/wp-cli/builds/gh-pages/phar/wp-cli.phar && echo @ECHO OFF > wp.bat && echo php "%~dp0wp-cli.phar" %* >> wp.bat
@solagirl
solagirl / resize-debounce.md
Last active December 5, 2021 09:00
How to wait for the 'end' of 'resize' event
@solagirl
solagirl / adminbar-no-avatar.md
Created August 13, 2021 11:42
Remove avatar image from WordPress admin bar
add_action( 'add_admin_bar_menus', function(){
	global $wp_admin_bar;
	if ( ! is_admin_bar_showing() || ! is_object( $wp_admin_bar ) ) {
		return;
	}
	remove_action( 'admin_bar_menu', 'wp_admin_bar_my_account_item', 7 );
	add_action( 'admin_bar_menu', 'wp_admin_bar_my_account_item_no_avatar', 7 );
});
@solagirl
solagirl / mysqldump.md
Last active May 1, 2021 07:22
Dump large sql file into wamp
@solagirl
solagirl / readme.md
Last active March 6, 2023 07:03 — forked from benstr/readme.md
Gist Markdown Cheatsheet

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

Paragraph

@solagirl
solagirl / functions.php
Created February 9, 2021 11:59 — forked from maxxscho/functions.php
Wordpress: Shortcode Empty Paragraph fix
function shortcode_empty_paragraph_fix($content)
{
$array = array (
'<p>[' => '[',
']</p>' => ']',
']<br />' => ']'
);
$content = strtr($content, $array);