<?php
/*
Plugin Name: wp_footer_plugin
Plugin URI: https://github.com/HoussamEddineLamzoudi/wp_footer_pluging
Description: this is the best plugin footer you can use itwe create, we create it just for you
Version: 1.0.0
Author: Ayoub Basidi
Author URI: https://github.com/HoussamEddineLamzoudi
*/
?>
<?php
function footer_setting_page()
{
// add_menu_page( string $page_title, string $menu_title, string $capability, string $menu_slug, callable $function = '' , string $icon_url = '');
add_menu_page('footer plugin', 'Footer Setting', 'manage_options', 'custom-plugin-setting-url', 'custom_page_html_form', plugins_url('custom-plugin/img/icon.png'));
// custom_page_html_form is the function in which I have written the HTML for my footer plugin form.
}
add_action('admin_menu', 'footer_setting_page');
?>
<?php
function footer_plugin_css()
{
?>
<style>
// style du footer
</style>
<?php
}
add_action('wp_head', 'footer_plugin_css', 100);
?>
<? php
add_action('wp_footer', 'footer_plugin_html');
function footer_plugin_html()
{
// echo to html footer
}
?>
1- le fichier index.php
2- defined('ABSPATH') or die('Hey, sorry you can\t access this file');