php - concatenating a function and a string -
i have statically:
define( 'plugin_basename', 'new-plugin/new-plugin.php' ); and get_option('plmn-plugin-field') give dynamic name. e.g. if gives abcd, should be:
define( 'plugin_basename', 'abcd/abcd.php' ); and not working:
define( 'plugin_basename', 'get_option('plmn-plugin-field')/get_option('plmn-plugin-field').php' ); how can make working?
you need below:-
define( 'plugin_basename', get_option('plmn-plugin-field').'/'.get_option('plmn-plugin-field').'.php' ); note:- function inside single quote not execute in case.also need concatenate / , .php functions.
a demo example:- https://eval.in/859990
Comments
Post a Comment