-
Notifications
You must be signed in to change notification settings - Fork 0
/
penguinet-gripeless.php
58 lines (48 loc) · 1.35 KB
/
penguinet-gripeless.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?php
/**
* Plugin Name: Feedback with Gripeless
* Plugin URI: https://www.penguinet.it/progetti/gripeless
* Description: Make reporting issues frictionless
* Author: Erika Gili
* Author URI: https://www.penguinet.it
* Text Domain: penguinet-gripeless
* Domain Path: /languages
* Version: 1.0.0
*
* @package Penguinet_Gripeless
*/
namespace Penguinet\Gripeless;
if ( ! defined( 'WPINC' ) ) {
die;
}
const PLUGIN_NAME = 'penguinet-gripeless';
add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), 'Penguinet\Gripeless\settings_link' );
add_action( 'plugins_loaded', 'Penguinet\Gripeless\load_textdomain' );
/**
* Place a settings link in the plugins page
*
* @param array $links The other plugin's links.
*
* @return array
*/
function settings_link( $links ) {
$settings_link = '<a href="options-general.php?page=' . Settings::MENU_SLUG . '">' . __( 'Settings', 'penguinet-gripeless' ) . '</a>';
array_unshift( $links, $settings_link );
return $links;
}
/**
* Load the plugin text domain for translation.
*/
function load_textdomain() {
load_plugin_textdomain(
'penguinet-gripeless',
false,
dirname( plugin_basename( __FILE__ ) ) . '/languages/'
);
}
/**
* Include classes with Composer.
*/
require_once 'vendor/autoload.php';
Button::get_instance();
Settings::get_instance();