Plugin Directory

source: https-redirection/trunk/https-redirection.php

Last change on this file was 3277647, checked in by mra13, 11 months ago

fixing the main file name for upgrade purchase

File size: 1.9 KB
Line 
1<?php
2/*
3Plugin Name: Easy HTTPS (SSL) Redirection
4Plugin URI: https://www.tipsandtricks-hq.com/wordpress-easy-https-redirection-plugin
5Description: The plugin HTTPS Redirection allows an automatic redirection to the "HTTPS" version/URL of the site.
6Author: Tips and Tricks HQ
7Version: 2.0.0
8Author URI: https://www.tipsandtricks-hq.com/
9License: GPLv2 or later
10Text Domain: https-redirection
11Domain Path: /languages/
12 */
13
14// Prefix: ehssl_
15
16if (!defined('ABSPATH')) {
17    // Exit if accessed directly.
18    exit;
19}
20
21define('EASY_HTTPS_SSL_VERSION', '2.0.0');
22//define('EASY_HTTPS_SSL_DB_VERSION', '1.0');
23
24// Load the core class.
25include_once ( 'easy-https-ssl-core.php' );
26
27// Activation hook.
28register_activation_hook(__FILE__, array('Easy_HTTPS_SSL', 'plugin_activate_handler'));
29// Deactivation hook
30register_deactivation_hook(__FILE__, array('Easy_HTTPS_SSL', 'plugin_deactivate_handler'));
31
32// Uninstall hook.
33register_uninstall_hook(__FILE__, array('Easy_HTTPS_SSL', 'plugin_uninstall_handler'));
34
35/**
36 * Adds "Settings" link to the plugin action page
37 */
38function ehssl_plugin_action_links($links, $file)
39{
40    // Static so we don't call plugin_basename on every plugin row.
41    static $this_plugin;
42    if (!$this_plugin) {
43        $this_plugin = plugin_basename(__FILE__);
44    }
45
46    if ($file == $this_plugin) {
47        $settings_link = '<a href="admin.php?page=ehssl_settings">' . __('Settings', 'https-redirection') . '</a>';
48        array_unshift($links, $settings_link);
49    }
50    return $links;
51}
52add_filter('plugin_action_links', 'ehssl_plugin_action_links', 10, 2);
53
54/**
55 * Additional links on the plugin page
56 */
57function ehssl_register_plugin_links($links, $file)
58{
59    $base = plugin_basename(__FILE__);
60    if ($file == $base) {
61        $links[] = '<a href="admin.php?page=ehssl_settings">' . __('Settings', 'https-redirection') . '</a>';
62    }
63    return $links;
64}
65add_filter('plugin_row_meta', 'ehssl_register_plugin_links', 10, 2);
Note: See TracBrowser for help on using the repository browser.