Plugin Directory

Changeset 2861305


Ignore:
Timestamp:
02/07/2023 09:00:33 AM (3 years ago)
Author:
seomantis
Message:

new features, bug fixes, security improvements

Location:
seo-keywords
Files:
76 added
5 edited

Legend:

Unmodified
Added
Removed
  • seo-keywords/trunk/README.txt

    r2855741 r2861305  
    55Requires at least: 4.7
    66Tested up to: 6.0
    7 Stable tag: 1.1.2
     7Stable tag: 1.1.3
    88Requires PHP: 7.1
    99License: GPLv2 or later
     
    2727
    2828== Upgrade Notice ==
     29
     30= 1.1.3 =
     31Adding settings link to plugins page
     32Redirect to login page after plugin enabling
    2933
    3034= 1.1.2 =
  • seo-keywords/trunk/admin/class-seo-keywords-admin.php

    r2819943 r2861305  
    120120        if (!session_id())
    121121            session_start();
     122    }
     123
     124    public function settings_link( $links ){
     125        // Build and escape the URL.
     126        $url = esc_url( add_query_arg(
     127            'page',
     128            'wp-seo-plugins-login',
     129            get_admin_url() . 'admin.php'
     130        ) );
     131        // Create the link.
     132        $settings_link = "<a href='$url'>" . __( 'Settings' ) . '</a>';
     133        // Adds the link to the end of the array.
     134        array_push(
     135            $links,
     136            $settings_link
     137        );
     138        return $links;
     139    }
     140
     141    public function seo_keywords_redirect(){
     142        if (get_option('seo_keywords_do_activation_redirect', false)) {
     143            delete_option('seo_keywords_do_activation_redirect');
     144            $url = esc_url( add_query_arg(
     145                'page',
     146                'wp-seo-plugins-login',
     147                get_admin_url() . 'admin.php'
     148            ) );
     149            wp_redirect( $url );
     150        }
    122151    }
    123152
  • seo-keywords/trunk/includes/class-seo-keywords-activator.php

    r2766588 r2861305  
    3131     */
    3232    public static function activate() {
    33 
     33        add_option('seo_keywords_do_activation_redirect', true);
    3434    }
    3535
  • seo-keywords/trunk/includes/class-seo-keywords.php

    r2819943 r2861305  
    169169        //$this->loader->add_action( 'admin_init', $plugin_admin, 'get_last_update');
    170170        $this->loader->add_action( 'admin_init', $plugin_admin, 'start_session');
     171        $this->loader->add_action( 'admin_init', $plugin_admin, 'seo_keywords_redirect');
     172
     173        $this->loader->add_filter( 'plugin_action_links_seo-keywords/seo-keywords.php', $plugin_admin, 'settings_link' );
    171174    }
    172175
  • seo-keywords/trunk/seo-keywords.php

    r2855741 r2861305  
    1717 * Plugin URI:        https://wpseoplugins.org/seo-keywords/
    1818 * Description:       SEO Keywords is a powerful plugin that helps you add keywords in your wordpress posts. Automate keywords building with ease!
    19  * Version:           1.1.2
     19 * Version:           1.1.3
    2020 * Author:            WP SEO Plugins
    2121 * Author URI:        https://wpseoplugins.org/
     
    4242define( 'SEO_KEYWORDS_SITE_URL', ( SEO_KEYWORDS_SERVER_PORT == 80 ? 'http://' : 'https://' ) . SEO_KEYWORDS_SERVER_NAME );
    4343define( 'SEO_KEYWORDS_SERVER_REQUEST_URI', sanitize_text_field( $_SERVER['REQUEST_URI'] ) );
    44 define( 'SEO_KEYWORDS_VERSION', '1.1.2' );
     44define( 'SEO_KEYWORDS_VERSION', '1.1.3' );
    4545
    4646/**
Note: See TracChangeset for help on using the changeset viewer.