Forums

plugin function call onClick (1 post)

  1. liamgoldstein
    Member
    Posted 1 year ago #

    Hey.

    I've been having a go at creating a custom plugin (simplified code below).

    I have my plugin file (counter.php) which has 2 function in it called

    displayCount() {
        // output count and a link to add 1
        echo '<a href="XXX">Add One</a>';
    }

    AND

    addOne() {
        $count = $count + 1;
    }

    My question is what to I replace XXX with or how do I call addOne function from my post page?

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic