<?php
namespace EPWF\Includes;
defined('ABSPATH')||exit;
class Loader {
    private $a=[],$f=[];
    public function add_action($h,$c,$m,$p=10,$n=1){$this->a[]=compact('h','c','m','p','n');}
    public function add_filter($h,$c,$m,$p=10,$n=1){$this->f[]=compact('h','c','m','p','n');}
    public function run(){
        foreach($this->f as $f)add_filter($f['h'],[$f['c'],$f['m']],$f['p'],$f['n']);
        foreach($this->a as $a)add_action($a['h'],[$a['c'],$a['m']],$a['p'],$a['n']);
    }
}
