Modifying a JS file with data from plugin settings
better is, you use the functions of WP for this, a example for multilanguage: add_action( ‘admin_enqueue_scripts’, ‘add_scripts’ ); function add_scripts($where) { wp_localize_script( ‘post2media’, ‘post2media_strings’, $this->localize_vars() ); } function localize_vars() { $strings = array( ‘btntext’ => __( ‘Link with post’, INPSYDE_P2M_TEXTDOMAIN ), ‘txtallnone’ => __( ‘Include in gallery:’, INPSYDE_P2M_TEXTDOMAIN ), ‘txtall’ => __( ‘All’, INPSYDE_P2M_TEXTDOMAIN ), … Read more