• Resolved ia2ca

    (@ia2ca)


    Cross-posting here for visibility –

    It appears that the latest WP update (4.2) is incompatible with Ultimate Nofollow. When active, it will not allow you to insert any link at all. Only disabling the plugin can you insert any hyperlink.

    https://wordpress.org/plugins/nofollow/

Viewing 15 replies - 16 through 30 (of 31 total)
  • Jackoz

    (@jackoz)

    Dont work, fix it please admin πŸ™

    zoecorkhill

    (@zoecorkhill)

    I’ve contacted the plugin author with my fix so hopefully it will be applied to the plugin in an update.

    @zoecorkhill thanks for taking the time to post a fix, it worked for me. I work with a lot of links daily and it’s going to save me a lot of manual labor!

    @zoecorkhill I’m having trouble downloading it from dropbox πŸ™ is there a mirror somewhere?

    @lozbo No problem, try this instead:

    http://corkydev.co.uk/files/nofollow-edit.zip

    I’ve been having the same issue.

    Kudos to @zoecorkhill for the updated version. πŸ™‚

    Hopefully we get an official update too. πŸ™‚

    Edit works. *high five* – Thanks Zoe

    Now if only WordPress would add back the link title field. They replaced it with “link text” which personally I think it a pointless change. Link text is determined by highlighting the text you want…why take away the ability to title a link? *shrug*

    You can also check this plugin:

    https://wordpress.org/plugins/wpres-nofollow-link/

    This plugin is in the official wordpress repository.
    this means got to admin->install plugins->search for “wpres nofollow” -> click install and you’r done. the updates are completely automatic so no need to do something manually πŸ˜‰

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    @vogelor Could you please stop posting the same thing everywhere, repeatedly, many, many, many times? πŸ˜‰

    You’re coming across to the system as a spammer. Thanks, but once or twice is enough and you don’t have to keep posting that plugin in so many topics.

    O.K. i ca stop it. no problem. i only postet it on every post, a user has a problem with the plugin. there are many different posts, so i postet it on every of them. if this is forbidden, i stop it. i don’t want to spam. sorry

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Thank you for understanding. πŸ˜€

    no problem πŸ˜‰ as i said, i only wanted to help, not to spam

    Update to version 1.4.3.

    Please note that this plugin changes core WordPress functionality (i.e. modifies raw JS) in a way that is not modular and may break after major WordPress updates.

    Pretty sure you can do this without completely replacing the core wplink.js file (which is dangerous because of the issues discussed in this thread). This method uses some javascript trickery in order to call all the original wplink functions, but modify their output.

    Here’s example plugin code specifically for the tinymce wplink replacement. Feel free to use it in your plugin:

    nofollow.php:

    // Add the javascript that extends TinyMCE plugin wplink.js.
    function wplink_nofollow_enqueue_scripts( $admin_page ) {
    	// Only load on edit pages.
    	if ( 'edit.php' !== $admin_page && 'post-new.php' !== $admin_page ) {
    		return;
    	}
    	wp_enqueue_script( 'wplink_nofollow', plugin_dir_url( __FILE__ ) . 'wplink-nofollow.js' );
    }
    add_filter( 'admin_enqueue_scripts', 'wplink_nofollow_enqueue_scripts' );

    wplink-nofollow.js:

    ( function ( $ ) {
    	$( document ).ready( function () {
    		// Add a function that inserts the nofollow checkbox in the wplink modal.
    		wpLink.addNofollowCheckbox = function () {
    			var html = '<br /><label><span> </span><input type="checkbox" id="link-nofollow-checkbox" /> Add <code>rel="nofollow"</code> to link</label>';
    			$('#wp-link .link-target').append( html );
    		}
    
    		// Extend wpLink.getAttrs to include rel=nofollow.
    		var coreGetAttrs = wpLink.getAttrs;
    		wpLink.getAttrs = function () {
    			var attributes = coreGetAttrs.apply( coreGetAttrs );
    			if ( $( '#link-nofollow-checkbox' ).is( ':checked' ) ) {
    				attributes.rel = 'nofollow';
    			}
    			return attributes;
    		}
    
    		// Add the nofollow checkbox to the wplink modal (on edit.php and post-new.php pages).
    		wpLink.addNofollowCheckbox();
    	});
    })( jQuery );

    Much simpler!

    Update to the last post: I had to get a bit more detailed in order to add/remove the extra attributes and to update the state of the checkbox. If you’re interested, here’s my functioning code that does something very similar (adds a checkbox that adds a “required” class to the link if the checkbox is marked). Feel free to use it in Ultimate Nofollow if you’d like.

    https://gist.github.com/figureone/43661c51d992d89e56e1

Viewing 15 replies - 16 through 30 (of 31 total)
  • The topic ‘WordPress 4.2 issues’ is closed to new replies.