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 | |
/** | |
* ACF Pro repeater field shortcode | |
* | |
* I created this shortcode function because it didn't exist and it was being requested by others | |
* I originally posted it here: https://support.advancedcustomfields.com/forums/topic/repeater-field-shortcode/ | |
* | |
* @attr {string} field - (Required) the name of the field that contains a repeater sub group | |
* @attr {string} sub_fields - (Required) a comma separated list of sub field names that are part of the field repeater group | |
* @attr {string} post_id - (Optional) Specific post ID where your value was entered. Defaults to current post ID (not required). This can also be options / taxonomies / users / etc |
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 | |
//Integrates MemberPress with https://wordpress.org/plugins/invisible-recaptcha/ | |
//This is untested code ATM | |
function add_invisible_recaptcha_mepr_signup($membership_ID) { | |
?> | |
<div class="mp-form-row mepr_invisible_recaptcha"> | |
<?php do_action('google_invre_render_widget_action'); ?> | |
</div> | |
<?php | |
} |
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 | |
/** | |
* Debug Genesis Attributes | |
* @author Bryan Willis | |
*/ | |
add_action( 'wp_footer', 'debug_genesis_attr_filters' ); | |
function debug_genesis_attr_filters() | |
{ | |
global $wp_filter; // current_filter() might be a better way to do this | |
$genesis_attr_filters = array (); |
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
On Mac OS X (Leopard+), the Apache HTTP Server runs under the user account, _www which belongs to the group _www. To allow WordPress to configure wp-config.php during installation, update files during upgrades, and update the .htaccess file for pretty permalinks, give the server write permission on the files. | |
One way to do this is to change the owner of the wordpress directory and its contents to _www. Keep the group as staff, a group to which your user account belongs and give write permissions to the group. | |
$ cd /<wherever>/Sites/<thesite> | |
$ sudo chown -R _www wordpress | |
$ sudo chmod -R g+w wordpress | |
This way, the WordPress directories have a permission level of 775 and files have a permission level of 664. No file nor directory is world-writeable. |
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
/** | |
* | |
* Code used to change the price order in WooCommerce | |
* | |
**/ | |
function PREFIX_woocommerce_price_html( $price, $product ){ | |
return preg_replace('@(<del>.*?</del>).*?(<ins>.*?</ins>)@misx', '$2 $1', $price); | |
} |
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 if (tribe_get_start_date() !== tribe_get_end_date() ) { ?> | |
<dt class="event-label event-label-start"><?php _e('Starts:', 'tribe-events-calendar') ?></dt> | |
<dd class="event-meta event-meta-start"><meta itemprop="startDate" content="<?php echo tribe_get_start_date( null, false, 'Y-m-d' ); ?>"/><?php echo tribe_get_start_date( null, false, 'F j, Y' ); ?></dd> | |
<dt class="event-label event-label-from"><?php _e('From:', 'tribe-events-calendar') ?></dt> | |
<dd class="event-meta event-meta-from"><meta itemprop="fromTime" content="<?php echo tribe_get_start_date( null, false, 'g:ia' ); ?>"/><?php echo tribe_get_start_date( null, false, 'g:ia' ); ?> to <?php echo tribe_get_end_date( null, false, 'g:ia'); ?></dd> | |
<?php } else { ?> | |
<dt class="event-label event-label-date"><?php _e('Date:', 'tribe-events-calendar') ?></dt> | |
<dd class="event-meta event-meta-date"><meta itemprop="startDate" content="<?php echo tribe_get_start_date( null, false, 'Y-m-d' ); ?>"/><?php echo tribe_get_start_date(); ?></d |
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 | |
/*************************************************************** | |
* Function media_custom_validation | |
* Check the media form for duplicate inputs on the same day | |
***************************************************************/ | |
add_filter('gform_validation', 'media_custom_validation'); | |
function media_custom_validation($validation_result) { |
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
$ git config --global core.excludesfile ~/.gitignore | |
$ echo .DS_Store >> ~/.gitignore |