Files
2024_WEBSITE_fipf/plugins/fipfcard_plugin/fipfcard_plugin.php
2024-03-02 16:14:36 +01:00

96 lines
1.5 KiB
PHP

<?php
/*
Plugin Name: fipfcard_plugin
Plugin URI:
Description:
Author: hugogogo
Version: 1.1.0
Author URI:
*/
/*
* it means someone outside wp is accessing the file, in this case kill it.
*/
if (!defined('ABSPATH')) {
die('You can not access this file!');
}
/*
* plugin dir root
*/
include_once( plugin_dir_path(__FILE__) . '/utils/plgntls_class.php');
PLGNTLS_class::set_root_dir( plugin_dir_path(__FILE__), plugin_dir_url(__FILE__) );
/*
* general inclusions
*/
include_once(PLGNTLS_class::get_path() . '/utils/globals.php');
include_once(PLGNTLS_class::get_path() . '/utils/console_log.php');
include_once(PLGNTLS_class::get_path() . '/php/paypal/paypal.php');
include_once(PLGNTLS_class::get_path() . '/php/register/partenaires.php');
/*
* test the class PLGNTLS
*/
add_shortcode('fipfcard_plugin', 'fipfcard_test_class_tools');
/*
*
function custom_frontend_posting_form() {
$my_image = the_field('image_ratio');
error_log("my_image");
error_log(json_encode($my_image));
return $my_image;
}
add_shortcode('custom_frontend_posting_form', 'custom_frontend_posting_form');
*/
/*
* menu plugin
*/
include_once(PLGNTLS_class::get_path() . '/php/menu/example_menu.php');
function fipfcard_plugin_menu()
{
add_menu_page
(
'fipf_card', // webpage title
'fipf_card', // menu title
'manage_options', // capability
'fipfcard-plugin', // menu_slug
'fipfcard_plugin_content' // callback function to display page content
);
}
add_action('admin_menu', 'fipfcard_plugin_menu');
?>