This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## powershell - remove everything in a filename up to the first dash | |
## useful when emoji are named 392394-something-something.png | |
foreach ($file in (get-childitem *.png).name) { | |
Rename-Item $file ($file -replace '^[^-]*-\s*') | |
} | |
## powershell - transform underscores to dashes | |
Get-ChildItem *.png | Rename-Item -NewName { $_.Name -replace '_','-' } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select ID,post_author,post_title,post_parent from `wp_posts` where `post_type` = 'revision' AND `post_date` <= '2024-10-16 00:00:00' AND post_parent IN (SELECT post_parent FROM (SELECT post_parent, COUNT(post_parent) FROM wp_posts | |
GROUP BY post_parent | |
HAVING COUNT(post_parent) = 1) AS subQuery); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Check ACF Field Use | |
* | |
* Plugin Name: Check ACF Field Use | |
* Plugin URI: https://wordpress.org/plugins/check-acf-field-use/ | |
* Description: Check how many times an ACF field is used across your site, get useful data, post links, etc. | |
* Version: 1.0.0 | |
* Author: KMW |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* - Flexible Content created with ACF | |
* - Field that lets you select a Gravity Form, loads the GF ID for use in templates (can replace this with whatever, as long as the meta value assignment is to an ID) | |
* - Query lets you get a list of all posts using the flex content to display the form | |
*/ | |
SELECT DISTINCT ID, post_title, post_status, guid, meta_value from `wp_posts` | |
LEFT JOIN `wp_postmeta` ON `post_id` = `ID` | |
WHERE `post_status` = 'publish' AND `meta_key` LIKE '%gravity_form%' AND `meta_value` REGEXP '^[0-9]+$'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* SearchWP relevant customization. | |
* | |
* @package lnct | |
*/ | |
class LNCT_SearchWP { | |
public function __construct() { | |
add_filter( 'searchwp_live_search_query_args', [ $this, 'restrict_searchwp_post_types'] ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Fix inaccurate comment counts across a WP multisite | |
* | |
*/ | |
class Multisite_Comments_Fix { | |
/** | |
* Class construction. | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ==UserStyle== | |
@name slack.com - 6/6/2023, 6:08:37 PM | |
@namespace github.com/openstyles/stylus | |
@version 1.0.0 | |
@description A Slack in-browser customization style | |
@author github.com/kmwalsh | |
==/UserStyle== */ | |
@-moz-document domain("app.slack.com") { | |
* { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* mv .git/hooks/commit-msg.sample .git/hooks/commit-msg | |
* chmod ug+x .git/hooks/commit-msg | |
paste the desired script into commit-msg |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Use this template when reporting a security vulnerability in Slack. | |
It can be inefficient to have to dig through a thread to figure out | |
what to do next. Presenting all of the information in the initial | |
disclosure message is ideal. Additionally, it is harrowing to | |
receive notification of a security vulnerability and can cause much | |
strife and chaos and confusion. This prevents some emotional chaos. | |
--- | |
**Plugin:** (link to plugin repo) |
NewerOlder