How correctly define paths for wp plugins
-
Hi!
Before I did one plugin where I’d defined paths likeYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ define('PLUGIN_FOLDER', dirname(__FILE__) ); define('CORE_FOLDER', PLUGIN_FOLDER.'/core'); require_once CORE_FOLDER.'/class/Select_car_brand.php'; $scb = new Select_car_brand(); $scb->ini(); // add_shortcode( 'select-car-brand', 'handle_select_car_brand' );
But when I put this code in second plugin I got error, such file doesn’t exists, because there was already determined PLUGIN_FOLDER .
How correctly to determine plugin paths variables?
And I want use OOP for creating plugins and also don’t know how it use in correct way????
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘How correctly define paths for wp plugins’ is closed to new replies.