This repository has been archived by the owner on Mar 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
/
index.php
61 lines (43 loc) · 1.92 KB
/
index.php
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
<?php
/*
Plugin Name: Ultimate Member
Plugin URI: http://ultimatemember.com/
Description: The easiest way to create powerful online communities and beautiful user profiles with WordPress
Version: 1.3.29
Author: Ultimate Member
Author URI: http://ultimatemember.com/
*/
require_once(ABSPATH.'wp-admin/includes/plugin.php');
$plugin_data = get_plugin_data( __FILE__ );
define('um_url',plugin_dir_url(__FILE__ ));
define('um_path',plugin_dir_path(__FILE__ ));
define('um_plugin', plugin_basename( __FILE__ ) );
define('ultimatemember_version', $plugin_data['Version'] );
$plugin = um_plugin;
/***
*** @Init
***/
require_once um_path . 'um-init.php';
/***
*** @Display a welcome page
***/
function ultimatemember_activation_hook( $plugin ) {
if( $plugin == um_plugin && get_option('um_version') != ultimatemember_version ) {
update_option('um_version', ultimatemember_version );
exit( wp_redirect( admin_url('admin.php?page=ultimatemember-about') ) );
}
}
add_action( 'activated_plugin', 'ultimatemember_activation_hook' );
/***
*** @Add any custom links to plugin page
***/
function ultimatemember_plugin_links( $links ) {
$more_links[] = '<a href="http://ultimatemember.com/docs/">' . __('Docs','ultimatemember') . '</a>';
$more_links[] = '<a href="http://ultimatemember.com/forums/">' . __('Support','ultimatemember') . '</a>';
$more_links[] = '<a href="'.admin_url().'admin.php?page=um_options">' . __('Settings','ultimatemember') . '</a>';
$links = $more_links + $links;
$links[] = '<a href="'.admin_url().'?um_adm_action=uninstall_ultimatemember" class="delete" title="'.__('Remove this plugin','ultimatemember').'">' . __( 'Uninstall','ultimatemember' ) . '</a>';
return $links;
}
$prefix = is_network_admin() ? 'network_admin_' : '';
add_filter( "{$prefix}plugin_action_links_$plugin", 'ultimatemember_plugin_links' );