I am building my first Wordpress site, I just downloaded and installed v3.9.1. I bought a theme (rustik3) and I am trying to install it, but I am running into these errors produced by WP_DEBUG:
Notice: Use of undefined constant Redux_TEXT_DOMAIN - assumed 'Redux_TEXT_DOMAIN' in /var/www/wp-content/themes/rustik3/admin/options.php on line 501
Notice: Use of undefined constant Redux_TEXT_DOMAIN - assumed 'Redux_TEXT_DOMAIN' in /var/www/wp-content/themes/rustik3/admin/options.php on line 502
Notice: Use of undefined constant Redux_TEXT_DOMAIN - assumed 'Redux_TEXT_DOMAIN' in /var/www/wp-content/themes/rustik3/admin/options.php on line 503
Notice: Undefined variable: item_info in /var/www/wp-content/themes/rustik3/admin/theme-functions.php on line 23
I have done some googling, and I'm starting to think that the last Wordpress update made it so that the Redux Framework is deprecated and cannot be used. This is just a hunch though. As of right now, the theme installs, but it shows up as completely blank - either when I go to http://localhost
or when I am trying to customize it in the Wordpress UI. I haven't looked into the last part of the error messages log (line 23 error)...but it is just an undefined variable so I might be able to tackle that one myself. Any ideas?
UPDATE
This is what the chunk of code looks like in options.php
:
array(
'id' => 'google_webfonts',
'type' => 'google_webfonts',
'title' => __('Enable Google Webfonts', Redux_TEXT_DOMAIN),
'sub_desc' => __('Pick from over 600 Google Webfonts to use on the site. Then select below which elements you want to apply it to.', Redux_TEXT_DOMAIN),
'desc' => __('', Redux_TEXT_DOMAIN)
),
UPDATE
I did a text search through all of the wordpress files for Redux_TEXT_DOMAIN
and the only spot it appears is in the above chunk of code...
UPDATE
This code is what loads the text domain in the theme I have...I am not familiar with what a text domain is - but this might be relevant:
public function load_textdomain() {
if ( isset( $this->textdomain_loaded ) )
return $this->textdomain_loaded;
$textdomain = $this->get('TextDomain');
if ( ! $textdomain ) {
$this->textdomain_loaded = false;
return false;
}
if ( is_textdomain_loaded( $textdomain ) ) {
$this->textdomain_loaded = true;
return true;
}
$path = $this->get_stylesheet_directory();
if ( $domainpath = $this->get('DomainPath') )
$path .= $domainpath;
else
$path .= '/languages';
$this->textdomain_loaded = load_theme_textdomain( $textdomain, $path );
return $this->textdomain_loaded;
}
Is there something wrong with the above code?
Note: I have posted a duplicate question here. I did this before I was aware that there was a Wordpress specific section of Stack Exchange. If you care about stackoverflow.com - you can answer the question there...I have put a 50 point bounty on it :). You should also read the comments on that page...I think I may have found some relevant information.
UPDATE
Thanks to a comment by cybmeta - I got rid of the Redux_TEXT_DOMAIN
errors...the last one left is this:
Notice: Undefined variable: item_info in /var/www/wp-content/themes/rustik3/admin/theme-functions.php on line 23
Here is the code:
$item_info .= '<div class="rustik_updated"><div class="mc_embed_signup_admin">
<form action="http://doublerainbowx.us6.list-manage2.com/subscribe/post?u=eac2b83a92633c39dae8a663b&id=334c60b856" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
<label for="mce-EMAIL">Get e-mails about important updates and helpful tips on how to run your store by joining the Rustik newsletter.</label>
<input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="email address" required>
<!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups-->
<div style="position: absolute; left: -5000px;"><input type="text" name="b_eac2b83a92633c39dae8a663b_334c60b856" value=""></div>
<input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button">
<span><a href="?rustik_updates_nag_ignore=0">Hide Notice</a></span>
</form>
</div></div>';
echo $item_info;
The error is thrown on the echo $item_info
line - so it is as if it isn't being set for some reason...even though it looks like it is above.
Redux_TEXT_DOMAIN
it is not a PHP constant, you should write it as string (between quotes) to pass it as the textdomain parameter of a gettext function.Notice: Undefined variable: item_info in /var/www/wp-content/themes/rustik3/admin/theme-functions.php on line 23
any ideas?$item_info
not being set because of.=
what is the difference between that and just using=
?