-
AuthorPosts
-
August 11, 2020 at 9:26 pm #1236741
I have chosen to use the Html5 Audio Player PRO plug-in (Version 1.3 | By Abu Hayat Polash) on an Enfold site I am building. Something I noticed right away was when I preview pages of my site, the link in the black bar at the top that normally is “Edit Page”, taking me back to the page editor, changes to “Edit Audio Player (Classic Editor)” with the Audio Player app installed. This link takes me directly to the plugin and is not something I need or want in that position as I will rarely be editing the audio player.
I first went to the author of this plug-in with the problem, but with our testing have identified that the Enfold theme is causing this issue. When switching to a different theme, the Edit Page link is working as expected. I also tried disabling and enabling plug-ins but that did not solve the issue, it definitely seems theme related.
There appears to be a small clue in the names of the links – with the Edit Page link it says “Edit Page (Advanced Layout Builder)” which is Enfold. When the link is overwritten, it says “Edit Audio Player (Classic Editor)” so it appears to be forcing the classic environment somehow?
I have included links to before and after images in Private Content from my Dropbox.
Please let me know if you have any thoughts about this (other than not using the plug-in) as it is disrupting my workflow. Thanks.
August 16, 2020 at 10:44 pm #1238287Hey Blaise,
Sorry for the late reply, and thanks for the screenshots. So when the button in your toolbar says “Edit Audio Player (Classic Editor)” it links to the plugin settings, and this occurs if you “preview” a page?
Yet if you publish the page the button will say “Edit Page (Advanced Layout Builder)”, correct?
Can we login to your site to examine? Please include an admin login in the private content area so we can take a closer look.Best regards,
MikeAugust 16, 2020 at 11:11 pm #1238296It doesn’t matter whether my page is in preview or is published. When this app is active and I’m using Enfold, viewing a page from this site while logged in shows “Edit Audio Player (Classic Editor)” in place of “Edit Page (Advanced Layout Builder)” in the black bar. As said, when we test with a different theme, no problem. Both the apps author and I experienced the same result when testing. I have included a login for you.
August 17, 2020 at 4:54 am #1238343Hi,
Thank you for the login, I see that the button “Edit Audio Player (Classic Editor)” is always pointing to the “post=1766” which is one of your Audio Players, it doesn’t seem to matter if it is a post or a page, and there are no errors in the browser console.
If I disable your plugin “Disable Gutenberg” and change the default editor at Enfold Theme Options > Select Your Editor the button changes text but not the wrong link.
So I don’t know why this plugin & Enfold are clashing, but unfortunately, there is not a lot we can for third-party plugins within the scope of our support.
But since the link never changes, I think we can replace the link with the correct edit link for pages and posts with this script and hopefully improve your workflow.
Try adding this code to the end of your functions.php file in Appearance > Editor:function custom_script(){ ?> <script> (function($){ $(window).load(function(){ function get_current_page_id() { var page_body = $('body'); var id = 0; if(page_body) { var classList = page_body.attr('class').split(/\s+/); $.each(classList, function(index, item) { if (item.indexOf('page-id') >= 0 || item.indexOf('postid-') >= 0) { var item_arr = item.split('-'); id = item_arr[item_arr.length -1]; return false; } }); } return id; } var id = get_current_page_id(); var theURL = '/wp-admin/post.php?post='+id+'&action=edit&classic-editor=1'; $('#wp-admin-bar-edit a').mouseover(function() { $(this).attr("href", theURL); }); }); })(jQuery); </script> <?php } add_action('wp_footer', 'custom_script');
this will not change the text of the button, but it does change the link.
Please clear your browser cache and check.Best regards,
MikeAugust 17, 2020 at 6:04 pm #1238582Thank you. I will give it a try or abandon the use of this module. Either way I thought your development team should know.
August 20, 2020 at 12:13 pm #1239520Hi,
Thank you, did you find that this helped, is there anything else we can assist with on this?Best regards,
MikeAugust 20, 2020 at 5:08 pm #1239587Thanks, this worked. Thank you for your help. Case closed.
August 20, 2020 at 10:26 pm #1239656Hi,
I’m glad this was resolved. If you need additional help, please let us know here in the forums.
Best regards,
Jordan Shannon -
AuthorPosts
- The topic ‘Html5 Audio Player PRO odd conflict’ is closed to new replies.