WordPress.org

Ready to get started?Download WordPress

Forums

Constant or function,it is a problem. (1 post)

  1. suifengtec
    Member
    Posted 4 months ago #

    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!

Reply

You must log in to post.

About this Topic