title: Create a function that can be used anywhere within Wordpress site
body: <p>I want to create a number of functions in my plugin 'membershipintegration.php' which can be called anywhere on my Wordpress site.</p>
  
  <p>I thought that if I created a class and defined a public function within the class in the membershipintegration.php I could use it wherever I liked.</p>
  
  <pre><code>class MembershipIntegration
  {
    public function switchmembership () {
    echo 'some code'
    }
  }
  </code></pre>
  
  <p>However, it doesn't seem to work and I've used 'function_exists' on my sandbox page and it says the function isn't active.</p>
  
  <p>Any thoughts much appreciated. Thank you.</p>