The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Autoload Classes
#3
so far its autoloading userspice classes fine, not ran into any problems so far, im also working on a hooks & filters class ( it works exactly like wordpress's hooks & filters )

so we can register a hook to place in the header for example:
<pre>
Code:
function my_header {
    do_action('my_header');
}
</pre>


then we can create our header function to output meta tags for example:

<pre>
Code:
function my_meta {
  echo 'my meta will be here';
}
add_action('my_meta', 'my_header');
</pre>


the beauty of this is we can use filters or remove the action especially usefull in custom functions in usersc folder, we can use it for menu's, headers, footers etc its realy is unlimited
  Reply


Messages In This Thread
Autoload Classes - by firestorm - 07-07-2017, 08:48 AM
Autoload Classes - by mudmin - 07-09-2017, 12:12 PM
Autoload Classes - by firestorm - 07-09-2017, 01:50 PM
Autoload Classes - by mudmin - 07-09-2017, 02:10 PM
Autoload Classes - by firestorm - 07-09-2017, 02:12 PM
Autoload Classes - by firestorm - 07-13-2017, 01:09 PM
Autoload Classes - by mudmin - 07-13-2017, 01:26 PM
Autoload Classes - by firestorm - 07-13-2017, 05:46 PM
Autoload Classes - by karsen - 07-15-2017, 03:17 PM
Autoload Classes - by mudmin - 07-15-2017, 03:25 PM
Autoload Classes - by firestorm - 07-15-2017, 04:19 PM
Autoload Classes - by firestorm - 07-16-2017, 09:23 AM
Autoload Classes - by mudmin - 08-05-2017, 05:07 PM

Forum Jump:


Users browsing this thread: 5 Guest(s)