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

Passing variable as add_shortcode argument

There are two solutions: Use the third argument for the shortcode. Use the use keyword. Examples The third parameter for each shortcode callback is the name of the shortcode: foreach ($files1 as $value) { $new_value = substr($value, 0, -4); add_shortcode($new_value, function( $attributes, $content, $shortcode ) { return ‘<img src=”‘ . PATH . L_ITEMS . $shortcode … Read more