The following warnings occurred: | |||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
|
Page content hook suggestions - Printable Version +- GetSimple Support Forum (http://get-simple.info/forums) +-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3) +--- Forum: Feature Requests (http://get-simple.info/forums/forumdisplay.php?fid=7) +--- Thread: Page content hook suggestions (/showthread.php?tid=3406) |
Page content hook suggestions - bogyvet - 2012-08-06 This is code that I work with to be able to implement PAGE SHORTCODES. When I start adding SHORTCODES I realize that code: Code: add_filter('content', 'FUNCTION_TO_CALL'); Work only with page $content variable. So it wasn't possible to add shortcodes in template. Modifications index.php: Code: ob_start(); And I call function : Code: add_filter('page-content', 'FUNCTION_TO_CALL'); I think this is cleanest solution, and could be implemented in core. In this way implementing caching system would be easy. And base functionality is not changed. Page content hook suggestions - shawn_a - 2012-08-06 Why would you want to use short codes in templates when you can call php functions directly. No sure I understand. Page content hook suggestions - bogyvet - 2012-08-06 I didn't think about it. Why not ??? Forget Shortcodes. You can use caching system, code indentation fix and few more things with this. |