How to translate get_intermediate_image_sizes?

You can use __(), _e(), _x() or _ex() and your textdomain to make your theme or plugin translatable. I stripped your code snippet to the basics, so you will get the idea more easily: <select class=”widefat”> <?php foreach ( $this->getImageSizes() as $name => $atts ) : ?> <option value=”<?php echo $name; ?>” ?>> <?php echo … Read more

Usage of theme name in functions

In short: it’s the so called »textdomain«. The longer explanation: If you look accurate on your first example, you’ll see, that this parameter is not the second parameter for the_content but for the Funktion __(): <?php the_content( __( ‘Continue reading <span class=”meta-nav”>&rarr;</span>’, ‘twentythirteen’ ) ); ?> This function is part of the internationalisation (»I18n«) functions … Read more

Change WordPress language based on user setting

Your use of $current_user is a little wrong, you should include the global $current_user or assign it to a variable, or shorter and cleaner just get_current_user_id(): add_filter(‘locale’, ‘change_lang’); function change_lang( $locale ) { if( $lang = get_user_meta( get_current_user_id(), ‘user_lang’, true) ) { return $lang; } return $locale; }

Using esc_attr function

Remember to have the text domain along with the render functions (echo function). It means that, they should be: esc_attr_e(“Text needing to be translated”,”your_text_domain”);<br> esc_attr_x(“Text needing to be translated”,”your_text_domain”);<br> ___(“Text needing to be translated”,”your_text_domain”);

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)