WordPress.org

Forums

HTML Javascript Adder
Hardcoded path break plugin with mpoved wp-content location (1 post)

  1. unclego
    Member
    Posted 1 year ago #

    Insead

    if(!defined('WP_CONTENT_URL')) {
    	$hja_url = get_option('siteurl') . '/wp-content/plugins/' . plugin_basename(dirname(__FILE__)).'/';
    }else{
    	$hja_url = WP_CONTENT_URL . '/plugins/' . plugin_basename(dirname(__FILE__)) . '/';
    }

    you should use
    $hja_url = plugins_url() . '/' .plugin_basename(dirname(__FILE__)) . '/';

    http://wordpress.org/plugins/html-javascript-adder/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.