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
# 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\]" |
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 | |
/** | |
* Create a metabox with multiple fields. | |
* Replace `_namespace` with some namespace for your project to avoid conflicts with other items | |
*/ | |
// | |
// Create Metabox | |
// |
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 | |
/** | |
* 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 |
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
//maps.googleapis.com | |
//maps.gstatic.com | |
//fonts.googleapis.com | |
//fonts.gstatic.com | |
//ajax.googleapis.com | |
//apis.google.com | |
//google-analytics.com | |
//www.google-analytics.com | |
//ssl.google-analytics.com | |
//youtube.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
jQuery('.notice > p:contains("Welcome to SEOPress PRO!")').parent().remove(); |
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
// Run the function on admin_init | |
add_action('admin_init', 'remove_profile_menu'); | |
// Removal function | |
function remove_profile_menu() { | |
global $wp_roles; | |
// Remove the menu. Syntax is `remove_submenu_page($menu_slug, $submenu_slug)` | |
remove_submenu_page('users.php', 'profile.php'); |
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
<IfModule mod_expires.c> | |
ExpiresActive on | |
ExpiresByType text/css "access plus 14 days" | |
ExpiresByType text/xml "access plus 0 seconds" | |
ExpiresByType text/javascript "access plus 14 days" | |
ExpiresByType application/x-javascript "access plus 14 days" | |
ExpiresByType image/ico "access plus 14 days" | |
ExpiresByType image/jpg "access plus 14 days" | |
ExpiresByType image/jpeg "access plus 14 days" | |
ExpiresByType image/gif "access plus 14 days" |
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
<IfModule mod_deflate.c> | |
AddOutputFilterByType DEFLATE text/plain | |
AddOutputFilterByType DEFLATE text/html | |
AddOutputFilterByType DEFLATE text/xml | |
AddOutputFilterByType DEFLATE text/css | |
AddOutputFilterByType DEFLATE application/xml | |
AddOutputFilterByType DEFLATE application/xhtml+xml | |
AddOutputFilterByType DEFLATE application/rss+xml | |
AddOutputFilterByType DEFLATE application/javascript | |
AddOutputFilterByType DEFLATE application/x-javascript |
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
/** | |
* 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 |
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
/** | |
* 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 ) { | |
NewerOlder