Skip to content

Commit

Permalink
Doing a rebrand to Comment Edit Lite.
Browse files Browse the repository at this point in the history
  • Loading branch information
ronaldhuereca committed Feb 10, 2023
1 parent daa7f02 commit 9b2f8f9
Show file tree
Hide file tree
Showing 9 changed files with 53 additions and 12 deletions.
Binary file modified images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions includes/admin/class-admin-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ public static function get_settings_header() {
</h1>
<div class="sce-docs-wrap">
<a href="https://dlxplugins.com/support/" target="_blank" class="sce-support-link"><?php esc_html_e( 'Get Support', 'simple-comment-editing' ); ?></a>
<a href="https://docs.dlxplugins.com/v/simple-comment-editing/" target="_blank" class="sce-docs-link"><?php esc_html_e( 'View Documentation', 'simple-comment-editing' ); ?></a>
<a href="https://docs.dlxplugins.com/v/comment-edit-lite/" target="_blank" class="sce-docs-link"><?php esc_html_e( 'View Documentation', 'simple-comment-editing' ); ?></a>
<a href="https://dlxplugins.com/plugins/comment-edit-pro/" target="_blank" class="sce-comment-edit-pro-link"><?php esc_html_e( 'Get the Pro Version', 'simple-comment-editing' ); ?></a>
</div>
</div>
Expand All @@ -287,10 +287,10 @@ public static function get_settings_footer() {
*/
public function register_settings_menu() {
$hook = add_options_page(
__( 'Simple Comment Editing', 'simple-comment-editing' ),
__( 'Simple Comment Editing', 'simple-comment-editing' ),
__( 'Comment Edit Lite', 'simple-comment-editing' ),
__( 'Comment Edit Lite', 'simple-comment-editing' ),
'manage_options',
'simple-comment-editing',
'comment-edit-lite',
array( '\SCE\Includes\Admin\Admin_Settings', 'settings_page' )
);
return $hook;
Expand Down
4 changes: 2 additions & 2 deletions includes/admin/tabs/class-integrations.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,11 @@ public function output_settings( $tab, $sub_tab = '' ) {
</div>
<div class="sce-admin-panel-area">
<h3 class="sce-panel-heading">
<?php esc_html_e( 'Akismet and reCAPTCHA 3 Integrations (Pro only)', 'simple-comment-editing' ); ?>
<?php esc_html_e( 'Akismet, reCAPTCHA 3, Slack Integrations (Pro only)', 'simple-comment-editing' ); ?>
</h3>
<div class="sce-panel-row">
<p class="description">
<?php esc_html_e( 'Comment Edit Pro adds reCAPTCHA 3 spam protection and Akismet integrations to Simple Comment Editing.', 'simple-comment-editing' ); ?>
<?php esc_html_e( 'Comment Edit Pro adds reCAPTCHA 3 spam protection, Akismet spam protection, and Slack notifications to Comment Edit Lite.', 'simple-comment-editing' ); ?>
</p>
</div>
<div class="sce-panel-row">
Expand Down
2 changes: 1 addition & 1 deletion includes/admin/tabs/class-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function output_settings( $tab, $sub_tab = '' ) {
<div class="sce-panel-row">
<form action="" method="POST">
<?php wp_nonce_field( 'save_sce_options' ); ?>
<h1><?php esc_html_e( 'Welcome to Simple Comment Editing!', 'simple-comment-editing' ); ?></h1>
<h1><?php esc_html_e( 'Welcome to Comment Edit Lite!', 'simple-comment-editing' ); ?></h1>
<p><?php esc_html_e( 'For more options, stats, restoration of edited comments, and more configuration, please try: ', 'simple-comment-editing' ); ?><a target="_blank" href="https://dlxplugins.com/plugins/comment-edit-pro/"><?php esc_html_e( 'Comment Edit Pro', 'simple-comment-editing' ); ?></a></p>
<table class="form-table">
<tbody>
Expand Down
2 changes: 1 addition & 1 deletion includes/admin/tabs/class-support.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public function output_settings( $tab, $sub_tab = '' ) {
</p>
</div>
<div class="sce-panel-row">
<a class="sce-button sce-button-info" href="https://sce.dlxplugins.com/" target="_blank"><svg class="sce-icon"><use xlink:href="#sce-book-icon"></use></svg>&nbsp;&nbsp;<?php esc_html_e( 'View the Documentation', 'simple-comment-editing' ); ?></a>
<a class="sce-button sce-button-info" href="https://docs.dlxplugins.com/v/comment-edit-lite/" target="_blank"><svg class="sce-icon"><use xlink:href="#sce-book-icon"></use></svg>&nbsp;&nbsp;<?php esc_html_e( 'View the Documentation', 'simple-comment-editing' ); ?></a>
</div>
</div>
<div class="sce-admin-panel-area">
Expand Down
2 changes: 1 addition & 1 deletion includes/class-enqueue.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function run() {
* @param string $hook The page hook name.
*/
public function admin_scripts( $hook ) {
if ( 'options-general.php' !== $hook && 'settings_page_simple-comment-editing' !== $hook ) {
if ( 'options-general.php' !== $hook && 'settings_page_comment-edit-lite' !== $hook ) {
return;
}
wp_enqueue_style(
Expand Down
2 changes: 1 addition & 1 deletion includes/class-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public static function hex2rgba( $color, $opacity = false ) {
* @return string URL to admin screen. Output is not escaped.
*/
public static function get_settings_url( $tab = '', $sub_tab = '' ) {
$options_url = admin_url( 'options-general.php?page=simple-comment-editing' );
$options_url = admin_url( 'options-general.php?page=comment-edit-lite' );
if ( ! empty( $tab ) ) {
$options_url = add_query_arg( array( 'tab' => sanitize_title( $tab ) ), $options_url );
if ( ! empty( $sub_tab ) ) {
Expand Down
5 changes: 3 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?php
/*
Plugin Name: Simple Comment Editing
Plugin URI: https://dlxplugins.com/plugins/simple-comment-editing/
Plugin Name: Comment Edit Lite
Plugin URI: https://dlxplugins.com/plugins/comment-edit-lite
/
Description: Allow your users to edit their comments.
Author: DLX Plugins
Version: 2.8.0
Expand Down
40 changes: 40 additions & 0 deletions simple-comment-editing.php
Original file line number Diff line number Diff line change
Expand Up @@ -1537,3 +1537,43 @@ function sce_instantiate() {

}
} //end sce_instantiate


register_activation_hook( Functions::get_plugin_file(), 'sce_plugin_activate' );
add_action( 'admin_init', 'sce_plugin_activate_redirect' );

/**
* Add an option upon activation to read in later when redirecting.
*/
function sce_plugin_activate() {
if ( ! Functions::is_multisite() ) {
add_option( 'comment-edit-lite-activate', sanitize_text_field( Functions::get_plugin_file() ) );
}
}

/**
* Redirect to Comment Edit Lite settings page upon activation.
*/
function sce_plugin_activate_redirect() {

// If on multisite, bail.
if ( Functions::is_multisite() ) {
return;
}

// Make sure we're in the admin and that the option is available.
if ( is_admin() && Functions::get_plugin_file() === get_option( 'comment-edit-lite-activate' ) ) {
delete_option( 'comment-edit-lite-activate' );
// GEt bulk activation variable if it exists.
$maybe_multi = filter_input( INPUT_GET, 'activate-multi', FILTER_VALIDATE_BOOLEAN );

// Return early if it's a bulk activation.
if ( $maybe_multi ) {
return;
}

$settings_url = admin_url( 'options-general.php?page=comment-edit-lite' );
wp_safe_redirect( $settings_url );
exit;
}
}

0 comments on commit 9b2f8f9

Please sign in to comment.