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
{
"landingPage": "\/wp-admin\/admin.php?page=pods&pods_wasm_demo=1",
"preferredVersions": {
"php": "8.0",
"wp": "latest"
},
"phpExtensionBundles": [
"kitchen-sink"
],
"features": {
@sc0ttkclark
sc0ttkclark / Bindings.php
Last active March 16, 2024 18:05
The new Custom Binding Logic for Pods
<?php
namespace Pods\WP;
use Pods\Blocks\Types\Field;
use WP_Block;
/**
* Bindings specific functionality.
*
@sc0ttkclark
sc0ttkclark / php-error.php
Created August 15, 2022 19:05
A quick handy debugging file for wp-content/php-error.php to expose critical errors more thoroughly. DO NOT LEAVE THIS ON PROD SITES.
<?php
/**
* A quick handy debugging file for wp-content/php-error.php to expose critical errors more thoroughly.
*
* DO NOT LEAVE THIS ON PROD SITES.
*/
echo '<h1>Site PHP Error</h1>';
echo '<pre>';
var_dump( [
@sc0ttkclark
sc0ttkclark / 0-README.md
Last active November 15, 2022 18:59
WebStorm.app (Toolbox) Mac integration with Tower.app for diff and merge

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

How to use this

  1. Add CompareTools.plist and webstorm-toolbox.sh files in the ~/Library/Application Support/com.fournova.Tower3/CompareTools/ directory. You may need to mkdir ~/Library/Application\ Support/com.fournova.Tower3/CompareTools if the folder does not already exist
  2. Update the webstorm-toolbox.sh to use your username for the /Users/yourusername/ path and the correct version number (WebStorm > About > Build #WS-XXX.XXXXX.XX where XXX.XXXXX.XX is the version number to use).
  3. Run chmod +x ~/Library/Application\ Support/com.fournova.Tower3/CompareTools/webstorm-toolbox.sh
  4. Go into Tower.app Preference > Git Config > Select "WebStorm (Toolbox)" for "Diff tool" and "Compare tool", you can optionally enable "Perform directory diff"
@sc0ttkclark
sc0ttkclark / 0-README.md
Last active March 3, 2024 09:22
PhpStorm.app (Toolbox) Mac integration with Tower.app for diff and merge

Toolbox PhpStorm.app Mac integration with Tower.app for diff and merge

How to use this

  1. Add CompareTools.plist and phpstorm-toolbox.sh files in the ~/Library/Application Support/com.fournova.Tower3/CompareTools/ directory. You may need to mkdir ~/Library/Application\ Support/com.fournova.Tower3/CompareTools if the folder does not already exist
  2. Update the phpstorm-toolbox.sh to use your username for the /Users/yourusername/ path and the correct version number (PhpStorm > About > Build #PS-XXX.XXXXX.XX where XXX.XXXXX.XX is the version number to use).
  3. Run chmod +x ~/Library/Application\ Support/com.fournova.Tower3/CompareTools/phpstorm-toolbox.sh
  4. Go into Tower.app Preference > Git Config > Select "PhpStorm" for "Diff tool" and "Compare tool", you can optionally enable "Perform directory diff"
@sc0ttkclark
sc0ttkclark / my-pmpro-set-user-display-name-as-first-last-name.php
Last active March 11, 2022 20:56
Automatically update the display name to be set as the first/last name when the user is registered or the profile is saved or during checkout.
<?php
/**
* Automatically update the display name to be set as the first/last name when the user is registered or the profile is saved.
*
* 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-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