wp-papi / papi

:rocket: WordPress Page Type API with custom fields
https://wp-papi.github.io
MIT License
263 stars 32 forks source link

Add label to page type for changing post type title placeholder #212

Closed frozzare closed 7 years ago

frozzare commented 7 years ago

Easy done with enter_title_here filter in setup method in Papi_Page_Type class.

if ( isset( $this->labels['title_placeholder'] ) ) {
    add_filter( 'enter_title_here', function () {
        return $this->labels['title_placeholder'];
    } );
}

Before: skarmklipp 2017-01-23 15 01 52

After: skarmklipp 2017-01-23 14 59 29