Search
 
SCRIPT & CODE EXAMPLE
 

PHP

wordpress rename post format

add_theme_support( 'post-formats', array('aside','video','gallery','chat'));

function rename_post_formats($translation, $text, $context, $domain) {
    $names = array(
        'Aside'  => 'No Featured image',
        'Chat'  => 'Full Width',
    );
    if ($context == 'Post format') {
        $translation = str_replace(array_keys($names), array_values($names), $text);
    }
    return $translation;
}
add_filter('gettext_with_context', 'rename_post_formats', 10, 4);
Comment

PREVIOUS NEXT
Code Example
Php :: wordpress change post format 
Php :: how check the checkbox is check php 
Php :: laravel module package 
Php :: find php ini 
Php :: twig log variable 
Php :: isset laravel 
Php :: wordpress use jquery in plugin 
Php :: laravel queue timeout 
Php :: display money format php 
Php :: How to display custom field in wordpress? 
Php :: create weekly calendar in php 
Php :: php variable as javascript function parameter in echo 
Php :: laravel collection partition 
Php :: PHP trim — Strip whitespace (or other characters) from the beginning and end of a string 
Php :: check current user role 
Php :: count column eloquent laravel 
Php :: acf looping through post types 
Php :: php apns notification source code 
Php :: php preg_quote 
Php :: construct php 
Php :: array shift php 
Php :: not equal in laravel blade 
Php :: $ is not define 
Php :: php array push 
Php :: how to go one folder back in __dir__ in php 
Php :: disable sidebar widget wordpress 5.8 
Php :: carbon this month first day 
Php :: install execute array in php 
Php :: how to print something in php 
Php :: carbon get month from date 
ADD CONTENT
Topic
Content
Source link
Name
8+1 =