Skip to content

Commit

Permalink
9.3.6 (#29)
Browse files Browse the repository at this point in the history
- [Dark Mode] Remove console.log in dark mode script
- [Menu] Fixed ACF not being able to sync when mega menu is disabled
  • Loading branch information
hrsetyono authored Oct 2, 2022
1 parent d2ae1bd commit 7925104
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions edje-wp-library.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
* License: MIT
* Author: Pixel Studio
* Author URI: https://pixelstudio.id
* Version: 9.3.5
* Version: 9.3.6
*/

if (!defined('WPINC')) { die; } // exit if accessed directly

// Constant
define('H_VERSION', '9.3.5');
define('H_VERSION', '9.3.6');
define('H_BASE', basename(dirname(__FILE__)).'/'.basename(__FILE__));

define('H_DIR', __DIR__); // for require
Expand Down
13 changes: 7 additions & 6 deletions module-menu/_index.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@
require_once __DIR__ . '/menu-item.php';
require_once __DIR__ . '/sub-menu.php';

add_action('admin_enqueue_scripts', '_h_enqueue_menu_assets', 100);
add_filter('acf/settings/load_json', '_h_load_acf_json_menu', 20);
add_action('after_setup_theme', function() {
if (!current_theme_supports('h-mega-menu')) { return; }

add_action('admin_enqueue_scripts', '_h_enqueue_menu_assets', 100);
add_filter('acf/settings/load_json', '_h_load_acf_json_menu', 20);
});


/**
* @action admin_enqueue_scripts
*/
function _h_enqueue_menu_assets() {
if (!current_theme_supports('h-mega-menu')) { return; }

wp_enqueue_script('h-menu', H_DIST . '/h-menu-admin.js', [], H_VERSION, true);
wp_enqueue_style('h-menu', H_DIST . '/h-menu-admin.css', [], H_VERSION);
}
Expand All @@ -22,8 +25,6 @@ function _h_enqueue_menu_assets() {
* @filter acf/settings/load_json 20
*/
function _h_load_acf_json_menu($paths) {
if (!current_theme_supports('h-mega-menu')) { return; }

$paths[] = plugin_dir_path(__FILE__) . '/acf-json';
return $paths;
}
2 changes: 1 addition & 1 deletion module-post-type/post-column.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ function _add_column($defaults) {

$column = $this->columns[$first_key];

// form a new list
// form a new list to change the order
$list = [];
foreach ($defaults as $slug => $name) {
if ($column['position_before'] === $slug) {
Expand Down
1 change: 0 additions & 1 deletion module-widgets/widget-dark-toggle.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ function _h_add_dark_mode_script() { ?>
<script>
(function() { 'use strict';
const darkMode = localStorage.hDarkMode === 'true';
console.log(darkMode);
if (darkMode) {
document.querySelector('body').classList.add('h-is-dark');

Expand Down

0 comments on commit 7925104

Please sign in to comment.