You can validate html if you want using WordPress’ wp_kses function, although it’s not super performant. I believe you could do something like this:
$text = ot_get_option( 'text_option' ); // From Theme Options $class = ot_get_option( 'class_option' ); // From Theme Options $output = '<span class="' . sanitize_html_class( $class ) . '">' . $text . '</span>'; echo wp_kses( $output, // Only allow <span> with class array( 'span' => array( // Here, we whitelist 'class' attributes - nothing else allowed! 'class' => array(), ) ) ); </span>
This is better for storing data in the database not during output sanitization because of the performance hit. However, on a short amount of content isn’t too bad:https://www.tollmanz.com/wp-kses-performance/
If you go the route of escaping in final output (probably recommended), I would use WordPress’ sanitize_html_class function for the class variable as it’s more appropriate:
$text = ot_get_option( 'text_option' ); // From Theme Options $class = ot_get_option( 'class_option' ); // From Theme Options <!--- somewhere in the html structure ---> <span class="<?php echo sanitize_html_class( $class ); ?>"><?php echo esc_html( $text ); ?></span>https://codex.wordpress.org/Function_Reference/sanitize_html_class
Got my OnePlus One about a month ago. I upgraded from a Nexus 4. Battery life is on-par with phones of this generation (I can get around 1.5 to 2 days on a single charge with moderate usage).
Performance-wise, it’s a really fast phone. I haven’t experienced any lag and everything runs super fast. No heat issues either. Cyanogen is really nice and lightweight which I think lets Android run super fast. I think coming from iOS you’ll probably geek out over the customization you can do on Android and especially Cyanogen.
The camera shoots awesome photos in perfect lighting scenarios (even in RAW format!), but struggles in low light (grainy). It also shoots 4k video, but I can’t really notice a difference between the 1080 and 4k from footage shot. The downside to this phone is definitely the camera limitations in low light. iPhone and Samsung have better cameras than the OnePlus. That’s not to say the OnePlus has a bad camera. You can still get good shots though, so for me this isn’t a dealbreaker.
Just a quick tip – I wouldn’t justify any of the body text on your site. This creates big holes in the blocks of text that interrupt reading. Additional resources:http://designforhackers.com/blog/never-justify-type-on-the-web/
I create and sell digital products!
Sigh, I guess I’m a web designer…
Yes, the infocus folder should be the theme folder. As long as it has the style.css file in it, it should work.
Also, this is a general forum. Item specific questions should be directed towards the theme author. You can find support for that theme here:http://mysitemyway.com/support/?themeforest=true
This usually takes a few days… le sigh
uziiuzair saidThat’s why you should use GIT. You could rollback your commits
I decided to finish a web development project today [for themeforest] (one that had been put on hold for a couple of weeks.). So for the past 10 hours, I had been working to finalise my design.
Well I got tired after 8 hours but kept working.
And I just realised that I have messed up the entire code
Its not clean any more Ive have added wayy too many CSS files that I usually work with. And I dont understand my own code
Agreed. I put off using git (or any version control) because it looked very complex and hard to learn. I found it much easier to learn using a GUI tool called SourceTree http://www.sourcetreeapp.com/ along with bitbucket (both are free). There’s lots of great tutorials on both. Hope that helps.