This file contains 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 | |
include $_SERVER['DOCUMENT_ROOT'].'/wp-content/plugins/advanced-custom-fields-pro/acf.php'; | |
include $_SERVER['DOCUMENT_ROOT'].'/wp-content/plugins/advanced-custom-fields-pro/admin/install.php'; | |
$acf_admin = new acf_admin_install(); | |
$updates = acf_get_db_updates(); | |
$message = ''; |
This file contains 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 | |
$pro_license = maybe_unserialize(base64_decode(get_option('acf_pro_license'))); | |
if (!$pro_license || $pro_license['url'] != home_url()) { | |
$save = array( | |
'key' => 'license_here', | |
'url' => home_url() | |
); | |
$save = maybe_serialize(base64_encode($save)); |
This file contains 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
if ! type "brew" > /dev/null; then | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
fi | |
brew install git cask brew-cask-completion && | |
brew cask install vagrant virtualbox && | |
vagrant plugin install vagrant-berkshelf vagrant-hostmanager vagrant-hostsupdater vagrant-omnibus vagrant-share vagrant-vbguest; |
This file contains 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
# Credits: https://stevegrunwell.com/blog/keeping-wordpress-under-version-control-with-git/ | |
# ADD THIS IN YOUR UPLOADS DIRECTORY | |
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule (.*) http://{SITE_URL}/wp-content/uploads/$1 | |
</IfModule> |
This file contains 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 | |
global $wp_styles; | |
global $wp_scripts; | |
echo '<pre>' . print_r( $wp_styles->queue, true ) . '</pre>'; | |
echo '<pre>' . print_r( $wp_scripts->queue, true ) . '</pre>'; |
This file contains 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 | |
/** | |
* Exclude some terms from the term lists. | |
* | |
* @param WP_Term_Query $term_query The class instance instance. | |
* @return void | |
*/ | |
function exclude_terms( $term_query ) { | |
if ( | |
is_feed() || |
This file contains 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 | |
/** | |
* Remove text from rss feed content and excerpt. | |
* | |
* @param string $content | |
* @return string | |
*/ | |
function remove_feed_text( $content ) { |
This file contains 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 | |
/** | |
* Add 'Featured Image' to a rss feed. | |
* | |
* @return void | |
*/ | |
function add_feed_item() { | |
$query = get_queried_object(); |
This file contains 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 | |
/** | |
* Filter the archive posts to only display posts of the current Term not child Terms. | |
* | |
* @param WP_Query $query The query instance. | |
* @return void | |
*/ | |
function filter_archive_posts( $query ) { |
This file contains 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 | |
/** | |
* Get an array of WP_Term objects for a post. | |
* | |
* @param integer $post_id The post id. | |
* @return array | |
*/ | |
function get_post_terms( $post_id ) { | |
$terms_array = []; |
OlderNewer