101 lines
1.7 KiB
PHP
101 lines
1.7 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() . '/php/utils/globals.php');
|
|
include_once(PLGNTLS_class::get_path() . '/php/utils/console_log.php');
|
|
|
|
//include_once(PLGNTLS_class::get_path() . '/php/images/image_edit_shortcode.php');
|
|
//include_once(PLGNTLS_class::get_path() . '/php/images/image-edit.php');
|
|
|
|
//include_once(PLGNTLS_class::get_path() . '/php/test_cache.php');
|
|
|
|
include_once(PLGNTLS_class::get_path() . '/php/paypal/paypal.php');
|
|
|
|
include_once(PLGNTLS_class::get_path() . '/php/partenaires/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');
|
|
|
|
|
|
|
|
?>
|