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
$taxs = get_taxonomies(); | |
foreach($taxs as $tax){ | |
$args = array( | |
'hide_empty'=> false, | |
); | |
$terms = get_terms($tax,$args); | |
$termIDs = array(); //we need an array of IDs from all the terms in this taxonomy | |
foreach($terms as $term){ | |
$termIDs[] = $term->term_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
'tax_query'=> array( | |
array( | |
'taxonomy' => 'decade', | |
'field' => 'id', | |
'terms' => $decadesArray, | |
'operator' => 'NOT IN' | |
) | |
) |
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( 'page_attributes_dropdown_pages_args', 'so_3538267_enable_drafts_parents' ); | |
add_filter( 'quick_edit_dropdown_pages_args', 'so_3538267_enable_drafts_parents' ); | |
function so_3538267_enable_drafts_parents( $args ){ | |
$args['post_status'] = 'draft,publish,pending'; | |
return $args; | |
} |
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
insert into wp_postmeta (post_id, meta_key, meta_value) select ID, '###FIELDNAME###', '1' from wp_posts WHERE post_type = '###POSTTYPE###' |
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
$args = array( | |
'post_type'=> 'post', | |
'post_status' => 'publish', | |
'order' => 'DESC', | |
'tax_query' => array( | |
array( | |
'taxonomy' => 'post_format', | |
'field' => 'slug', | |
'terms' => array( 'post-format-video' ), | |
'operator' => 'NOT IN' |
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
$args = array( | |
'post_status' => 'publish', | |
'post_type' => '###POSTTYPE###', | |
'meta_key' => '###METAKEY###', | |
'orderby' => 'meta_value_num', | |
'order' => 'DESC' | |
); |
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 add_grav_forms(){ | |
$role = get_role('editor'); | |
$role->add_cap('gform_full_access'); | |
} | |
add_action('admin_init','add_grav_forms'); |
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
define( 'FTP_HOST', '###HOST##' ); | |
define( 'FTP_USER', '###USERNAME###' ); | |
define( 'FTP_PASS', '###PASSWORD###' ); |
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
$edit_editor = get_role('editor'); | |
$edit_editor->add_cap('add_users'); | |
$edit_editor->add_cap('create_users'); | |
$edit_editor->add_cap('delete_users'); | |
$edit_editor->add_cap('edit_users'); | |
$edit_editor->add_cap('list_users'); | |
$edit_editor->add_cap('edit_theme_options'); |
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
UPDATE wp_postmeta set meta_value = CONCAT(UCASE(SUBSTRING(meta_value, 1, 1)), LOWER(SUBSTRING(meta_value FROM 2))) WHERE meta_key='firstname' |
OlderNewer