PluginProbe
Statify / 1.4.1
Statify v1.4.1
2.0.2 2.0.1 trunk 0.7 0.8 0.9 1.0 1.2.8 1.3.0 1.4.0 1.4.1 1.4.2 1.4.3 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.6.0 1.6.1 1.6.2 1.6.3 1.7.0 1.7.1 1.7.2 All 32 releases
statify / inc / statify_backend.class.php

statify_backend.class.php in Statify 1.4.1, at inc/statify_backend.class.php

80 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3
4 /* Quit */
5 defined('ABSPATH') OR exit;
6
7
8 /**
9 * Statify_Backend
10 *
11 * @since 1.4.0
12 */
13
14 class Statify_Backend
15 {
16
17
18 /**
19 * Add plugin meta links
20 *
21 * @since 0.1.0
22 * @change 1.4.0
23 *
24 * @param array $input Registered links
25 * @param string $file Current plugin file
26 * @return array Merged links
27 */
28
29 public static function add_meta_link($input, $file)
30 {
31 /* Restliche Plugins? */
32 if ( $file !== STATIFY_BASE ) {
33 return $input;
34 }
35
36 return array_merge(
37 $input,
38 array(
39 '<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=ZAQUT9RLPW8QN" target="_blank">PayPal</a>',
40 '<a href="https://flattr.com/t/1733733" target="_blank">Flattr</a>'
41 )
42 );
43 }
44
45
46 /**
47 * Add plugin action links
48 *
49 * @since 0.1.0
50 * @change 1.4.0
51 *
52 * @param array $input Registered links
53 * @return array Merged links
54 */
55
56 public static function add_action_link($input)
57 {
58 /* Rechte? */
59 if ( ! current_user_can('edit_dashboard') ) {
60 return $input;
61 }
62
63 /* Zusammenführen */
64 return array_merge(
65 $input,
66 array(
67 sprintf(
68 '<a href="%s">%s</a>',
69 add_query_arg(
70 array(
71 'edit' => 'statify_dashboard#statify_dashboard'
72 ),
73 admin_url('/')
74 ),
75 __('Settings')
76 )
77 )
78 );
79 }
80 }