Created
June 9, 2018 21:13
-
-
Save patric-boehner/94491d0b50655896093ba8b447bd4abb to your computer and use it in GitHub Desktop.
Change the default featured image text for a custom post type
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 | |
// Don't include opening php tage | |
// Change feautred image text for Portfolios | |
add_filter( 'post_type_labels_portfolios', 'pb_change_featured_portfolios_image_labels', 10, 1 ); | |
function pb_change_featured_portfolios_image_labels( $labels ) { | |
$new_text = __( 'Portfolio Image', 'core-functionality' ); | |
$labels->featured_image = $new_text; | |
$labels->set_featured_image = 'Set '.$new_text.''; | |
$labels->remove_featured_image = 'Remove '.$new_text.''; | |
$labels->use_featured_image = 'Use as '.$new_text.''; | |
return $labels; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment