Skip to content

Instantly share code, notes, and snippets.

View 1bigidea's full-sized avatar

Tom Ransom 1bigidea

View GitHub Profile
@1bigidea
1bigidea / bb-plugin-menu-accessibility.patch
Created February 5, 2024 18:00
Adds ability to add markup to Flyout Menus in BeaverBuilder
diff --git a/modules/menu/includes/frontend.php b/modules/menu/includes/frontend.php
index 920544e..3c6d3b3 100644
--- a/modules/menu/includes/frontend.php
+++ b/modules/menu/includes/frontend.php
@@ -40,7 +40,7 @@ if (isset($settings->menu_search) && 'show' == $settings->menu_search) {
$layout = isset($settings->menu_layout) ? 'fl-menu-' . $settings->menu_layout : 'fl-menu-horizontal';
- printf('<nav aria-label="%s"%s>', esc_attr($module->get_menu_label()), FLBuilder::print_schema(' itemscope="itemscope" itemtype="https://schema.org/SiteNavigationElement"', false));
+ printf(apply_filters('bb-fl-menu', '<nav aria-label="%s"%s>', $module, $settings), esc_attr($module->get_menu_label()), FLBuilder::print_schema(' itemscope="itemscope" itemtype="https://schema.org/SiteNavigationElement"', false));
<?php
/**
* Plugin Name: Sumy Stripe Dynamic Subscription Cancellation
* Plugin URI: https://1bigidea.com/plugins/e-commerce
* Description: Cancels Stripe subscriptions at the end of the term (n-payments)
* Author: transom
* Author URI: https://1bigidea.com
* Text Domain: Sumy Stripe Dynamic Subscription Cancellation
* Domain Path: /languages
@1bigidea
1bigidea / gist:17b068ffed12709bd2c8ef8c149b88b0
Created May 8, 2019 14:33
Debug from Varying Vagrants Vagrant provisioning v3.
INFO global: Vagrant version: 2.2.4
INFO global: Ruby version: 2.4.4
INFO global: RubyGems version: 2.6.14.1
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/opt/vagrant/embedded"
INFO global: VAGRANT_EXECUTABLE="/opt/vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/bin/vagrant"
INFO global: VAGRANT_INSTALLER_ENV="1"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_LOG="debug"
WARN global: resolv replacement has not been enabled!
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/plugins/synced_folders/nfs/plugin.rb
@1bigidea
1bigidea / vhost.sh
Created July 18, 2017 14:57 — forked from mattmezza/vhost.sh
bash script to create virtual host vhost with apache httpd and CentOs 7
#!/bin/bash
# This script is used for create virtual hosts on CentOs.
# Created by alexnogard from http://alexnogard.com
# Improved by mattmezza from http://you.canmakethat.com
# Feel free to modify it
# PARAMETERS
#
# $usr - User
# $dir - directory of web files
# $servn - webserver address without www.
if( !function_exists('kickout') ){
function kickout(){
$args = func_get_args();
$file_output = array_shift($args);
$file_append = false;
// prepare the output
@1bigidea
1bigidea / gist:8ced84831ac5e7cdf9c0
Created January 3, 2016 20:56 — forked from strangerstudios/gist:3111478
Lockdown BuddyPress with Paid Memberships Pro Example
<?php
/*
Plugin Name: PMPro BuddyPress Customizations
Plugin URI: http://www.paidmembershipspro.com/wp/pmpro-buddypress-customizations/
Description: Example code to lock down parts of BuddyPress with PMPro
Version: 0.2
Author: Stranger Studios
Author URI: http://www.strangerstudios.com
*/
/*
@1bigidea
1bigidea / wc_get_template_part.php
Created October 23, 2015 15:38
WooCommerce Template Scheme
/**
* Get template part (for templates like the shop-loop).
*
* @access public
* @param mixed $slug
* @param string $name (default: '')
*/
function wc_get_template_part( $slug, $name = '' ) {
$template = '';
$options = wp_parse_args( (array)$options, array(
'before-breadcrumbs' => '<div class="wpsc-breadcrumbs">',
'after-breadcrumbs' => '</div>',
'before-crumb' => '',
'after-crumb' => '',
'crumb-separator' => ' &raquo; ',
'show_home_page' => true,
'show_products_page' => true,
'echo' => true,
'products_page_id' => wpsc_get_the_post_id_by_shortcode( '[productspage]' )
<?php
$pages = new query_loop( array(
'post_type' => 'page'
));
foreach( $posts as $id => $post ) {
the_title();
// etc...
}
@1bigidea
1bigidea / gist:5139700
Created March 12, 2013 02:04
Alfred 2.0 Workflow - Bash script to install WordPress
FOLDER=$"{query}";
cd "$FOLDER";
curl -O http://wordpress.org/latest.zip .;
tar -xf latest.zip;
mv wordpress/* .;
rmdir wordpress;
rm latest.zip;
open .;
echo "Wordpress Install Completed";