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
add_filter( 'gform_field_validation', 'PREFIX_gravity_forms_blacklist', 10, 4 ); | |
/** | |
* Added Validation check for email vs blacklist of free email accounts. | |
* | |
* @param $result array The validation result to be filtered | |
* @param $value string|array The field value to be validated | |
* @param $form object Current Form object | |
* @param $field object Current Field object | |
* | |
* @return mixed |
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
SELECT * FROM wp_posts | |
LEFT JOIN wp_postmeta ON wp_posts.ID = wp_postmeta.post_id | |
WHERE wp_posts.post_status = 'publish' | |
AND wp_postmeta.meta_value = '%ACF_FIELD_VALUE%' | |
ORDER BY wp_posts.ID |
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
$wp_customize->add_setting( 'themeslug_select_setting_id', array( | |
'capability' => 'edit_theme_options', | |
'sanitize_callback' => 'themeslug_sanitize_select', | |
'default' => 'value1', | |
) ); | |
$wp_customize->add_control( 'themeslug_select_setting_id', array( | |
'type' => 'select', | |
'section' => 'custom_section', // Add a default or your own section | |
'label' => __( 'Custom Select Option' ), |
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
$wp_customize->add_setting( 'core_color_setting_id', array( | |
'sanitize_callback' => 'themeslug_sanitize_hex_color', | |
) ); | |
$wp_customize->add_control( | |
new WP_Customize_Color_Control( $wp_customize, 'core_color_setting_id', | |
array( | |
'label' => __( 'Core Color Setting' ), | |
'description' => __( 'Select a color for something' ), | |
'section' => 'custom_section', // Add a default or your own section |
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
$wp_customize->add_setting( 'themeslug_url_setting_id', array( | |
'capability' => 'edit_theme_options', | |
'sanitize_callback' => 'themeslug_sanitize_url', | |
) ); | |
$wp_customize->add_control( 'themeslug_url_setting_id', array( | |
'type' => 'url', | |
'section' => 'custom_section', // Add a default or your own section | |
'label' => __( 'Custom URL' ), | |
'description' => __( 'This is a custom url input.' ), |
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
function test_for_page_template() { | |
$args = array( | |
'post_type' => 'page', | |
'meta_query' => array( | |
array( | |
'key' => '_wp_page_template', | |
'value' => 'PAGETEMPLATE.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
$wp_customize->add_setting( 'date_setting_id', array( | |
'capability' => 'edit_theme_options', | |
'sanitize_callback' => 'themeslug_sanitize_date', | |
) ); | |
$wp_customize->add_control( 'date_setting_id', array( | |
'type' => 'date', | |
'section' => 'custom_section', // Add a default or your own section | |
'label' => __( 'Custom Date' ), | |
'description' => __( 'This is a custom date control.' ), |
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
$wp_customize->add_setting( 'themeslug_email_setting_id', array( | |
'capability' => 'edit_theme_options', | |
'default' => '', | |
'sanitize_callback' => 'themeslug_sanitize_email', | |
) ); | |
$wp_customize->add_control( 'themeslug_email_setting_id', array( | |
'type' => 'email', | |
'section' => 'custom_section', // Required, core or custom. | |
'label' => __( 'Custom Email' ), |
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
alias gtree='git log --graph --abbrev-commit --decorate --date=relative --format=format:'\''%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)'\'' --all' |
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
location ~* .(png|jpe?g|gif|ico|svg)$ { | |
expires 24h; | |
log_not_found off; | |
root '/Users/USERNAME/.valet/Sites/mixpanel/’; | |
if (-f $request_filename) { | |
break; | |
} | |
try_files $uri $uri/ @production; | |
} |