Wordpress Insert Link Class Plugin

07 Mar 2010

Insert Link Class is a plugin for Wordpress that adds additional classes to the class option within the Insert / Edit Link functionality of Wordpress’ TinyMCE editor.

Insert Link Class Plugin

Installation:

  1. Download the Insert Link Class Plugin.
  2. In your Wordpress Administration, go to Plugins > Add New > Upload, and select the plugin ZIP file.
  3. Activate the plugin
  4. You’ll see a Link Classes option appear on the menu; use this to add, edit and delete custom classes.

Insert Link Class Plugin - Admin Interface

Known Bugs / Issues:

  1. Form validation needed.
  2. Better handling of Wordpress’ in built classes.

I’m hoping to keep this plugin updated and publish some fixes within the next few weeks – so if there are any other issues, please leave a comment to let me know.

Download:

Download Plugin.

Comment #1

10 Mar 2010
  • Posted at 03:25:23
  • Jandal

G’day,

Amazing plugin, made it super easy for me to add custom classes to my editor then all I had to do was add the class to my custom theme.

You should add this to the WordPress.org plugin site.

Thank you,
=-)

Comment #2

10 Mar 2010
  • Posted at 15:15:11
  • Tim

Hi Jandal,

The plugin was added to the Wordpress Plugin site today, and can be found at http://wordpress.org/extend/plugins/insert-link-class/

Thanks,

Tim.

Comment #3

15 Mar 2010
  • Posted at 18:53:23
  • Ty

Hello Tim,

Thank you for this plugin it is a life saver. I found an issue with a Wordpress MU install version 2.9.2. Where you define the PLUGIN_ROOT you are replacing everything in dirname(__FILE__) up until root of the plugin name. The plugin was unable to find the include reference to your list.php file. To fix this I removed any replacement of the dirname(__FILE__) path and appended a “/” to the end of the path and it fixed the include reference problem. Seems like this could be a better approach because it references the entire plugin path.

Thanks for the plugin.

Ty

Comment #4

19 Mar 2010
  • Posted at 15:45:28
  • Dennis

After installing and activating the plug-in, when I go to the settings menu to add some classes, the screen is blank; no options appear? I’m running 2.9.2 via Firefox 3.6.

Comment #5

19 Mar 2010
  • Posted at 18:09:39
  • Tim

@Ty – thanks, will get that fixed and update the plugin on Wordpress.

@Dennis – either you’re not running PHP5 on your server, you’re not an Administrator of Wordpress or the plugin hasn’t activated properly.

Comment #6

19 Mar 2010
  • Posted at 20:52:33
  • Dennis

I am running PHP Version 5.1.5. I am logged into Wordpress via the administrator account. I deactivated and deleted the plug-in. I then grabbed the plug-in again from your website, this time, FTP-ing it to the plug-in directory, then activating it. I get the Settings submenu under the Link Classes menu on the right side. However, when I click the settings option under Link Classes, the content area goes blank; no options to set.

Comment #7

19 Mar 2010
  • Posted at 21:53:58
  • Tim

@Dennis – not sure then, first time I’ve heard of that issue. Only other thought is a conflict with another theme or plugin, either using the same action / filter hooks or same constant definition. Also, the plugin can’t be ‘grabbed’ from this site – it’s only hosted on Wordpress.org, so I’m not sure what you mean.

Comment #8

20 Mar 2010
  • Posted at 03:05:43
  • Dennis

Sorry, first time, I installed it via install link from plug-in search inside Wordpress. Second time, I downloaded from your link above (yes, Wordpress site). I’ll try troubleshooting by deactivating other plug-ins one by one. Thanks.

Comment #9

20 Mar 2010
  • Posted at 09:43:38
  • Tim Carr

@Dennis – let me know how you get on and if you find the cause of the issue.

Comment #10

23 Mar 2010
  • Posted at 17:05:59
  • Chris Chiles

I also had an issue with the PLUGIN_ROOT. I fixed it by changing it to this:

define(PLUGIN_ROOT, WP_PLUGIN_DIR.”/insert-link-class”);

Comment #11

07 Apr 2010
  • Posted at 22:52:00
  • Jennifer

I’m running into the “blank settings page” problem as well. Fresh wordpress install, default theme, no other plugins installed… (However it is installed on a windows server – but it would be nice if it could work there too regardless.)

Comment #12

07 Apr 2010
  • Posted at 22:57:08
  • Jennifer

