Skip to content

Instantly share code, notes, and snippets.

View bhubbard's full-sized avatar
:octocat:
Hello

Brandon Hubbard bhubbard

:octocat:
Hello
View GitHub Profile
@bhubbard
bhubbard / Commands
Created May 15, 2023 15:51 — forked from lukecav/Commands
Remove MonsterInsights options left after the plugin is removed from WordPress using WP-CLI
# delete all monsterinsight option values
wp option delete monsterinsights_usage_tracking_config
wp option delete monsterinsights_over_time
wp option delete monsterinsights_db_version
wp option delete monsterinsights_settings_version
wp option delete monsterinsights_current_version
wp option delete monsterinsights_settings
wp option delete monsterinsights_site_tt
wp option delete monsterinsights_site_profile
wp option delete monsterinsights_version_upgraded_from
<?php
/**
* Plugin Name: MonsterInsights User Role Dimension
* Description: Add a user role to the dimensions options in MonsterInsights.
* Version: 1.0.0
* Author: MonsterInsights Support Team
* Author URI: https://www.monsterinsights.com
*/
function monsterinsights_add_user_role_to_dimensions( $dimensions ) {
https://gist.github.com/paulund/6687336
https://wpdatatables.com/crud-system-in-wordpress/
https://www.davidangulo.xyz/how-to-create-crud-operations-plugin-in-wordpress/
https://wpdataaccess.com/2020/04/08/how-to-use-wp-data-access-classes-in-your-own-php-code/
https://paulund.co.uk/crud-queries-for-wordpress-custom-tables
@bhubbard
bhubbard / gist:2b1100d0e20291b14115199a98c5191a
Created December 28, 2022 17:30
6 +25 You can Disable External request by adding this in your wp-config.php ( Also, you can specify domain which you don't want to block like this).
define( 'WP_HTTP_BLOCK_EXTERNAL', TRUE );
define( 'WP_ACCESSIBLE_HOSTS', 'example.com, domain.com' );
<?php
if ( ! function_exists( 'wpcfu_output_file_upload_form' ) ) {
/**
* Output the form.
*
* @param array $atts User defined attributes in shortcode tag
*/
function wpcfu_output_file_upload_form( $atts ) {
# This is a workflow to compile and deploy to WPEngine Production
name: PROD Deploy to WPEngine
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the release-1 branch
push:
branches: [ main ]
npm install -g https://github.com/observing/thor
@bhubbard
bhubbard / view-all-shortcodes.php
Created March 27, 2015 18:58
All available shortcodes
<?php
/*
Plugin Name: Paulund View All Shortcodes
Plugin URI: http://www.paulund.co.uk
Description: View all the available shortcodes on your WordPress blog. This page will show you everything that is currently registered so you can use these in the text editor of WordPress
Version: 1
Author: Paul Underwood
Author URI: http://www.paulund.co.uk
http://www.paulund.co.uk/get-list-of-all-available-shortcodes
@bhubbard
bhubbard / resume.json
Last active November 18, 2021 13:36
JSON Resume
{
"basics": {
"name": "Brandon Hubbard",
"label": "WordPress Developer",
"picture": "http://www.gravatar.com/avatar/3596404cbc9ffb7d4f48524e08340d86.png",
"email": "bkhubbard@gmail.com",
"phone": "(818) 297-4175",
"website": "https://brandonhubbard.com",
"summary": "Web Developer Manager at Snap One",
"location": {