Files
ultimatemember/index.php
T

61 lines
1.9 KiB
PHP
Raw Normal View History

2014-12-15 22:38:07 +02:00
<?php
/*
Plugin Name: Ultimate Member
Plugin URI: http://ultimatemember.com/
2015-03-01 00:44:04 +02:00
Description: The easiest way to create powerful online communities and beautiful user profiles with WordPress
2016-02-24 19:30:45 +02:00
Version: 1.3.39
2014-12-15 22:38:07 +02:00
Author: Ultimate Member
Author URI: http://ultimatemember.com/
*/
2016-02-11 12:15:25 +08:00
defined('ABSPATH') || exit;
2014-12-15 22:38:07 +02:00
require_once(ABSPATH.'wp-admin/includes/plugin.php');
2015-01-20 14:08:12 +02:00
2014-12-15 22:38:07 +02:00
$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__ ) );
2015-01-20 14:08:12 +02:00
2015-01-20 14:43:05 +02:00
define('ultimatemember_version', $plugin_data['Version'] );
2015-01-20 14:08:12 +02:00
2014-12-15 22:38:07 +02:00
$plugin = um_plugin;
2015-01-20 14:08:12 +02:00
/***
*** @Init
***/
2014-12-15 22:38:07 +02:00
require_once um_path . 'um-init.php';
/***
*** @Display a welcome page
***/
function ultimatemember_activation_hook( $plugin ) {
2015-05-05 18:06:39 +03:00
2015-01-20 14:43:05 +02:00
if( $plugin == um_plugin && get_option('um_version') != ultimatemember_version ) {
2014-12-15 22:38:07 +02:00
2015-01-20 14:43:05 +02:00
update_option('um_version', ultimatemember_version );
2014-12-15 22:38:07 +02:00
2014-12-20 18:02:41 +02:00
exit( wp_redirect( admin_url('admin.php?page=ultimatemember-about') ) );
2014-12-15 22:38:07 +02:00
}
2014-12-21 18:20:55 +02:00
2014-12-15 22:38:07 +02:00
}
add_action( 'activated_plugin', 'ultimatemember_activation_hook' );
2015-02-04 20:31:39 +02:00
2014-12-15 22:38:07 +02:00
/***
*** @Add any custom links to plugin page
***/
function ultimatemember_plugin_links( $links ) {
2015-12-12 18:14:44 +02:00
$more_links[] = '<a href="http://docs.ultimatemember.com/">' . __('Docs','ultimatemember') . '</a>';
$more_links[] = '<a href="https://ultimatemember.com/support-contact/">' . __('Support','ultimatemember') . '</a>';
2014-12-20 18:02:41 +02:00
$more_links[] = '<a href="'.admin_url().'admin.php?page=um_options">' . __('Settings','ultimatemember') . '</a>';
2014-12-15 22:38:07 +02:00
$links = $more_links + $links;
2014-12-31 20:04:10 +02:00
$links[] = '<a href="'.admin_url().'?um_adm_action=uninstall_ultimatemember" class="delete" title="'.__('Remove this plugin','ultimatemember').'">' . __( 'Uninstall','ultimatemember' ) . '</a>';
2014-12-15 22:38:07 +02:00
return $links;
}
2015-03-01 00:44:04 +02:00
$prefix = is_network_admin() ? 'network_admin_' : '';
add_filter( "{$prefix}plugin_action_links_$plugin", 'ultimatemember_plugin_links' );