-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathwp-frontend-profile.php
More file actions
113 lines (100 loc) · 3.58 KB
/
wp-frontend-profile.php
File metadata and controls
113 lines (100 loc) · 3.58 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<?php
/**
* Plugin Name: WP Frontend Profile
* Plugin URI: https://wordpress.org/plugins/wp-front-end-profile/
* Description: This plugin allows users to easily edit their profile information on the frontend rather than having to go into the dashboard to make changes to password, email address and other user meta data.
* Version: 1.3.9
* @package wp-front-end-profile
* Author: Glowlogix
* Author URI: https://www.glowlogix.com
* Text Domain: wp-front-end-profile
* License: GPL v2 or later.
*/
defined('ABSPATH') || exit;
/**
* Main class for WP Frontend Profile.
*/
if (! defined('WPFEP_VERSION')) {
define('WPFEP_VERSION', '1.3.9');
}
if (! defined('WPFEP_PATH')) {
define('WPFEP_PATH', plugin_dir_path(__FILE__));
}
if (! defined('WPFEP_PLUGIN_URL')) {
define('WPFEP_PLUGIN_URL', plugin_dir_url(__FILE__));
}
require_once WPFEP_PATH . '/inc/class-wp-frontend-profile.php';
if (! function_exists('wfep_fs')) {
// Create a helper function for easy SDK access.
function wfep_fs()
{
global $wfep_fs;
if (! isset($wfep_fs)) {
// Include Freemius SDK.
require_once dirname(__FILE__) . '/freemius/start.php';
$wfep_fs = fs_dynamic_init(array(
'id' => '5837',
'slug' => 'wp-front-end-profile',
'premium_slug' => 'wp-frontend-profile-premium',
'type' => 'plugin',
'public_key' => 'pk_ac83abfabd6c3c1498e82893f4a23',
'is_premium' => true,
// If your plugin is a serviceware, set this option to false.
'has_premium_version' => true,
'has_addons' => false,
'has_paid_plans' => true,
'trial' => array(
'days' => 14,
'is_require_payment' => false,
),
'has_affiliation' => 'selected',
'menu' => array(
'slug' => 'wpfep-settings_dashboard',
'support' => false,
),
));
}
return $wfep_fs;
}
// Init Freemius.
wfep_fs();
// Signal that SDK was initiated.
do_action('wfep_fs_loaded');
}
/**
* Add links to plugin's description in plugins table.
*
* @since 1.0.0
*
* @param array $links Initial list of links.
* @param string $file Basename of current plugin.
*
* @return array
*/
function plugin_meta_links($links, $file)
{
if (plugin_basename(__FILE__) != $file) {
return $links;
}
$support_link = '<a target="_blank" href="https://wordpress.org/support/plugin/wp-front-end-profile/" title="' . __('Get help', 'wpfep') . '">' . __('Support', 'wpfep') . '</a>';
$rate_link = '<a target="_blank" href="https://wordpress.org/support/plugin/wp-front-end-profile/reviews/#new-post" title="' . __('Rate the plugin', 'wpfep') . '">' . __('Rate the plugin ★★★★★', 'wpfep') . '</a>';
$links[] = $support_link;
$links[] = $rate_link;
return $links;
}
add_filter('plugin_row_meta', 'plugin_meta_links', 10, 5);
/**
* Plugin action links.
*
* @param array $links setting page links.
*
* @since 1.0.0
*/
function plugin_action_links($links)
{
$mylinks = array(
'<a href="' . admin_url('admin.php?page=wpfep-settings') . '">Settings</a>',
);
return array_merge($links, $mylinks);
}
add_filter('plugin_action_links_' . plugin_basename(__FILE__), 'plugin_action_links');