Skip to content
This repository has been archived by the owner on Aug 30, 2019. It is now read-only.

leovujanic/wp-barba-admin-bar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Barba Admin Bar

Allows users to have functional admin bar when viewing the site.

Description

This plugin fixes invalid links in Wordpress admin bar on sites that are loaded with Barba.js manager. Because wp admin bar is placed outside Barba container and wp-admin also (thanks, Darwin!) all links will fail to load requested page and if you use "open in new tab" option, wrong pages will be opened in admin because links are only valid for the first page loaded (or accessed directly). This plugin will inject little chunk of js code after admin bar. 'no-barba' class will be added on each link in admin menubar. It will add event listener on 'transitionCompleted' event in Barba.js. Every time event is fired ajax request that tries to fetch loaded page id will be made and all links will be updated so users will be able to use "Edit page" link.

Installation

  1. Upload 'barba-admin-bar' to the '/wp-content/plugins/' directory
  2. Activate the plugin through the 'Plugins' menu in WordPress

Tested on

  • Mac My Browser :)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages