Incluir esse código no functions.php.
Nas action_hooks, no lugar de "category" é só incluir o slug da sua taxonomia :)
| # Add in ~/.bashrc or ~/.bash_profile | |
| function parse_git_branch () { | |
| git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
| } | |
| RED="\[\033[01;31m\]" | |
| YELLOW="\[\033[01;33m\]" | |
| GREEN="\[\033[01;32m\]" | |
| BLUE="\[\033[01;34m\]" | |
| NO_COLOR="\[\033[00m\]" |
| <?php | |
| /** | |
| * Create a metabox with multiple fields. | |
| * Replace `_namespace` with some namespace for your project to avoid conflicts with other items | |
| */ | |
| // | |
| // Create Metabox | |
| // |
| <?php | |
| /** | |
| * Plugin Name: Movie Review - Atores | |
| * Plugin URI: https://example.com/plugins/the-basics/ | |
| * Description: Acrescenta uma metabox para preenchimento dos atores para um blog de review de cinema | |
| * Version: 20190625 | |
| * Author: WP&etc | |
| * Author URI: https://wp.etc.br/ | |
| * License: GPL2 | |
| * License URI: https://www.gnu.org/licenses/gpl-2.0.html |
| /** | |
| * Snippets to hide EDD coupon fields & codes during the checkout process - handy if you use URLs to apply discounts instead | |
| * Tutorial: http://www.sellwithwp.com/easy-digital-downloads-hide-coupons/ | |
| */ | |
| // Removes the field to enter a discount at checkout | |
| remove_action( 'edd_checkout_form_top', 'edd_discount_field', -1 ); | |
| // Changes the discount code in the checkout summary to display "Discount applied - " instead of the code |
| /** | |
| * Add a badge for admins and vendors to product reviews / review comments. | |
| * | |
| * @param string $author_html displays comment author's name linked to comment author's site | |
| * @param string $author comment author's display name | |
| * @param int $comment_id comment ID | |
| * @return string $author_html updated author html preceded by badge. | |
| */ | |
| function sww_edd_review_admin_badges( $author_html, $author, $comment_id ) { | |
| <?php // only copy if needed | |
| /** | |
| * Adds new payment statuses to array of available statuses | |
| * | |
| * @param string[] $payment_statuses the core payment statuses | |
| * @param string[] updated set of statuses | |
| */ | |
| function sww_add_edd_payment_statuses( $payment_statuses ) { |
| Steps to install and run PostgreSQL 9.2 using Homebrew (Mac OS X) | |
| (if you aren't using version 9.1.5, change line 6 with the correct version) | |
| 1. launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist | |
| 2. mv /usr/local/var/postgres /usr/local/var/postgres91 | |
| 3. brew update | |
| 4. brew upgrade postgresql | |
| 5. initdb /usr/local/var/postgres -E utf8 | |
| 6. pg_upgrade -b /usr/local/Cellar/postgresql/9.1.5/bin -B /usr/local/Cellar/postgresql/9.2.0/bin -d /usr/local/var/postgres91 -D /usr/local/var/postgres | |
| 7. cp /usr/local/Cellar/postgresql/9.2.0/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/ |