Skip to content

Instantly share code, notes, and snippets.

View brigleb's full-sized avatar

Raymond Brigleb brigleb

View GitHub Profile
@aaronwaldon
aaronwaldon / 1) readme.md
Last active March 24, 2023 14:25
How to set up Gulp for Craft CMS. Includes SASS compilation and minification, JavaScript minification, livereloading, and browser sync.

How to set up Gulp with a Craft CMS project

I freaking love working with technologies like Gulp, and wanted to share how to get my current Craft front-end workflow set up. With a few tweaks, this can also be used with virtually any other sites (I've used it with Laravel, static sites, ExpressionEngine, etc).

Project Directory Structure

  • project root/
    • craft/
      • templates/
  • (your craft template files)
@danielmrdev
danielmrdev / wordpress-valet-install.md
Last active December 23, 2021 09:59
How to install Wordpress from command line in Valet

How to install Wordpress from command line in Valet

I use Valet as my local web development environment (PHP, Laravel, Wordpress, ...)

This gist is my own recipe to install Wordpress from the command line to use it with Valet. Maybe this is useful for you too.

Install 'WP-CLI' command line tool

@brigleb
brigleb / front-page.php
Last active March 7, 2018 15:08
How I like to load ACF loops. `front-page.php` is an example template, calling multiple layouts. Alternately, the second example just finds out what layouts are used and calls them by name. Note the underscore is used in place of a forward slash.
<main>
<?php get_template_part( 'parts/layouts/home', 'intro' ); ?>
<?php get_template_part( 'parts/layouts/home', 'slider' ); ?>
<?php get_template_part( 'parts/product', 'grid' ); ?>
<?php get_template_part( 'parts/layouts/home', 'outro' ); ?>
<?php // or, you can just try to load them ALL, from the next template ?>
<?php get_template_part('parts/content', 'layouts'); ?>
@brigleb
brigleb / plugin-manager.php
Last active April 16, 2023 15:32
This plugin helps manage other WordPress plugins by tracking who installed them, the installation date, and a description. Just put in a folder of the same name, in the Plugins directory.
<?php
/*
Plugin Name: Plugin Manager
Description: This plugin helps manage other plugins by tracking who installed them, the installation date, and a description.
Version: 1.0
Author: Needmore Designs
*/
// Create custom table
function pm_create_table()
@brigleb
brigleb / plugin-activity-logger.php
Last active December 11, 2024 17:07
This Plugin Activity Logger is a lightweight WordPress must-use plugin that tracks and logs all plugin-related activities, including installation, activation, deactivation, updates, and deletions. It logs each event with a timestamp, the WordPress version, the site’s URL, the plugin name, and the username of the person who performed the action. …
<?php
/**
* Plugin Name: Plugin Activity Logger
* Description: Logs plugin installations, activations, deactivations, updates (with from/to versions if available), and deletions. Handles both single and bulk updates. Attempts to log failed updates as well.
* Version: 3.3
* Author: Needmore Designs
*/
if (!defined('ABSPATH')) {
exit; // Exit if accessed directly.