Constant or function,it is a problem.
-
Howdies!
define('XXX_PLUGIN_XXX_URL',plugin_dir_url( __FILE__ )); add_filter('the_conrtent','my_function'); function my_function($content){ $img=XXX_PLUGIN_XXX_URL.'img/img/png'; $content.=..... return $content; }and
add_fliter('the_content', 'my_function') function my_function($content){ $img=plugin_dir_url( __FILE__ ).'img/img.png'; $content.=...... return $content; }Which will better?
Thanks!
The topic ‘Constant or function,it is a problem.’ is closed to new replies.