Hard-coded paths and directories…
-
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… I never use wp-content for any of my WordPress projects.
You should consider revising this part:
if ( !defined( 'JSSOR_CONTENT_DIR' ) ) define( 'JSSOR_CONTENT_DIR', ABSPATH . 'wp-content' ); if ( !defined( 'JSSOR_MAIN_DIR' ) ) define( 'JSSOR_MAIN_DIR', ABSPATH . 'wp-content/jssor-slider' ); if ( !defined( 'JSSOR_MAIN_UPLOAD_DIR' ) ) define( 'JSSOR_MAIN_UPLOAD_DIR', ABSPATH . 'wp-content/jssor-slider/jssor-uploads/' ); if ( !defined( 'JSSOR_MAIN_THUMB_DIR' ) ) define( 'JSSOR_MAIN_THUMB_DIR', ABSPATH . 'wp-content/jssor-slider/thumbs/' ); if ( !defined( 'JSSOR_CONTENT_URL' ) ) define( 'JSSOR_CONTENT_URL', site_url() . '/wp-content' ); if ( !defined( 'JSSOR_PLUGIN_DIR' ) ) define( 'JSSOR_PLUGIN_DIR', JSSOR_CONTENT_DIR . '/plugins' ); if ( !defined( 'JSSOR_PLUGIN_URL' ) ) define( 'JSSOR_PLUGIN_URL', JSSOR_CONTENT_URL . '/plugins' ); if ( !defined( 'JSSOR_SL_PLUGIN_FILENAME' ) ) define( 'JSSOR_SL_PLUGIN_FILENAME', basename(__FILE__) ); if ( !defined( 'JSSOR_SL_PLUGIN_DIRNAME' ) ) define( 'JSSOR_SL_PLUGIN_DIRNAME', plugin_basename( dirname(__FILE__) ) ); if ( !defined( 'JSSOR_SL_PLUGIN_DIR' ) ) define( 'JSSOR_SL_PLUGIN_DIR', JSSOR_PLUGIN_DIR . '/' . JSSOR_SL_PLUGIN_DIRNAME ); if ( !defined( 'JSSOR_SL_PLUGIN_URL' ) ) define( 'JSSOR_SL_PLUGIN_URL', site_url() . '/wp-content/plugins/' . JSSOR_SL_PLUGIN_DIRNAME ); if ( !defined( 'JSSOR_SLIDER_PATH' ) ) define( 'JSSOR_SLIDER_PATH', plugin_dir_path( __FILE__ ) ); if ( !defined( 'JSSOR_SL_THUMB_URL' ) ) define( 'JSSOR_SL_THUMB_URL', site_url() . '/wp-content/jssor-slider/jssor-uploads/' ); if ( !defined( 'JSSOR_SL_THUMB_SMALL_URL') ) define( 'JSSOR_SL_THUMB_SMALL_URL', site_url() . '/wp-content/jssor-slider/thumbs/' );
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Hard-coded paths and directories…’ is closed to new replies.