You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently in @faustwp/core: 3.0.1 package, there is a way to hook into wpUrl method. But there is no way to hook into the adminUrl, and as far as there is a way to override SiteName link in the custom toolbar with snippet like this:
hooks.addFilter('toolbarNodes','faust',(toolbarNodes: FaustToolbarNodes,context: FaustToolbarContext)=>{constadminUrl=getAdminUrl().replace('/wp-admin','/wp/wp-admin');constcustomToolbarNodes: FaustToolbarNodes=[{id: 'site-name',location: 'primary',component: <SiteNameurl={adminUrl}/>,},];// Removing default site name node to be able to override admin urltoolbarNodes=[
...toolbarNodes.filter((node)=>node.id!=='site-name'),];return[...customToolbarNodes, ...toolbarNodes];},);
there is no way to override rest of the toolbar items to render proper admin urls.
Would be great if we could do something like:
// @note: wpAdminUrl filter is not currently part of @faustwp/core packagehooks.addFilter('wpAdminUrl','faust',(url: string)=>{returnurl.replace('/wp-admin','/wp/wp-admin');// or whatever admin url modification is needed});
There is a similar request to this one, but it is related to WordPress faustwp plugin #1872 (comment)
The text was updated successfully, but these errors were encountered:
Currently in
@faustwp/core: 3.0.1
package, there is a way to hook into wpUrl method. But there is no way to hook into theadminUrl
, and as far as there is a way to overrideSiteName
link in the custom toolbar with snippet like this:there is no way to override rest of the toolbar items to render proper admin urls.
Would be great if we could do something like:
There is a similar request to this one, but it is related to WordPress
faustwp
plugin #1872 (comment)The text was updated successfully, but these errors were encountered: