3256 posts
  • Has referred 100+ members
  • Has sold $250,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+9 more
ParkerAndKent says

^

Additionally, there’s something breaking when in theme mode. The OT admin pages are visible also if disabled by the theme…

Parker

438 posts
  • Has been part of the Envato Community for over 2 years
  • Has sold $5,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Located in Europe
+1 more
Pixelous says

Hm, I have v2.0.7 with theme-mode Step 1 and it’s works fine for me.

3256 posts
  • Has referred 100+ members
  • Has sold $250,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+9 more
ParkerAndKent says

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 :)

3256 posts
  • Has referred 100+ members
  • Has sold $250,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+9 more
ParkerAndKent says

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

119 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 50+ members
  • Has sold $75,000+ on Envato Market and is now an Elite Author
  • Had an item featured in an Envato Bundle
+8 more
valendesigns Envato team says

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.

3256 posts
  • Has referred 100+ members
  • Has sold $250,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+9 more
ParkerAndKent says


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.

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

3256 posts
  • Has referred 100+ members
  • Has sold $250,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+9 more
ParkerAndKent says

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

119 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 50+ members
  • Has sold $75,000+ on Envato Market and is now an Elite Author
  • Had an item featured in an Envato Bundle
+8 more
valendesigns Envato team says



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.

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

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.

3256 posts
  • Has referred 100+ members
  • Has sold $250,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+9 more
ParkerAndKent says

^

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

438 posts
  • Has been part of the Envato Community for over 2 years
  • Has sold $5,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Located in Europe
+1 more
Pixelous says

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?

by
by
by
by
by
by