{"id":5777714,"date":"2015-02-11T19:46:38","date_gmt":"2015-02-11T19:46:38","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/hard-coded-paths-and-directories\/"},"modified":"2016-08-22T16:26:04","modified_gmt":"2016-08-22T16:26:04","slug":"hard-coded-paths-and-directories","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/hard-coded-paths-and-directories\/","title":{"rendered":"Hard-coded paths and directories&#8230;"},"content":{"rendered":"<p>I like Jssor Slider. It looks neat. So I was very happy to see someone had made a plugin for WordPress. But you have hard-coded directories for wp-content and plugins&#8230; I never use wp-content for any of my WordPress projects.<\/p>\n<p>You should consider revising this part:<\/p>\n<pre><code>if ( !defined( &#039;JSSOR_CONTENT_DIR&#039; ) ) define( &#039;JSSOR_CONTENT_DIR&#039;, ABSPATH . &#039;wp-content&#039; );\n\tif ( !defined( &#039;JSSOR_MAIN_DIR&#039; ) ) define( &#039;JSSOR_MAIN_DIR&#039;, ABSPATH . &#039;wp-content\/jssor-slider&#039; );\n\tif ( !defined( &#039;JSSOR_MAIN_UPLOAD_DIR&#039; ) ) define( &#039;JSSOR_MAIN_UPLOAD_DIR&#039;, ABSPATH . &#039;wp-content\/jssor-slider\/jssor-uploads\/&#039; );\n\tif ( !defined( &#039;JSSOR_MAIN_THUMB_DIR&#039; ) ) define( &#039;JSSOR_MAIN_THUMB_DIR&#039;, ABSPATH . &#039;wp-content\/jssor-slider\/thumbs\/&#039; );\n\tif ( !defined( &#039;JSSOR_CONTENT_URL&#039; ) )  define( &#039;JSSOR_CONTENT_URL&#039;, site_url() . &#039;\/wp-content&#039; );\n\tif ( !defined( &#039;JSSOR_PLUGIN_DIR&#039; ) ) define( &#039;JSSOR_PLUGIN_DIR&#039;, JSSOR_CONTENT_DIR . &#039;\/plugins&#039; );\n\tif ( !defined( &#039;JSSOR_PLUGIN_URL&#039; ) ) define( &#039;JSSOR_PLUGIN_URL&#039;, JSSOR_CONTENT_URL . &#039;\/plugins&#039; );\n\tif ( !defined( &#039;JSSOR_SL_PLUGIN_FILENAME&#039; ) ) define( &#039;JSSOR_SL_PLUGIN_FILENAME&#039;, basename(__FILE__) );\n\tif ( !defined( &#039;JSSOR_SL_PLUGIN_DIRNAME&#039; ) ) define( &#039;JSSOR_SL_PLUGIN_DIRNAME&#039;, plugin_basename( dirname(__FILE__) ) );\n\tif ( !defined( &#039;JSSOR_SL_PLUGIN_DIR&#039; ) ) define( &#039;JSSOR_SL_PLUGIN_DIR&#039;, JSSOR_PLUGIN_DIR . &#039;\/&#039; . JSSOR_SL_PLUGIN_DIRNAME );\n\tif ( !defined( &#039;JSSOR_SL_PLUGIN_URL&#039; ) ) define( &#039;JSSOR_SL_PLUGIN_URL&#039;, site_url() . &#039;\/wp-content\/plugins\/&#039; . JSSOR_SL_PLUGIN_DIRNAME );\n\tif ( !defined( &#039;JSSOR_SLIDER_PATH&#039; ) )  define( &#039;JSSOR_SLIDER_PATH&#039;, plugin_dir_path( __FILE__ ) );\n\n\tif ( !defined( &#039;JSSOR_SL_THUMB_URL&#039; ) ) define( &#039;JSSOR_SL_THUMB_URL&#039;, site_url() . &#039;\/wp-content\/jssor-slider\/jssor-uploads\/&#039; );\n\tif ( !defined( &#039;JSSOR_SL_THUMB_SMALL_URL&#039;) ) define( &#039;JSSOR_SL_THUMB_SMALL_URL&#039;, site_url() . &#039;\/wp-content\/jssor-slider\/thumbs\/&#039; );<\/code><\/pre>\n<p>https:\/\/wordpress.org\/plugins\/jssor-slider\/<\/p>\n","protected":false},"template":"","class_list":["post-5777714","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/5777714","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/5777714\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=5777714"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}