Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
RatulHasan committed Oct 10, 2024
2 parents ac7757a + dc27e26 commit bbbc6e9
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 8 deletions.
7 changes: 4 additions & 3 deletions assets/js/frontend.js
Original file line number Diff line number Diff line change
Expand Up @@ -411,9 +411,10 @@

$( function () {
// Handle hash router.
if ( window.location.hash ) {
window.location = window.location.pathname;
}
// This is commented out because it causes the page to reload when the hash is present.
// if ( window.location.hash ) {
// window.location = window.location.pathname;
// }

// Handle navigation caret.
if ( ! anchestorItem?.classList.contains( 'wd-state-open' ) ) {
Expand Down
18 changes: 18 additions & 0 deletions includes/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,26 @@ public function __construct() {
new Admin\Docs_List_Table();

add_action( 'admin_init', array( $this, 'init_admin_actions' ), 5 );

// Redirect to a new design after trashing a doc
add_action('load-edit.php', array($this, 'trashed_docs_redirect'));
}

/**
* Redirect to a new design after trashing a doc.
*
* @return void
*/
public function trashed_docs_redirect() {
$screen = get_current_screen();
if ($screen->id === 'edit-docs') {
if (isset($_GET['trashed']) && intval(sanitize_text_field($_GET['trashed'])) > 0) {
wp_redirect(admin_url('admin.php?page=wedocs#'));
exit();
}
}
}

/**
* Admin initialization hook.
*
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "weDocs",
"version": "2.1.7",
"version": "2.1.8",
"description": "A documentation plugin for WordPress",
"author": "Tareq Hasan",
"license": "GPL",
Expand Down
7 changes: 6 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Tags: WordPress documentation plugin, WordPress docs plugin, Documentation, Know
Requires at least: 5.6
Tested up to: 6.5.3
Requires PHP: 7.4
Stable tag: 2.1.7
Stable tag: 2.1.8
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Discover weDocs, the ultimate WordPress documentation plugin. Easily create, manage, and organize content with seamless integration and a user-friendly interface.
Expand Down Expand Up @@ -237,6 +237,11 @@ Can’t wait to join us?

== Changelog ==

= v2.1.8 (10th Oct, 2024) =

* 🛠️ [FIX] Redirect to a new design after trashing a doc.
* 🛠️ [FIX] Handle hash router issue for the documentation page.

= v2.1.7 (22th Aug, 2024) =

* **Fix:** Move To Trash option not available for users with the Editor role.
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ if ( ! isProduction ) {
writeToDisk: true,
},
allowedHosts: 'all',
host: 'localhost',
host: 'wedocs.test',
port: 8886,
proxy: {
'/assets/build': {
Expand Down
4 changes: 2 additions & 2 deletions wedocs.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: weDocs
Plugin URI: https://wedocs.co/
Description: A documentation plugin for WordPress
Version: 2.1.7
Version: 2.1.8
Author: weDevs
Author URI: https://wedocs.co/?utm_source=wporg&utm_medium=banner&utm_campaign=author-uri
License: GPL2
Expand Down Expand Up @@ -59,7 +59,7 @@ final class WeDocs {
*
* @var string
*/
const VERSION = '2.1.7';
const VERSION = '2.1.8';

/**
* The plugin url.
Expand Down

0 comments on commit bbbc6e9

Please sign in to comment.