Skip to content

Commit

Permalink
feat: release 0.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikhail Kobzarev committed Jun 26, 2024
1 parent aa7fcd6 commit 3bd1f04
Show file tree
Hide file tree
Showing 6 changed files with 120 additions and 23 deletions.
10 changes: 8 additions & 2 deletions assets/css/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
left: 0;
width: 99%;
}
.group .form-table input.color-picker {
.wposa__group .form-table input.color-picker {
max-width: 100px;
}
.wpsa-help-tab-toggle {
Expand All @@ -98,7 +98,10 @@
grid-gap: 20px;
grid-template-columns: auto 300px;
}

.wposa__column {}
.wposa__sidebar {
padding-top: 66px;
}
.wposa .description {
max-width: 350px;
}
Expand Down Expand Up @@ -285,6 +288,9 @@ input.wposa-field--switch:hover:after {
.wposa__column {
padding-right: 10px;
}
.wposa__sidebar {
padding-top: 0;
}
}
@media (max-width : 992px) {
.wposa-plugins {
Expand Down
64 changes: 64 additions & 0 deletions assets/images/icons/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 16 additions & 11 deletions assets/js/admin.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
jQuery( document ).ready( function( $ ) {
const ACTIVE_TAB = 'wposa_active_tab';

const
$show_settings_toggler = $('.show-settings'),
Expand All @@ -23,17 +24,21 @@ jQuery( document ).ready( function( $ ) {
$('.color-picker').iris();

// Switches option sections
$( '.group' ).hide();
var activetab = '';
$( '.wposa__group' ).hide();

let active_tab = '';

if ( 'undefined' != typeof localStorage ) {
activetab = localStorage.getItem( 'activetab' );
active_tab = localStorage.getItem( ACTIVE_TAB );
}
if ( '' != activetab && $( activetab ).length ) {
$( activetab ).fadeIn();

if ( '' !== active_tab && $( active_tab ).length ) {
$( active_tab ).fadeIn();
} else {
$( '.group:first' ).fadeIn();
$( '.wposa__group:first' ).fadeIn();
}
$( '.group .collapsed' ).each( function() {

$( '.wposa__group .collapsed' ).each( function() {
$( this )
.find( 'input:checked' )
.parent()
Expand All @@ -51,8 +56,8 @@ jQuery( document ).ready( function( $ ) {
});
});

if ( '' != activetab && $( activetab + '-tab' ).length ) {
$( activetab + '-tab' ).addClass( 'nav-tab-active' );
if ( '' != active_tab && $( active_tab + '-tab' ).length ) {
$( active_tab + '-tab' ).addClass( 'nav-tab-active' );
} else {
$( '.nav-tab-wrapper a:first' ).addClass( 'nav-tab-active' );
}
Expand All @@ -63,9 +68,9 @@ jQuery( document ).ready( function( $ ) {
.blur();
var clicked_group = $( this ).attr( 'href' );
if ( 'undefined' != typeof localStorage ) {
localStorage.setItem( 'activetab', $( this ).attr( 'href' ) );
localStorage.setItem( ACTIVE_TAB, $( this ).attr( 'href' ) );
}
$( '.group' ).hide();
$( '.wposa__group' ).hide();
$( clicked_group ).fadeIn();
evt.preventDefault();
});
Expand Down
6 changes: 5 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Donate link: https://www.kobzarev.com/donate/
Tags: indexnow, yandex, bing, google, seo
Requires at least: 6.0
Tested up to: 6.5
Stable tag: 0.1.2.2
Stable tag: 0.1.3
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -150,6 +150,10 @@ See the documentation available from each search engine for more details about R

== Changelog ==

= 0.1.3 (26.06.2024) =
* Updated logo of the application
* Fixed tab switching bug

= 0.1.2 (15.05.2024) =
* Added ability to sort by ReCrawler column in the list of Posts
* Added ability to migrate from IndexNow plugin in automatic mode
Expand Down
4 changes: 2 additions & 2 deletions recrawler.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Plugin Name: ReCrawler
* Description: ReCrawler is a small WordPress Plugin for quickly notifying search engines whenever their website content is created, updated, or deleted.
* Version: 0.1.2.2
* Version: 0.1.3
* Author: Mikhail Kobzarev
* Author URI: https://www.kobzarev.com/
* Plugin URI: https://wordpress.org/plugins/recrawler/
Expand All @@ -22,7 +22,7 @@
exit;
}

define( 'RECRAWLER_VERSION', '0.1.2.2' );
define( 'RECRAWLER_VERSION', '0.1.3' );
define( 'RECRAWLER_SLUG', 'recrawler' );
define( 'RECRAWLER_PREFIX', 'recrawler' );
define( 'RECRAWLER_NAME', 'ReCrawler' );
Expand Down
32 changes: 25 additions & 7 deletions src/Views/WPOSA.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,16 +200,35 @@ public function get_prefix(): string {

public function setup_hooks() {
// Enqueue the admin scripts.
add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts' ) );
add_action( 'admin_enqueue_scripts', [ $this, 'admin_scripts' ] );

// Hook it up.
add_action( 'admin_init', array( $this, 'admin_init' ) );
add_action( 'admin_init', [ $this, 'admin_init' ] );

// Menu.
add_action( 'admin_menu', array( $this, 'admin_menu' ) );
add_action( 'admin_menu', [ $this, 'admin_menu' ] );

// Ajax.
add_action( 'wp_ajax_' . Utils::get_plugin_prefix() . '_reset_form', [ $this, 'reset_form' ] );

// Hide all admin notices.
add_action( 'in_admin_header', [ $this, 'hide_admin_notices' ] );
}

/**
* Hide all admin notices for plugin pages.
*
* @return void
*/
public function hide_admin_notices(): void {
$current_screen = get_current_screen();

if ( ! in_array( $current_screen->id, [ 'toplevel_page_recrawler', 'recrawler_page_recrawler-log' ] ) ) {
return;
}

remove_all_actions( 'admin_notices' );
remove_all_actions( 'all_admin_notices' );
}

/**
Expand Down Expand Up @@ -1025,7 +1044,7 @@ public function plugin_page() {
<div class="wposa">
<div class="wposa-header">
<div class="wposa-header--left">
<img class="wposa-logo" title="ReCrawler" src="<?php echo esc_url( Utils::get_plugin_asset_url( 'images/icons/recrawler-logo--gradient.svg' ) ); ?>" width="80" alt="" />
<img class="wposa-logo" title="ReCrawler" src="<?php echo esc_url( Utils::get_plugin_asset_url( 'images/icons/logo.svg' ) ); ?>" width="80" alt="" />
</div>
<div class="wposa-header--center">
<div class="wposa-heading"><?php echo esc_html( $this->plugin_name ); ?></div>
Expand All @@ -1041,7 +1060,7 @@ public function plugin_page() {
<?php $this->show_forms(); ?>
</div>
<?php if ( $this->get_sidebar_cards_total() ) : ?>
<div class="wposa__column">
<div class="wposa__column wposa__sidebar">
<?php foreach ( $this->get_sidebar_cards() as $card ) : ?>
<div class="card wposa-card wposa-card--<?php echo esc_attr( $this->get_prefix() )?>_<?php echo esc_attr( $card['id'] )?>">
<?php if ( ! empty( $card['title'] ) ) : ?>
Expand Down Expand Up @@ -1106,8 +1125,7 @@ function show_forms() {
<?php
$form = wp_parse_args( $form, $default );
?>
<!-- style="display: none;" -->
<div id="<?php echo esc_attr( $form['id'] ); ?>" class="group" >
<div id="<?php echo esc_attr( $form['id'] ); ?>" class="wposa__group" >
<form class="wposa__form" method="post" action="<?php echo esc_url( admin_url( 'options.php' ) ); ?>">
<?php
do_action( 'wsa_form_top_' . $form['id'], $form );
Expand Down

0 comments on commit 3bd1f04

Please sign in to comment.