-
-
Save waqashassan98/a05f74910755929510096577e1caadf3 to your computer and use it in GitHub Desktop.
Simple plugin for safely adding code for extending Pods. Instructions: 1) Create a folder in your plugins file. 2) Add this file and a second file, called 'custom-code.php' to it. 3) Add custom code to custom-code.php. 4) Activate plugin. For a complete Pods plugin starter plugin, see: https://github.com/pods-framework/pods-extend
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 characters
<?php | |
/* | |
Plugin Name: Pods Starter Plugin | |
Version: 0.0.1 | |
License: GPL v2 or later | |
*/ | |
//note: change 'slug' to your own custom prefix. | |
add_action( 'plugins_loaded', 'slug_extend_safe_activate'); | |
function slug_extend_safe_activate() { | |
if ( defined( 'PODS_VERSION' ) ) { | |
include_once( 'custom-code.php'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment