Skip to content

Commit

Permalink
Prevent showing header menu fallback link when user not logged in or …
Browse files Browse the repository at this point in the history
…doesn't have the required capabilities - version 1.0.3
  • Loading branch information
Vlad Olaru committed Nov 4, 2019
1 parent 0dbd985 commit 08eea58
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 13 deletions.
6 changes: 3 additions & 3 deletions assets/scss/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ Theme URI: https://github.com/pixelgrade/rosa-lite
Author: Pixelgrade
Author URI: https://pixelgrade.com
Description: This is the free version of Rosa, the #1 best selling restaurant WordPress theme, built to help small businesses shape an appealing online experience. It's packed with a parallax effect to grab attention, an online food menu so people can discover your offering, an easy to customize interface without using code, and a responsive design to address people on the go. This theme's versatility allows it to be used in a wide range of industries, making it the perfect theme if you own a business. No matter if it's a restaurant, beauty salon, house rental, hotel, coffee shop, or any other type of small business, this theme will fit your needs perfectly.
Version: 1.0.2
Version: 1.0.3
License: GNU General Public License v3
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Text Domain: rosa-lite
Tags: food-and-drink, two-columns, right-sidebar, custom-menu, featured-images, translation-ready, threaded-comments, rtl-language-support, custom-logo, editor-style
Requires PHP: 5.3.0
Requires PHP: 5.4.0
Requires at least: 4.9.9
Tested up to: 5.2.4
Tested up to: 5.3.0
Rosa Lite WordPress Theme, Copyright (C) 2015-2019, Pixelgrade.
Rosa Lite is distributed under the terms of the GNU GPL v3.
Expand Down
4 changes: 4 additions & 0 deletions inc/template-tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ function rosa_lite_the_archive_title() {

if ( ! function_exists( 'rosa_lite_please_select_a_menu_fallback' ) ) {
function rosa_lite_please_select_a_menu_fallback() {
if ( ! current_user_can( 'edit_theme_options' ) ) {
return;
}

echo '
<ul class="nav nav--main" >
<li><a href="' . esc_url( admin_url( 'nav-menus.php?action=locations' ) ) . '">' . esc_html__( 'Please select a menu in this location', '__theme_txtd' ) . '</a></li>
Expand Down
11 changes: 7 additions & 4 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ Author: Pixelgrade
Author URI: https://pixelgrade.com/
Contributors: pixelgrade, babbardel, vlad.olaru, razvanonofrei, gorby31
Description: This is the free version of Rosa, the #1 best selling restaurant WordPress theme, built to help small businesses shape an appealing online experience. It's packed with a parallax effect to grab attention, an online food menu so people can discover your offering, an easy to customize interface without using code, and a responsive design to address people on the go. This theme's versatility allows it to be used in a wide range of industries, making it the perfect theme if you own a business. No matter if it's a restaurant, beauty salon, house rental, hotel, coffee shop, or any other type of small business, this theme will fit your needs perfectly.
Version: 1.0.2
Stable tag: 1.0.2
Version: 1.0.3
Stable tag: 1.0.3
License: GNU General Public License v3.0
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Text Domain: rosa-lite
Domain Path: /languages/
Tags: food-and-drink, two-columns, right-sidebar, custom-menu, featured-images, translation-ready, threaded-comments, rtl-language-support, custom-logo, editor-style
Requires PHP: 5.3.0
Requires PHP: 5.4.0
Requires at least: 4.9.9
Tested up to: 5.2.4
Tested up to: 5.3.0

== Description ==

Expand All @@ -30,6 +30,9 @@ No matter if it's a restaurant, beauty salon, house rental, hotel, coffee shop,

== Changelog ==

= 1.0.3 =
* Prevent showing header menu fallback link when user not logged in or doesn't have the required capabilities.

= 1.0.2 =
* Styling fixes and enhancements.

Expand Down
6 changes: 3 additions & 3 deletions style-rtl.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 08eea58

Please sign in to comment.