anik786
Forum Replies Created
-
Looks like its working now. Thanks for the help!
I have found a way to do this, but seems a bit hacky:
<script> (function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = 'https://connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v2.10&appId=<?php echo $fbAppId ?>'; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); </script> <div class="fb-login-button" data-max-rows="2" data-size="large" data-button-type="login_with" data-auto-logout-link="false" data-use-continue-as="true" data-scope="public_profile,email" onlogin="theChampAuthUserFB"></div>
The main thing I’m worried about is the
onlogin="theChampAuthUserFB
part.
The plugin code isn’t documented and it’s not clear what does what.I also wanted to extend
window.fbAsyncInit
to add a loader, but I can’t because it’s already being used by the plugin.It would be nice to improve the plugin JS so that it is easier to extend. Adding things like hooks (both in PHP and JS), API docs, comments etc. would go a LONG way.
- This reply was modified 7 years, 3 months ago by anik786.
oh. Well that’s not the feature I was looking fotr. I wanted it to work with ACF’s editor (as you can potentially have multiple editors).
Thanks anyways!
Forum: Plugins
In reply to: [HTML Editor Syntax Highlighter] Not working on ACF custom postsAfter looking at the minified code more closely I have spotted several id’s that don’t appear in ACF:
- content
- content-html
- content-tmce
- ed_toolbar
- wp-content-editor-container
This makes sense why ACF chose not to use these id’s as in ACF you can have multiple editors on one page.
You’ll also find that many of the id’s mentioned above have classes attributed to them that also exists in ACF:
- content has class wp-editor-area
- content-html: has classes wp-switch-editor and switch-html (recommend switch-html as wp-switch-editor is also used for other buttons)
- content-tmce: has classes wp-switch-editor and switch-tmce (recommend switch-html as wp-switch-editor is also used for other buttons)
- etc.
Note some of the classes named above may not be specific enough as they are reused on other elements so I would suggest looking at the ACF and see how they named their fields.
Forum: Plugins
In reply to: [HTML Editor Syntax Highlighter] Not working on ACF custom postsI narrowed down the problem to the fact that the id’s in “hesh.min.js” are not correct for the ACF plugin. For example the id “wp-content-wrap” does not exist for the ACF editor. If the original JS unminified plugin was posted, a lot of the problems here would be fixed.
Could you please upload the unminified version of the plugin. Also it would be ideal if this plugin has a Github page to suggest edits.
Many thanks!
Forum: Plugins
In reply to: [HTML Editor Syntax Highlighter] Not working on ACF custom postsNote: I also receive an error on these pages on the console:
Uncaught TypeError: Cannot read property 'insertAdjacentHTML' of null
What’s more I noticed that the plugin don’t use ANY of the mce filters or actions.
e.g.:
https://codex.www.ads-software.com/Plugin_API/Filter_Reference/mce_external_pluginshttps://codex.www.ads-software.com/Function_Reference/add_editor_style
Sorry I don’t understand. I’m trying to add this to my ACF posts as well. How do I do this?
Forum: Plugins
In reply to: [Post Type Archive Link] Editors cannot use pluginTurns out that this did work. It was just hidden from the screen options menu for some reason! Thanks for the help ??
Forum: Plugins
In reply to: [Post Type Archive Link] Editors cannot use pluginUPDATE:
I tried adding LOADS more capabilities and still no luck. How can I make this plugin work for editors.
Forum: Fixing WordPress
In reply to: Custom Post Types Permalinks not working correctlyFixed my own problem:
Followed instruction 4 on Fixing .htaccess Generation Issues in:
https://codex.www.ads-software.com/Using_Permalinks