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_filter('dashboard_recent_posts_query_args', function(array $queryArgs) { | |
$postTypes = get_post_types([ | |
'public' => true, | |
'capability_type' => 'post', | |
]); | |
if (is_array($postTypes)) { | |
$queryArgs['post_type'] = $postTypes; |
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
/dist export-ignore | |
/test export-ignore | |
/docs export-ignore | |
.gitignore export-ignore | |
.gitattributes export-ignore |
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
while IFS=, read orig new; do wp --skip-themes --skip-plugins search-replace "$orig" "$new" wp_posts --include-columns=post_content --verbose; done < example.csv |
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_filter( | |
'register_post_type_args', | |
function ($args, $postType) { | |
if ('attachment' === $postType) { | |
$args['capabilities']['edit_posts'] = 'upload_files'; | |
$args['capabilities']['upload_files'] = 'upload_files'; | |
} | |
OlderNewer