Skip to content

Commit

Permalink
feat(theme-support): Added Astra theme support for store and dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
tareq1988 committed Nov 26, 2020
1 parent 3bb3167 commit 5287736
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
33 changes: 33 additions & 0 deletions includes/ThemeSupport/Astra.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

namespace WeDevs\Dokan\ThemeSupport;

/**
* Astra Theme Support
*
* @since 3.1
*/
class Astra {

/**
* The constructor
*/
function __construct() {
add_filter( 'astra_page_layout', [ $this, 'remove_sidebar' ] );
}

/**
* Remove sidebar from store and dashboard page
*
* @param string $layout
*
* @return string
*/
public function remove_sidebar( $layout ) {
if ( dokan_is_store_page() || dokan_is_seller_dashboard() ) {
return 'no-sidebar';
}

return $layout;
}
}
1 change: 1 addition & 0 deletions includes/ThemeSupport/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ private function include_support() {
'electro' => Electro::class,
'enfold' => Enfold::class,
'twentytwenty' => TwentyTwenty::class,
'astra' => Astra::class,
]
);

Expand Down

0 comments on commit 5287736

Please sign in to comment.