# wp-extra/trunk/src/Core.php

WP EXtra – One Click Optimize, version trunk. 37 lines.

- Page: https://pluginprobe.com/plugins/wp-extra/trunk/code/src/Core.php
- Raw: https://pluginprobe.com/plugins/wp-extra/trunk/raw/src/Core.php
- Modified: 2026-08-26T17:59:58+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/wp-extra/trunk/code/src/Core.php#L10-L20`.

```php
<?php
namespace WPEXtra;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

class Core {
    
    public function __construct() {
		add_filter('plugin_action_links_' . plugin_basename(WPEX_FILE), [$this, 'add_plugin_action_links']);
		add_filter('plugin_row_meta', [$this, 'add_plugin_meta_links'], 10, 2 );
    }
    
	public function add_plugin_action_links( $links ) {
		$links[] = '<a href="' . esc_url( admin_url( 'admin.php?page=wp-extra' ) ) . '">' . __( 'Settings' ) . '</a>';
		return $links;
	}
        
	public function add_plugin_meta_links( $meta, $file ) {
		if ( $file !== plugin_basename( WPEX_FILE ) ) {
			return $meta;
		}
        $upgradeable = apply_filters( 'wpextra_upgradeable', true );
        $meta[] = '<a href="https://wpvnteam.com/wp-extra/doc/" target="_blank">' . __( 'Documentation' ) . '</a>';
		if ( !$upgradeable ) {
            $meta[] = '<a href="https://wpvnteam.com/support/" target="_blank">' . __( 'Support' ) . '</a>';
        } else {
            $meta[] = '<a href="https://wpvnteam.com/donate/" target="_blank">' . __( 'Donate', 'wp-extra' ) . '</a>';
            $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">'
                . str_repeat( '<span class="dashicons dashicons-star-filled" style="font-size:13px;width:13px;height:13px;line-height:1.8;"></span>', 5 )
                . '</a>';
        }
		return $meta;
	}
    
}
```
