?
Solved

Prevent my Non-Techie Wordpress Users from Hotlinking

Posted on 2013-01-24
4
Medium Priority
?
404 Views
Last Modified: 2013-01-25
I have a customer website with around 50 authors creating content for the site every day.  Some of these authors are less technical and keep hotlinking to images on other websites.  Does anyone know if there is a plugin for Wordpress that disables the insert image from another url feature?  

To be clear, I don't have others linking to my images.  I have non-technical users who are creating <img src="xxxx"> tags that link xxxx to some other websites image
0
Comment
Question by:jer2eydevil88
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 2

Expert Comment

by:andy_adams
ID: 38819765
I don't know of a plugin that does this, but if you're comfortable adding your own filters, you can do something like the following (assuming you're on WP 3.5):

function my_filter_media_view_strings( $strings ) {
    unset( $strings['insertFromUrlTitle'] );

    return $strings;
}

add_filter( 'media_view_strings', 'my_filter_media_view_strings' );

Open in new window


This will remove the option from the media overlay. Let me know if you hit any issues!
0
 
LVL 3

Author Comment

by:jer2eydevil88
ID: 38819834
What file would I edit in WP 3.5 to put this modified code?
0
 
LVL 2

Accepted Solution

by:
andy_adams earned 2000 total points
ID: 38819854
The easiest way would be to add your own plugin, with a single file. The contents of the file would look like this:

<?php
/*
Plugin Name: Prevent Image Hotlinks
Plugin URI: #
Description:
Author: jer2eydevil88
Version: 0.1
Author URI: #
*/

function my_filter_media_view_strings( $strings ) {
    unset( $strings['insertFromUrlTitle'] );

    return $strings;
}

add_filter( 'media_view_strings', 'my_filter_media_view_strings' );

Open in new window


You could upload this file to your wp-content/plugins/ directory, or ZIP it up and install it using the built-in installer. Let me know if that does it!
0
 
LVL 3

Author Closing Comment

by:jer2eydevil88
ID: 38819915
Needed the closing ?> for the PHP tag.  I went ahead and put it into a folder and zipped it so others can use this.  

https://syntress.com/?attachment_id=29379011
0

Featured Post

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to install BuddyPress on your self-hosted WordPress site It’s been called everything from “social networking in a box” to “Facebook without the terms of service,” but until Feb. 16, BuddyPress was a relatively unknown outside the WordPress MU…
I want to start by talking about the use of plug-ins for WordPress. I started a web-site for a company I was working for a few years ago; I had extremely basic knowledge of HTML. I am a Graphic Designer by trade so I invited the opportunity as a cha…
The purpose of this video is to demonstrate how to add AdSense Ads to a WordPress Website, and how to set up WordPress to automatically place Ads in Sidebars. This will be demonstrated using a Windows 8 PC. Log into your AdSense account. : Cli…
The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question