This snippet has been moved to the CMB2 Snippet Library.
<?php | |
/* | |
Plugin Name: bbPress Optimize | |
Plugin URI: https://www.scottkclark.com/ | |
Description: Optimizes bbPress queries for large bbPress forums | |
Version: 1.1 | |
Author: Scott Kingsley Clark | |
Author URI: https://www.scottkclark.com/ | |
*/ |
Historically, two terms in different taxonomies with the same slug (for instance, a tag and a category sharing the slug "news") have shared a single term ID. Beginning in WordPress 4.2, when one of these shared terms is updated, it will be split: the updated term will be assigned a new term ID.
In the vast majority of situations, this update will be seamless and uneventful. However, some plugins and themes store term IDs in options, post meta, user meta, or elsewhere. WP 4.2 will include two different tools to help authors of these plugins and themes with the transition.
When a shared term is assigned a new term ID, a new 'split_shared_term'
action is fired. Plugins and themes that store term IDs should hook to this action to perform necessary migrations. The documentation for the hook is as follows:
PhpStorm.app (Standalone) Mac integration with Tower.app for diff and merge
- Add
CompareTools.plist
andphpstorm.sh
files in the~/Library/Application Support/com.fournova.Tower3/CompareTools/
directory. You may need tomkdir ~/Library/Application\ Support/com.fournova.Tower3/CompareTools
if the folder does not already exist - Run
chmod +x ~/Library/Application\ Support/com.fournova.Tower3/CompareTools/phpstorm.sh
- Go into Tower.app Preference > Git Config > Select "PhpStorm" for "Diff tool" and "Compare tool", you can optionally enable "Perform directory diff"
# Stop processing any rewrites for /.well-known/ files | |
RewriteCond %{REQUEST_URI} ^/\.well-known/.*$ [NC] | |
RewriteRule ^ - [L] |
// ==UserScript== | |
// @name Papertrail JSON formatter | |
// @namespace https://papertrailapp.com/ | |
// @version 0.1 | |
// @description Format and colorize JSON log messages in Papertrail | |
// @match https://papertrailapp.com/*events* | |
// @copyright 2014+, Papertrail (http://wiki.creativecommons.org/Public_domain) | |
// @grant GM_addStyle | |
// ==/UserScript== |
<?php | |
/** | |
* Name: CPT Admin Fields | |
* | |
* Description: Allow adding fields to the CPT editor table. | |
* | |
* Version: 2.3 | |
* | |
* Category: Advanced | |
* |
<?php | |
/** | |
** look up and index a value from a post relationship field | |
** set the datasource to the relationship field | |
** get the post id of that related post and use it to | |
** lookup its associated value | |
** for ACF you may want get_field() instead of get_post_meta() | |
** remember to do a full re-index after adding code | |
** check the wp_facetwp_index table if needed to see what values are being indexed | |
**/ |
<?php | |
/* | |
* Ensure total_found() gets calculated right away, because in the [pods] shortcode | |
* it does other queries after the initial find(). | |
*/ | |
add_filter( 'pods_data_auto_calculate_total_found', '__return_true' ); | |
/** | |
* Add custom shortcode handling for total text. |