PluginProbe
FileBird – WordPress Media Library Folders & File Manager / 6.2.5
FileBird – WordPress Media Library Folders & File Manager v6.2.5
6.5.8 6.5.7 6.5.5 6.5.4 trunk 4.3.1 5.1.6 5.3 5.3.2 5.4.3 5.4.4 5.4.5 5.5 5.5.3 5.5.5 5.5.8 5.5.8.1 5.6 5.6.1 5.6.2 5.6.3 5.6.4 6.2.3 6.2.5 6.3 All 36 releases
filebird / includes / Classes / ActivePro.php

ActivePro.php in FileBird – WordPress Media Library Folders & File Manager 6.2.5, at includes/Classes/ActivePro.php

58 lines 2.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace FileBird\Classes;
3
4 use FileBird\Admin\Settings;
5 use FileBird\Classes\Helpers;
6
7 defined( 'ABSPATH' ) || exit;
8
9 class ActivePro {
10 private $envato_login_url = 'https://active.ninjateam.org/envato-login/';
11
12 const FB_SLUG = 'filebird_pro';
13
14 public function __construct() {
15 add_filter( 'fbv_data', array( $this, 'localize_fbv_data' ) );
16 }
17
18 public function resPermissionsCheck() {
19 return current_user_can( 'upload_files' );
20 }
21
22 public function localize_fbv_data( $data ) {
23 $return_args = array(
24 'action' => 'fb_login_envato_success',
25 'nonce' => wp_create_nonce( 'njt_filebird_login_envato' ),
26 );
27
28 $return_url = add_query_arg( $return_args, admin_url( 'admin-ajax.php' ) );
29 $domain = $this->get_domain();
30 $data['login_envato_url'] = esc_url(
31 add_query_arg(
32 array(
33 'domain' => $domain,
34 'plugin' => 'filebird',
35 'return_url' => urlencode( $return_url ),
36 'ip' => Helpers::getIp(),
37 ),
38 $this->envato_login_url
39 )
40 );
41
42 $data['license']['status'] = false;
43
44 $data['deactivate_license_nonce'] = wp_create_nonce( 'deactivate_license_nonce' );
45 if ( ! isset( $data['i18n'] ) ) {
46 $data['i18n'] = array();
47 }
48 $data['i18n']['active_to_update'] = esc_html__( 'Please activate FileBird license to use this feature.', 'filebird' );
49 $data['i18n']['deactivate_license_confirm_title'] = esc_html__( 'Deactivating license', 'filebird' );
50 $data['i18n']['deactivate_license_confirm_content'] = esc_html__( 'Are you sure to deactivate the current license key? You will not get regular updates or any support for this site.', 'filebird' );
51 $data['i18n']['deactivate_license_try_again'] = esc_html__( 'Please try again later!', 'filebird' );
52 $data['i18n']['update_error'] = esc_html__( 'Update failed: Your current FileBird license is being used on another site: {site}. To get this update, please deactivate the license on the other site first.', 'filebird' );
53 return $data;
54 }
55 private function get_domain() {
56 return Helpers::getDomain();
57 }
58 }