02/18/2014 at 11:26 am
#280325
Keymaster
@ Jon
Yes, you should be able to add classes based on $level
. The $level
variable increments by 1 for each level. So, the second level the value of $level
would be 2
and for the third $level
the value would be 3
and so on.Something like this may work:
$class = 'class="cn-cat-level-' . $level . '"';
Then you would have to update lines 1010 and 1014 to add the $class
.
Updated Line 1010:
$out .= sprintf('<option %4$s style="padding-left: %1$dpx !important" value="%2$s"%3$s>' . /*$pad .*/ $category->name . $count . '</option>' , $pad , $category->term_id , $strSelected , $class );
Updated Line 1014:
$out .= sprintf('<option %4$s style="padding-left: %1$dpx !important" value="%2$s"%3$s>' . /*$pad .*/ $category->name . $count . '</option>' , $pad , $category->term_id , $strSelected , $class );
That should do it.
I just added the same classes to the dev version of Connections so if you make these changes, they will be forward compatible; meaning, your CSS will not break.
PS: If you have a moment, I would truly appreciate a review as they really do make a difference. Many thanks in advance.
http://wordpress.org/support/view/plugin-reviews/connections