Skip to content

Instantly share code, notes, and snippets.

View sc0ttkclark's full-sized avatar
🍕
Working hard reviewing and deploying code

Scott Kingsley Clark sc0ttkclark

🍕
Working hard reviewing and deploying code
View GitHub Profile
@sc0ttkclark
sc0ttkclark / my-pmpro-reset-cron-schedules-full.php
Created March 2, 2022 15:26
Reset the Cron Schedules for Paid Memberships Pro. The single-use version can be found at: https://gist.github.com/sc0ttkclark/bd319a47656b786ccee3eca6f2dc4a9a and the PMPro admin page only version can be found at: https://gist.github.com/sc0ttkclark/e11691d6c5a278662e3c694a0bb12e5a
<?php
/**
* Reset the Cron Schedules for Paid Memberships Pro on any page load.
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
@sc0ttkclark
sc0ttkclark / my-pmpro-reset-cron-schedules-single-use.php
Last active February 23, 2022 17:37
Reset the Cron Schedules for Paid Memberships Pro (single-use run with Code Snippets plugin). The solution that runs on every PMPro Admin page load can be found here: https://gist.github.com/sc0ttkclark/e11691d6c5a278662e3c694a0bb12e5a
<?php
/**
* Reset the Cron Schedules for Paid Memberships Pro (single-use run with Code Snippets plugin).
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
@sc0ttkclark
sc0ttkclark / my-pmpro-reset-cron-schedules.php
Last active March 11, 2022 17:18
Reset the Cron Schedules for Paid Memberships Pro. The single-use version can be found at: https://gist.github.com/sc0ttkclark/bd319a47656b786ccee3eca6f2dc4a9a
<?php
/**
* Reset the Cron Schedules for Paid Memberships Pro.
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
@sc0ttkclark
sc0ttkclark / 0-README.md
Last active November 23, 2022 15:41
WebStorm.app (Standalone) Mac integration with Tower.app for diff and merge

WebStorm.app (Standalone) Mac integration with Tower.app for diff and merge

How to use this

  1. Add CompareTools.plist and webstorm.sh files in the ~/Library/Application Support/com.fournova.Tower3/CompareTools/ directory
  2. Run chmod +x ~/Library/Application\ Support/com.fournova.Tower3/CompareTools/webstorm.sh
  3. Go into Tower.app Preference > Git Config > Select "WebStorm" for "Diff tool" and "Compare tool", you can optionally enable "Perform directory diff"

Other variations

@sc0ttkclark
sc0ttkclark / wordpress-plugins-saved-replies.user.js
Created February 9, 2022 17:06
WordPress.org plugins and themes topic saved replies Tampermonkey script. Click 'raw' to install it.
// ==UserScript==
// @name WordPress.org plugins and themes topic saved replies
// @namespace https://skc.dev/
// @version 0.1
// @description Add saved replies to topic reply forms.
// @author Scott Kingsley Clark
// @match https://wordpress.org/support/topic/*
// @match https://*.wordpress.org/support/topic/*
// @grant none
// ==/UserScript==
@sc0ttkclark
sc0ttkclark / my-pmpro-site-lock-down.php
Last active February 2, 2022 15:50
Lock the entire PMPro site down for anyone logged out.
<?php
/*
* Lock down the site for anyone logged out.
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
@sc0ttkclark
sc0ttkclark / my-pmpro-event-tickets-visibility.php
Created January 10, 2022 22:51
Restrict access to specific tickets / RSVPs depending on Membership Level. Requires Event Tickets 5.2.3+
<?php
/**
* Restrict access to specific tickets / RSVPs depending on Membership Level.
*
* Requires Event Tickets 5.2.3+
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
@sc0ttkclark
sc0ttkclark / my-pmpro-custom-field-types.php
Last active January 8, 2022 01:26
Register custom field types with Paid Memberships Pro
<?php
/**
* Register custom field types with Paid Memberships Pro.
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
@sc0ttkclark
sc0ttkclark / pods-pro-tablepress-customize-labels.php
Created December 8, 2021 03:25
Pods Pro - TablePress Integration - Customize column values using templates with magic tags
<?php
/**
* Customize column values using templates with magic tags
*
* @param array $custom_column_templates The list of custom column templates to be used, with the field name as the key.
* @param string $pod_name The pod name.
* @param Pods $pod The Pods object.
* @param array $params The Pods::find() parameters to be used.
* @param array $table The TablePress information.
@sc0ttkclark
sc0ttkclark / pods-pro-tablepress-customize-labels.php
Last active December 8, 2021 03:23
Pods Pro - TablePress Integration - Customize column labels
<?php
/**
* Customize the TablePress columns to use.
*
* @param array $columns The list of columns to be used.
* @param string $pod_name The pod name.
* @param Pods $pod The Pods object.
* @param array $params The Pods::find() parameters to be used.
* @param array $table The TablePress information.