Skip to content

Instantly share code, notes, and snippets.

@melefabrizio
Last active February 12, 2019 22:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save melefabrizio/6a8fc87e065aee3dd92f10cffcadffc4 to your computer and use it in GitHub Desktop.
Save melefabrizio/6a8fc87e065aee3dd92f10cffcadffc4 to your computer and use it in GitHub Desktop.
<?php
namespace WP_Plugin_Name\Inc\Admin;
use WP_Plugin_Name\Inc\Common\CommonClass;
class Admin{
...
function foo(){
$common = new CommonClass();
$result = $common->commonFunction();
}
}
<?php
namespace WP_Plugin_Name\Inc\Common;
class CommonClass {
public function commonFunction(){
return null;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment