What is 'THEME_NS' and how to replace <<<EOL?


Author Message
Axel

Posted: 1/11/2015
Quote message 

I made a lot of changes to an Artisteer theme and would like to get to the bottom of it to get it al right, but there are a few questions I find no answer to.

01. THEME_NS

On top in functions.php there is
define('THEME_NS', 'twentyten');
.
--- What is it for?

I changed a lot of content with THEME_NS in the end.
--- Should I change this when I add new language files?

In library/widgets.php there is a variable in it:
echo '<option' . $selected . ' value='' . $s . ''>' . __($s, THEME_NS) . '</option>';

--- Would it make sense to just add
$s
instead?


02. EOL

When testing the file with Theme Checker, I get the following and similar errors:

Quote :
WARNING: Both DOS and UNIX style line endings were found in the file library/wrappers.php. This causes a problem with SVN repositories and must be corrected before the theme can be accepted. Please change the file to use only one style of line endings.


I notice this is on all php files with
<<<EOL (something to include) EOL;

Looking it up I read it is bad practice to combine DOS & UNIX end of lines, but I only find info on \n \r, not on <<<EOL.

In library/defaults.php this solved replacing it with
'(something to include)';
(+ adding \ before '), but this does not work in functions.php. I did not try the others yet.

--- What should I add to replace EOLs?

Thank you already for your help!
 
Axel

Posted: 1/13/2015
Quote message 

Problems solved...

define('THEME_NS', 'twentyten');

> defines the theme domain once, but I'd guess twentyten should be replaced with the theme folder name + it's not the recommended way because GNU gettext cannot read it.
info here: http://ottopress.com/2012/internationalization-youre-probably-doing-it-wrong/

<<<EOL (something to include) EOL;

> Has nothing to do with the line endings. Apparently this is not smth that is visible. The problem solves when choosing a UNIX format in a text editor.