Skip to content

Commit

Permalink
Merge pull request #71 from helgatheviking/issues/version-bumps
Browse files Browse the repository at this point in the history
Issues/version bumps
  • Loading branch information
helgatheviking authored Oct 31, 2024
2 parents 125c0c1 + 1562417 commit f131202
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 33 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ build/
deploy/
svn/
wp-assets/
assets/js/
1 change: 0 additions & 1 deletion inc/class-nav-menu-roles-import.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ class Nav_Menu_Roles_Import extends WP_Importer {
/**
* __construct function.
*
* @access public
* @return void
*/
public function __construct() {
Expand Down
16 changes: 0 additions & 16 deletions inc/class-nav-menu-roles.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ public function __wakeup() {

/**
* Nav_Menu_Roles Constructor.
* @access public
* @return Nav_Menu_Roles
* @since 1.0
*/
Expand All @@ -101,11 +100,6 @@ public function __construct( $file ) {
// Add FAQ and Donate link to plugin.
add_filter( 'plugin_row_meta', array( $this, 'add_action_links' ), 10, 2 );

// Maybe switch the admin walker.
if ( ! self::is_wp_gte( '5.4' ) ) {
add_filter( 'wp_edit_nav_menu_walker', array( $this, 'edit_nav_menu_walker' ) );
}

// Add new fields via hook.
add_action( 'wp_nav_menu_item_custom_fields', array( $this, 'custom_fields' ), 10, 4 );

Expand All @@ -131,9 +125,6 @@ public function __construct( $file ) {

/**
* Include the custom admin walker
*
* @access public
* @return void
*/
public function admin_init() {

Expand All @@ -146,9 +137,6 @@ public function admin_init() {
/**
* Register the Importer
* the regular Importer skips post meta for the menu items
*
* @access private
* @return void
*/
public function register_importer() {
// Register the new importer.
Expand Down Expand Up @@ -665,9 +653,6 @@ public function exclude_menu_items( $items ) {

/**
* Maybe upgrade
*
* @access public
* @return void
*/
public function maybe_upgrade() {
$db_version = get_option( 'nav_menu_roles_db_version', false );
Expand All @@ -681,7 +666,6 @@ public function maybe_upgrade() {
/**
* Test WordPress version
*
* @access public
* @param string $version - A WordPress version to compare against current version.
* @return boolean
*/
Expand Down
1 change: 0 additions & 1 deletion inc/class-walker-nav-menu-edit-roles-4.7.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0
/**
* Get custom fields
*
* @access protected
* @since 0.1.0
* @uses do_action() Calls 'menu_item_custom_fields' hook
*
Expand Down
8 changes: 3 additions & 5 deletions inc/customizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@
add_action( 'customize_controls_enqueue_scripts', __NAMESPACE__ . '\customizer_scripts' );

// Workaround for previewing changes.
if ( \Nav_Menu_Roles::is_wp_gte( '4.9' ) ) {
add_action( 'customize_register', __NAMESPACE__ . '\customizer_preview', 1000 );
}
add_action( 'customize_register', __NAMESPACE__ . '\customizer_preview', 1000 );

// Workaround for saving changes.
add_action( 'customize_save_after', __NAMESPACE__ . '\customizer_save' );
Expand Down Expand Up @@ -105,10 +103,10 @@ function customizer_custom_fields() {
* Load the customizer scripts which extends nav menu item controls.
*/
function customizer_scripts() {
$script_dependencies = include plugin_dir_path( __DIR__ ) . '/assets/js/customize-controls.asset.php';
$script_dependencies = include plugin_dir_path( __DIR__ ) . '/assets/js/customizer/controls.asset.php';
wp_enqueue_script(
'customize-nav-menu-roles',
plugins_url( 'assets/js/customize-controls.js', dirname( __FILE__ ) ),
plugins_url( 'assets/js/customizer/controls.js', dirname( __FILE__ ) ),
array_merge( array( 'customize-nav-menus' ), $script_dependencies['dependencies'] ),
$script_dependencies['version'],
true
Expand Down
2 changes: 1 addition & 1 deletion nav-menu-roles.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: Nav Menu Roles
* Plugin URI: http://www.kathyisawesome.com/449/nav-menu-roles/
* Description: Hide custom menu items based on user roles.
* Version: 2.1.3-beta.1
* Version: 2.1.3
* Author: Kathy Darling
* Author URI: http://www.kathyisawesome.com
* License: GPL-3.0
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"title": "Nav Menu Roles",
"name": "nav-menu-roles",
"version": "2.1.3-beta.1",
"version": "2.1.3",
"description": "Hide menu items based on user roles",
"main": "Gruntfile.js",
"license": "GPL-3.0",
Expand All @@ -14,7 +14,7 @@
},
"author": "helgatheviking",
"devDependencies": {
"@wordpress/scripts": "^27.2.0",
"@wordpress/scripts": "^30.4.0",
"grunt": "^1.6.1",
"grunt-contrib-clean": "~2.0.1",
"grunt-contrib-compress": "^2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
**Requires at least:** 4.5.0
**Tested up to:** 6.4.0
**Requires PHP:** 5.3.2
**Stable tag:** 2.1.3-beta.1
**Stable tag:** 2.1.3
**License:** GPLv3

Hide custom menu items based on user roles. PLEASE READ THE FAQ IF YOU ARE NOT SEEING THE SETTINGS.
Expand Down
11 changes: 6 additions & 5 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
=== Nav Menu Roles ===

Contributors: helgatheviking
Donate link: https://www.paypal.com/fundraiser/charity/1451316
Donate link: https://paypal.me/helgatheviking
Tags: menu, menus, nav menu, nav menus
Requires at least: 4.5.0
Tested up to: 6.5.0
Requires PHP: 5.3.2
Stable tag: 2.1.3-beta.1
Requires at least: 6.6.0
Tested up to: 6.7.0
Requires PHP: 7.4
Stable tag: 2.1.3
License: GPLv3

Hide custom menu items based on user roles. PLEASE READ THE FAQ IF YOU ARE NOT SEEING THE SETTINGS.
Expand Down Expand Up @@ -267,6 +267,7 @@ Yes, but manually. WPML developers have informed me that the meta data for nav m
== Changelog ==

= 2.1.3 =
* Requires: PHP 7.4 and WordPress 6.3
* Fix: RTL layout style.

= 2.1.2 =
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const path = require( 'path' );
module.exports = {
...defaultConfig,
entry: {
'customize-controls': '/src/customize-controls.js',
'customizer/controls': '/src/customizer/controls.js',
'nav-menu-roles': '/src/nav-menu-roles.js',
},
output: {
Expand Down

0 comments on commit f131202

Please sign in to comment.