- Sold between 250 000 and 1 000 000 dollars
- Exclusive Author
- Interviewed on the Envato Notes blog
- Author was Featured
- Item was Featured
- Beta Tester
- Author had a File in an Envato Bundle
- Author had a Free File of the Month
^
Additionally, there’s something breaking when in theme mode. The OT admin pages are visible also if disabled by the theme…
Parker
Hm, I have v2.0.7 with theme-mode Step 1 and it’s works fine for me.
- Sold between 250 000 and 1 000 000 dollars
- Exclusive Author
- Interviewed on the Envato Notes blog
- Author was Featured
- Item was Featured
- Beta Tester
- Author had a File in an Envato Bundle
- Author had a Free File of the Month
Pixelous said
Hm, I have v2.0.7 with theme-mode Step 1 and it’s works fine for me.
Well, I have all the steps with my theme and it breaks… and v2.0.6 was working fine… so 1 + 1 = 2 
- Sold between 250 000 and 1 000 000 dollars
- Exclusive Author
- Interviewed on the Envato Notes blog
- Author was Featured
- Item was Featured
- Beta Tester
- Author had a File in an Envato Bundle
- Author had a Free File of the Month
When the __construct function was this:
public function __construct() {
/* setup the constants */
add_action( 'after_setup_theme', array( &$this, 'constants' ), 2 );
/* load text domain */
add_action( 'after_setup_theme', array( &$this, 'load_textdomain' ), 3 );
/* include the required admin files */
add_action( 'after_setup_theme', array( &$this, 'admin_includes' ), 4 );
/* include the required files */
add_action( 'after_setup_theme', array( &$this, 'includes' ), 5 );
/* hook into WordPress */
add_action( 'after_setup_theme', array( &$this, 'hooks' ), 6 );
}
It was working fine…
Now, that the __construct function is this:
public function __construct() {
/* setup the constants */
$this->constants();
/* load text domain */
$this->load_textdomain();
/* include the required admin files */
$this->admin_includes();
/* include the required files */
$this->includes();
/* hook into WordPress */
$this->hooks();
}
everything breaks.
Parker
- Attended a Community Meetup
- Author had a File in an Envato Bundle
- Author was Featured
- Bought between 50 and 99 items
- Envato Staff
- Exclusive Author
- Has been a member for 4-5 years
- Item was Featured
ParkerAndKent said
Hi derek,v2.0.7 breaks everything. There’s an error with the css and js enqueuing I guess…
Basically the scripts URL is a mix of the plugin location and the ot folder location of the theme…
Parker
I highly doubt it’s broken. In what way do you use the plugin, as a plugin or in theme more? I need to know more about your setup. Also, if you send me a copy of your theme to derek[at]valendesigns.com I’ll tell you exactly why it’s not working.
- Sold between 250 000 and 1 000 000 dollars
- Exclusive Author
- Interviewed on the Envato Notes blog
- Author was Featured
- Item was Featured
- Beta Tester
- Author had a File in an Envato Bundle
- Author had a Free File of the Month
valendesigns said
ParkerAndKent saidI highly doubt it’s broken. In what way do you use the plugin, as a plugin or in theme more? I need to know more about your setup. Also, if you send me a copy of your theme to derek[at]valendesigns.com I’ll tell you exactly why it’s not working.
Hi derek,v2.0.7 breaks everything. There’s an error with the css and js enqueuing I guess…
Basically the scripts URL is a mix of the plugin location and the ot folder location of the theme…
Parker
Hi Derek,
well, v2.0.6 is working… so. I’m using ot in theme mode (no plugin in plugins folder, only in theme root) as for your instructions. Everything was working fine before. The settings array is created by me (not generated) and it’s correct.
My theme isn’t published yet, so I’m not in a hurry, I’m just testing everything to help you out.
In my previous post I’ve explained what’s causing the error. If nobody will experience this in the next hours I’ll send you my theme eventually.
I don’t want to overcharge you now, you should be busy already 
Parker
- Sold between 250 000 and 1 000 000 dollars
- Exclusive Author
- Interviewed on the Envato Notes blog
- Author was Featured
- Item was Featured
- Beta Tester
- Author had a File in an Envato Bundle
- Author had a Free File of the Month
Ok,
I found the problem.
basically with 2.0.7 I’m forced to add these lines in functions.php
/** * Optional: set 'ot_show_pages' filter to false. * This will hide the settings & documentation pages. */ add_filter( 'ot_show_pages', '__return_false' ); /** * Required: set 'ot_theme_mode' filter to true. */ add_filter( 'ot_theme_mode', '__return_true' ); /** * Required: include OptionTree. */ include_once( 'option-tree/ot-loader.php' );
before I had these lines within my framework scripts… and everything was working till 2.0.6 with the old __construct function.
Parker
- Attended a Community Meetup
- Author had a File in an Envato Bundle
- Author was Featured
- Bought between 50 and 99 items
- Envato Staff
- Exclusive Author
- Has been a member for 4-5 years
- Item was Featured
ParkerAndKent said
valendesigns said
ParkerAndKent saidI highly doubt it’s broken. In what way do you use the plugin, as a plugin or in theme more? I need to know more about your setup. Also, if you send me a copy of your theme to derek[at]valendesigns.com I’ll tell you exactly why it’s not working.
Hi derek,v2.0.7 breaks everything. There’s an error with the css and js enqueuing I guess…
Basically the scripts URL is a mix of the plugin location and the ot folder location of the theme…
ParkerHi Derek,
well, v2.0.6 is working… so. I’m using ot in theme mode (no plugin in plugins folder, only in theme root) as for your instructions. Everything was working fine before. The settings array is created by me (not generated) and it’s correct.
My theme isn’t published yet, so I’m not in a hurry, I’m just testing everything to help you out.
In my previous post I’ve explained what’s causing the error. If nobody will experience this in the next hours I’ll send you my theme eventually.
I don’t want to overcharge you now, you should be busy already
Parker
Please just send it I need to see whats happening so I can either fix it or make a suggestion on how you could change your theme. Either way it’s now or later and I’m not going to have time later this week to focus on OT, I need to make this progress now.
- Sold between 250 000 and 1 000 000 dollars
- Exclusive Author
- Interviewed on the Envato Notes blog
- Author was Featured
- Item was Featured
- Beta Tester
- Author had a File in an Envato Bundle
- Author had a Free File of the Month
^
check my previous comment 
Additionally,
why do I have to put these lines within functions.php?
What’s the problem applying filters and requiring the ot-loader.php within other scripts? Just curious about this 
To let you understand how was before, my theme structure:
functions.php requires framework.php
framework.php has a main theme class that requires all the framework scripts
only when is_admin() == true admin scripts are required and so my theme-options.php where the filters, the ot-loader.php request and the settings array were placed.
Parker
Derek, could u explaine, please? I use these lines of code:
$primary_link_color = ot_get_option( 'primary_link_color' ); if ( empty( $primary_link_color ) ) return;
So, if $primary_link_color is empty it’s returns nothing, how could I also make returns nothing if I have standard value? For example, my standard value for $primary_link_color is #777777, it’s possible to make it works like above lines of code?
