diff --git a/go-form-plugin/export/mcmahon.php b/go-form-plugin/export/mcmahon.php index ef588e9..2dd0c0b 100644 --- a/go-form-plugin/export/mcmahon.php +++ b/go-form-plugin/export/mcmahon.php @@ -15,7 +15,7 @@ header('Content-Type: text/xml; charset=utf-8'); header('Content-Disposition: attachment; filename="go-form-' . sanitize_title($form_name) . '-export-macmahon.xml"'); $output = fopen('php://output', 'w'); -include_once 'mcmahon-help.php'; +include_once __DIR__ . '/mcmahon-help.php'; fwrite($output, $mcmahonfirst); diff --git a/go-form-plugin/go-form-plugin.php b/go-form-plugin/go-form-plugin.php index 6ae7e9c..43219a8 100644 --- a/go-form-plugin/go-form-plugin.php +++ b/go-form-plugin/go-form-plugin.php @@ -84,7 +84,7 @@ function go_form_render_entries_table($entries, $show_admin = false) { global $ranks; - include "templates/table.php"; + include __DIR__ . "/templates/table.php"; } // ========== Form Handling ========== @@ -140,7 +140,7 @@ function go_form_shortcode($atts) $form = go_form_get_form_by_id($form_id); ob_start(); if ($form) { - include 'templates/form-shortcode.php'; + include __DIR__ . '/templates/form-shortcode.php'; } else { echo '

WRONG FORM ID

'; } @@ -211,14 +211,14 @@ add_action('admin_post_go_form_delete_form', 'go_form_delete_form'); function go_form_export_csv() { - include_once 'export/csv.php'; + include_once __DIR__ . '/export/csv.php'; exit; } add_action('admin_post_go_form_export_csv', 'go_form_export_csv'); function go_form_export_pairgoth() { - include_once 'export/pairgoth.php'; + include_once __DIR__ . '/export/pairgoth.php'; exit; } add_action('admin_post_go_form_export_pairgoth', 'go_form_export_pairgoth'); @@ -226,7 +226,7 @@ add_action('admin_post_go_form_export_pairgoth', 'go_form_export_pairgoth'); function go_form_export_opengotha() { global $ranks; - include_once 'export/opengotha.php'; + include_once __DIR__ . '/export/opengotha.php'; exit; } add_action('admin_post_go_form_export_opengotha', 'go_form_export_opengotha'); @@ -234,7 +234,7 @@ add_action('admin_post_go_form_export_opengotha', 'go_form_export_opengotha'); function go_form_export_mcmahon() { global $ranks; - include_once 'export/mcmahon.php'; + include_once __DIR__ . '/export/mcmahon.php'; exit; } add_action('admin_post_go_form_export_mcmahon', 'go_form_export_mcmahon'); @@ -259,5 +259,5 @@ function action_button($action, $name, $confirm_massage, $value_one) function go_form_settings_page() { - include_once 'templates/settings-page.php'; + include_once __DIR__ . '/templates/settings-page.php'; } diff --git a/main.php b/main.php index 957c981..9fb5bcb 100644 --- a/main.php +++ b/main.php @@ -10,4 +10,4 @@ if (!defined('ABSPATH')) exit; -include_once "go-form-plugin/go-form-plugin.php"; \ No newline at end of file +require_once "go-form-plugin/go-form-plugin.php"; \ No newline at end of file