Search
 
SCRIPT & CODE EXAMPLE
 

PHP

wordpress change 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 :: script inside php 
Php :: laravel bd query 
Php :: laravel simplexmlelement not found 
Php :: laravel add package without updating 
Php :: laravel Form::hidden 
Php :: php url variables 
Php :: php function to remove null value from array 
Php :: laravel select where with total sum query to get all data with sum 
Php :: php array_fill 
Php :: laravel exclude field 
Php :: explode return empty array 
Php :: phpmyadmin drop database 
Php :: php mysql prepared statements 
Php :: php json_encode indent 
Php :: php count string in array 
Php :: laravel santum 
Php :: smarty php 
Php :: Databases supported by php 
Php :: active page in laravel 
Php :: laravel array in lang 
Php :: Laravel run seed table 
Php :: php array push with key 
Php :: php localhost 
Php :: orderby total sales woocommerce 
Php :: update url wordpress 
Php :: mysql_real_escape_string 
Php :: laravel create table if not exists 
Php :: sum two numbers in php 
Php :: laravel new line in session flash message 
Php :: get current user in symfony 
ADD CONTENT
Topic
Content
Source link
Name
9+7 =