The preprocess_comment filter is never run when an empty comment is submitted.
The empty check happens before wp_new_comment() is called and the preprocess_comment filter is applied in wp_new_comment()
The preprocess_comment filter is never run when an empty comment is submitted.
The empty check happens before wp_new_comment() is called and the preprocess_comment filter is applied in wp_new_comment()
| <?php | |
| /** | |
| * Genesis: Only display post info when post type is "post" | |
| */ | |
| remove_action( 'genesis_entry_header', 'genesis_post_info', 12 ); | |
| add_action( 'genesis_entry_header', 'fe_genesis_post_info', 12 ); | |
| function fe_genesis_post_info() { | |
| if ( 'post' === get_post_type() ) { | |
| genesis_post_info(); |
| <?php | |
| /** | |
| * Example usage to find all Titles with a comma: | |
| * $example_query = new WP_Query( | |
| * array( | |
| * 'title_like' => ',' | |
| * ) | |
| * ); | |
| */ |
| <?php | |
| /********************************************* | |
| Contests CPT | |
| **********************************************/ | |
| /* Contest CPT :: Initiate CPT | |
| **********************************************/ | |
| function vs_register_contests_post_type() { |
| phpswap 7.0.2 | |
| ===> Fetching release list... | |
| [==================================================================] 2.69/2.69KB 100% | |
| 7.0: 4 releases | |
| 5.6: 19 releases | |
| 5.5: 33 releases | |
| 5.4: 46 releases | |
| 5.3: 2 releases | |
| ===> Done | |
| PHP version 7.0.2 not installed. Building from source/installing... [this may take a few mintues] |
| <?php | |
| /** | |
| * Plugin Name: Markdown on Save 4.4. Fix | |
| * Plugin URI: https://gist.github.com/salcode/b6b298a77f1c35cfce1c | |
| * Description: Temporary fix for https://github.com/markjaquith/markdown-on-save/issues/13, which appears in WordPress 4.4 when running Markdown on Save 1.2.1 | |
| * Version: 1.0.0 | |
| * Author: Sal Ferrarello | |
| * Author URI: http://salferrarello.com/ | |
| * Text Domain: markdown-on-save-4-4-fix | |
| * |
| # List all oembed cached values | |
| SELECT * FROM wp_postmeta WHERE meta_key LIKE '_oembed_%'; | |
| # Delete all oembed cached values | |
| DELETE FROM wp_postmeta WHERE meta_key LIKE '_oembed_%'; | |
| # Delete all oembed cached values for Vimeo | |
| SELECT * FROM wp_postmeta WHERE meta_key LIKE '_oembed_%' AND meta_value LIKE '%_player.vimeo.com/video_%' |
| <?php | |
| /** | |
| * Shortcode [fe_constant_test], which takes one parameter called "constant" | |
| * This shortcode then outputs the value of that constant. | |
| * I find this helpful when testing the value of constants with a complex | |
| * constant assignment (e.g. using .env) | |
| * | |
| * Example usage: [fe_constant_test constant="DB_HOST"] | |
| * outputs the following on my local development environment | |
| * Constant DB_HOST is defined as "localhost" |
This page in the documentation, Using custom attributes in menus and taxonomy archives indicates
Custom attribute slugs are prefixed with ‘pa_’, so an attribute called ‘size’ would be ‘pa_size’
However, the behavior I appear to be seeing is global (i.e. taxonomy) based attributes are prefixed with pa_ and custom (i.e. local) attributes are not, which I believe is the opposite of what the documentation says.
For clarification, I'm referring to a custom (i.e. local) attribute as one I add to a specific product using the Custom Product Attribute Add button.
| # Current branch - Determine current git branch, store in $currentbranch, and exit if not on a branch | |
| if ! currentbranch=$(git symbolic-ref --short -q HEAD) | |
| then | |
| echo We are not currently on a branch. | |
| exit 1 | |
| fi | |
| # Uncommited Changes - Exit script if there uncommited changes | |
| if ! git diff-index --quiet HEAD --; then | |
| echo "There are uncommited changes on this repository." |