Last active
May 1, 2025 16:27
-
-
Save sc0ttkclark/35a15e6f93622c45f12d671184fb1315 to your computer and use it in GitHub Desktop.
Revisions
-
sc0ttkclark revised this gist
May 1, 2025 . 1 changed file with 5 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -34,3 +34,8 @@ eval( '?>' . $code ); } }, 10, 3 ); /** * Don't show errors about having PHP code in Pods screens. */ add_filter( 'pods_eval_show_errors', '__return_false' ); -
sc0ttkclark created this gist
May 1, 2025 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,36 @@ <?php /** * Allow PHP eval for various areas of Pods that was deprecated in Pods 2.1-2.3 and finally removed in Pods 3.3 * * You should avoid using this and start migrating to the recommended solutions: * * Pod Pages - https://docs.pods.io/displaying-pods/pod-page-template-hierarchy-for-themes/ * Pod Templates - https://docs.pods.io/displaying-pods/pod-template-hierarchy-for-themes/ */ /** * Pods Pages precode eval. */ add_action( 'pods_page_precode', static function ( $pods_page, $pods, $content ) { if ( false !== strpos( $content, '<?' ) ) { eval( '?>' . $content ); } }, 10, 3 ); /** * Pods Pages content eval. */ add_action( 'pods_pages_eval_content', static function ( $pods_page, $pods, $content ) { if ( false !== strpos( $content, '<?' ) ) { eval( '?>' . $content ); } }, 10, 3 ); /** * Pods Templates content eval. */ add_action( 'pods_templates_eval_content', static function ( $code, $obj, $process_php ) { if ( $process_php && false !== strpos( $code, '<?' ) ) { eval( '?>' . $code ); } }, 10, 3 );