Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong reference counts AND duplicated references #9

Open
ericraider33 opened this issue Sep 24, 2021 · 1 comment
Open

Wrong reference counts AND duplicated references #9

ericraider33 opened this issue Sep 24, 2021 · 1 comment

Comments

@ericraider33
Copy link

I'm using the theme ‘color newsmagazine’ and the easy footnote plugin. I've verified that the plug-in calls content twice. The theme cause the reference counts to be wrong AND to duplicate the list of references on the page. To reproduce the issue, please see the link:

https://test-wordpress.chroniccareiq.com/2021/09/23/hello-world/

My suggested fix is to introduce a short code so that authors can manually reset the plug-in. It is a fix that wouldn't break backwards compatibility and would make the plug-in work better with other themes.

Example code for implementing a 'reset' shortcode:

`add_shortcode( 'efn_reset', array( $this, 'short_code_reset' ) );

/**

  • Manually reset foot notes and counter
    */
    public function short_code_reset() {
    $this->footnoteCount = 0;
    $this->footnotes = array();
    return "";
    }`
ericraider33 added a commit to ericraider33/easy-footnotes that referenced this issue Sep 24, 2021
Added efn_reset short code for manually resetting plug, which resolves the issue of references duplicating with certain plug-ins.

See jasonyingling#9 for more information.
@ericraider33
Copy link
Author

@jasonyingling Can you merge the pull request for the EFN_RESET method? The most recent update clobbered my local changes and jacked up my website. I'm sure it will help others with weird themes like the one I'm using.

#10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant