Title: [Plugin: Twitter Tools] Lots of Validation Errors
Last modified: August 19, 2016

---

# [Plugin: Twitter Tools] Lots of Validation Errors

 *  [databell96](https://wordpress.org/support/users/databell96/)
 * (@databell96)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/plugin-twitter-tools-lots-of-validation-errors/)
 * I seem notice a lot of validation errors and warnings on my clients’ website.
   All mainly because of Twitter Tools. Mainly because a line of code like this:
 *     ```
       <link rel="stylesheet" type="text/css" href="http://www.radioactivemedia.net/index.php?ak_action=aktt_css&v=2.4" />
       ```
   
 * See the ampersand? That shouldn’t be there. If it read & it would validate. Can
   this script be fixed?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [stackedsax](https://wordpress.org/support/users/stackedsax/)
 * (@stackedsax)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-twitter-tools-lots-of-validation-errors/#post-1652644)
 * The ampersand looks fine. It’s just separating HTTP variables in the request.
   One variable is ‘ak_action’ and another variable is ‘v’. No harm done.
 * Now, what IS strange is that Twitter Tools loads its css like this. Why can they
   not use wp_enqueue_style like you’re supposed to?
 * Using index.php to dynamically generate a css file is one of the most bizarre
   things I’ve seen done in a long, long time. There is no need for the css to be
   generated dynamically. It’s not like Twitter Tools is using PHP variables in 
   any of the CSS definitions. Why on earth is this like this?
 * To make this better, rip out the code from lines 997 to 1523 (lines refer to 
   Twitter Tools 2.4). Remove everything from aktt_init() until and including add_action(‘
   init’, ‘aktt_resources’, 1);
 * In other words, remove this:
 *     ```
       function aktt_init() {
       	global $wpdb, $aktt;
       	$wpdb->aktt = $wpdb->prefix.'ak_twitter';
       	$aktt = new twitter_tools;
       ...
       ...
       ...
       <and everything in between>
       ...
       ...
       ...
       add_action('init', 'aktt_resources', 1);
       ```
   
 * Then, replace with some improved init functions:
 * _[Code moderated as per the [Forum Rules](http://codex.wordpress.org/Forum_Welcome).
   Please use the [pastebin](http://wordpress.pastebin.com)]_
 * Create two directories:
 * >  wp-content/plugins/twitter-tools/js
   >  wp-content/plugins/twitter-tools/css
 * And create 5 files:
 * >  wp-content/plugins/twitter-tools/js/aktt.js
   >  wp-content/plugins/twitter-tools/
   > js/aktt_admin.js wp-content/plugins/twitter-tools/js/aktt_prototype.js wp-content/
   > plugins/twitter-tools/css/aktt.css wp-content/plugins/twitter-tools/css/aktt_admin.
   > css
 * With the contents:
 * **wp-content/plugins/twitter-tools/js/aktt.js:**
 * _[Code moderated as per the [Forum Rules](http://codex.wordpress.org/Forum_Welcome).
   Please use the [pastebin](http://wordpress.pastebin.com)]_
 * I could make one or two more improvements, like not loading the aktt.css in the
   admin, but whatever. At least this allows me to cache the css and js on my CDN
   now. Phew.
 *  [stackedsax](https://wordpress.org/support/users/stackedsax/)
 * (@stackedsax)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-twitter-tools-lots-of-validation-errors/#post-1652645)
 * Oh whatever. Thanks very much, moderator.
 * [http://wordpress.pastebin.com/paKqZJYA](http://wordpress.pastebin.com/paKqZJYA)
 * You can figure it out if you guys want to. I’m done helping the community for
   the day.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘[Plugin: Twitter Tools] Lots of Validation Errors’ is closed to new replies.

## Tags

 * [ampersand](https://wordpress.org/support/topic-tag/ampersand/)
 * [validation](https://wordpress.org/support/topic-tag/validation/)

 * 2 replies
 * 2 participants
 * Last reply from: [stackedsax](https://wordpress.org/support/users/stackedsax/)
 * Last activity: [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-twitter-tools-lots-of-validation-errors/#post-1652645)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