And actually – tried it on a clean local install (apache) and have the same problem…

Comment #13

07 Apr 2010
  • Posted at 23:15:41
  • Tim

@Jennifer – PHP version? Wordpress version? Administrator? Wordpress Debug info (Google’s your friend on how to output this).

Yes, it would be nice if it worked on Windows servers, but it’s a free plugin I put together to solve a common issue, which means I won’t have tested it on every possible server environment.

If you want a plugin that meets your requirements, you’re going to need to contribute a bit more information and time.

Comment #14

17 Apr 2010
  • Posted at 22:43:18
  • Tom

Hi, I installed and have righ PHP, Admin right and updated WP, but when I click on the “Link Classes” Link on the left nav…i get the following error
***************
Warning: include_once() [function.include]: Failed opening ‘/insert-link-class-plugin/list.php’ for inclusion (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/how2buil/public_html/wp-content/plugins/insert-link-class/insert-link-class-plugin.php on line 108
************

Any idea if this is fixable?

Best, Tom

Comment #15

25 Apr 2010
  • Posted at 16:31:13
  • Phil

Wicked plugin, thanks for sharing, just what I was looking for!

Comment #16

30 Apr 2010
  • Posted at 11:00:23
  • kilian

i got the same error like tom – i could not edit the plugins settings.
somehow strange because the files the plugin allegedly could not include are definitely in the plugins folders

Comment #17

07 May 2010
  • Posted at 10:06:42
  • vabhe

Great idea, but is broken for me…
I’ve PHP 5.2.4

this is what i get on the plugin settings page:

Warning: InsertLinkClassPlugin::include_once(/insert-link-class-plugin/list.php) [function.InsertLinkClassPlugin-include-once]: failed to open stream: No such file or directory in /**MYPATH**/wp-content/plugins/insert-link-class/insert-link-class-plugin.php on line 108

Warning: InsertLinkClassPlugin::include_once() [function.include]: Failed opening ‘/insert-link-class-plugin/list.php’ for inclusion (include_path=’.:/usr/share/php:/usr/share/pear’) in /**MYPATH**/wp-content/plugins/insert-link-class/insert-link-class-plugin.php on line 108

Comment #18

25 May 2010
  • Posted at 15:25:41
  • Greg

Hi Tim,

That’s my problem (looks like 14):
- Everything OK installing your plugin in my 2.9.2
- But when I clic “Link Classes / Settings”, i got this error:

Warning: InsertLinkClassPlugin::include_once(/insert-link-class-plugin/list.php) [function.InsertLinkClassPlugin-include-once]: failed to open stream: No such file or directory in /srv/d_XXXXXXX/www/blog.XXXXXXX.fr/htdocs/wp-content/plugins/insert-link-class/insert-link-class-plugin.php on line 108

Warning: InsertLinkClassPlugin::include_once() [function.include]: Failed opening ‘/insert-link-class-plugin/list.php’ for inclusion (include_path=’.:/usr/share/php:/usr/share/pear’) in /srv/d_XXXXXXX/www/blog.XXXXXXX.fr/htdocs/wp-content/plugins/insert-link-class/insert-link-class-plugin.php on line 108

Any idea?

Thanks

Comment #19

25 May 2010
  • Posted at 21:22:17
  • Carmen Brenner

Actually, the error mentioned above is very easy to solve. You simply have to rename your plugin folder from “insert-link-class” to “insert-link-class-plugin” as the PLUGIN_NAME is set wrong. ;)

Comment #20

25 Jun 2010
  • Posted at 22:45:09
  • Drew

Carmen is correct, it was an easy fix.

define(PLUGIN_NAME, ‘insert-link-class-plugin’); // Plugin programmatic name

Should be

define(PLUGIN_NAME, ‘insert-link-class’); // Plugin programmatic name

The directory isn’t called /insert-link-class-plugin/ there’s no ‘-plugin’

Comment #21

08 Jul 2010
  • Posted at 03:13:02
  • Lorin

I am also getting the ‘blank screen’ problem. It installed and activated successfully. But when you click on ‘Link classes’ or ‘Settings’ there are no options, just a bank screen.

Comment #22

13 Jul 2010
  • Posted at 16:23:23
  • Robbie

Was getting the same ‘blank screen’ problem mentioned above (on a Linux server).

Used comment #19 to rectify it – simply change the name of the plugin folder to “insert-link-classlplugin’ and then re-activate it on the admin page.

Thanks Carmen

Post Comment