PluginProbe
Simple Accessibility Button / 2.0.0
Simple Accessibility Button v2.0.0
trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.8 1.0.9 1.1.0 1.1.2 1.1.4 1.1.5 1.1.6 2.0.0 2.0.1 2.0.2 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 All 31 releases
yydevelopment-accessibility / index.php

index.php in Simple Accessibility Button 2.0.0, at index.php

100 lines 3.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
2 <?php
3 /*
4 Plugin Name: YYDevelopment - Accessibility
5 Plugin URI: https://www.yydevelopment.com/yydevelopment-wordpress-plugins/
6 Description: Simple plugin that allow you add accessibility button to your website
7 Version: 2.0.0
8 Author: YYDevelopment
9 Author URI: https://www.yydevelopment.com/
10 Text Domain: yydevelopment-accessibility
11 */
12
13 // ================================================
14 // Adding lanagues support to the plugin
15 // ================================================
16
17 function yydev_accessibility_lang() {
18 load_plugin_textdomain( 'yydevelopment-accessibility', false, basename( dirname( __FILE__ ) ) . '/languages' );
19 } // function yydev_portfolio_boxes() {
20
21 add_action( 'plugins_loaded', 'yydev_accessibility_lang' );
22
23 // ================================================
24 // Loading plugin main files
25 // ================================================
26
27 include_once('include/settings.php');
28 require_once('include/functions.php');
29
30 // ================================================
31 // Creating Database when the plugin is activated
32 // ================================================
33
34 function yydev_accessibility_create_database() {
35
36 load_plugin_textdomain( 'yydevelopment-accessibility', false, basename( dirname( __FILE__ ) ) . '/languages' );
37 require_once('include/install.php');
38
39 } // function yydev_accessibility_create_database() {
40
41 register_activation_hook(__FILE__, 'yydev_accessibility_create_database');
42
43 // ================================================
44 // display the plugin we have create on the wordpress
45 // post blog and pages
46 // ================================================
47
48 // function that will output the code to the page
49 function output_yydev_accessibility() {
50
51 include('include/style.php');
52 include('include/scripts.php');
53 include('include/admin-output.php');
54
55 } // function output_yydev_accessibility() {
56
57 // -----------------------------------------------
58 // load the page into settings page
59 // -----------------------------------------------
60
61 // in case of settings menu loading
62 function register_yydev_accessibility_page() {
63 add_options_page( 'YYDevelopment Accessibility', "YYDevelopment Accessibility", 'manage_options', 'yydev-accessibility', 'output_yydev_accessibility');
64 } // function register_yydev_accessibility_page() {
65
66 add_action('admin_menu', 'register_yydev_accessibility_page');
67
68 // ================================================
69 // Add settings page to the plugin menu info
70 // ================================================
71
72 function yydev_accessibility_add_settings_link( $actions, $plugin_file ) {
73 static $plugin;
74
75 if (!isset($plugin)) { $plugin = plugin_basename(__FILE__); }
76 if ($plugin == $plugin_file) {
77 $admin_page_url = esc_url( menu_page_url( 'yydev-accessibility', false ) );
78 $settings = array('settings' => '<a href="' . $admin_page_url . '">Settings</a>');
79 $actions = array_merge($settings, $actions);
80 } // if ($plugin == $plugin_file) {
81 return $actions;
82 } //function yydev_accessibility_add_settings_link( $actions, $plugin_file ) {
83
84 add_filter( 'plugin_action_links', 'yydev_accessibility_add_settings_link', 10, 5 );
85
86 // ================================================
87 // output the data into the page front end
88 // ================================================
89
90 if( !is_admin() ) {
91 include('front-end/front-end-output.php');
92 } // if( !is_admin() ) {
93
94 // ================================================
95 // including admin notices flie
96 // ================================================
97
98 if( is_admin() ) {
99 include_once('notices.php');
100 } // if( is_admin() ) {