PluginProbe
WP EXtra – One Click Optimize / 8.7.1
WP EXtra – One Click Optimize v8.7.1
8.7.1 8.6.8 8.7.0 trunk 5.9 8.0 8.5.0 8.5.4 8.5.5 8.6.0 8.6.1 8.6.2 8.6.3 8.6.5
wp-extra / src / Core.php

Core.php in WP EXtra – One Click Optimize 8.7.1, at src/Core.php

37 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace WPEXtra;
3
4 if ( ! defined( 'ABSPATH' ) ) {
5 exit;
6 }
7
8 class Core {
9
10 public function __construct() {
11 add_filter('plugin_action_links_' . plugin_basename(WPEX_FILE), [$this, 'add_plugin_action_links']);
12 add_filter('plugin_row_meta', [$this, 'add_plugin_meta_links'], 10, 2 );
13 }
14
15 public function add_plugin_action_links( $links ) {
16 $links[] = '<a href="' . esc_url( admin_url( 'admin.php?page=wp-extra' ) ) . '">' . __( 'Settings' ) . '</a>';
17 return $links;
18 }
19
20 public function add_plugin_meta_links( $meta, $file ) {
21 if ( $file !== plugin_basename( WPEX_FILE ) ) {
22 return $meta;
23 }
24 $upgradeable = apply_filters( 'wpextra_upgradeable', true );
25 $meta[] = '<a href="https://wpvnteam.com/wp-extra/doc/" target="_blank">' . __( 'Documentation' ) . '</a>';
26 if ( !$upgradeable ) {
27 $meta[] = '<a href="https://wpvnteam.com/support/" target="_blank">' . __( 'Support' ) . '</a>';
28 } else {
29 $meta[] = '<a href="https://wpvnteam.com/donate/" target="_blank">' . __( 'Donate', 'wp-extra' ) . '</a>';
30 $meta[] = '<a href="https://wordpress.org/support/plugin/wp-extra/reviews/?filter=5" target="_blank" title="' . esc_html__( 'Rate WP EXtra on WordPress.org', 'wp-extra' ) . '" style="color: #ffb900">'
31 . str_repeat( '<span class="dashicons dashicons-star-filled" style="font-size:13px;width:13px;height:13px;line-height:1.8;"></span>', 5 )
32 . '</a>';
33 }
34 return $meta;
35 }
36
37 }