Skip to content

Php8 fixes#13

Open
gavinny wants to merge 3 commits intophillord:masterfrom
gavinny:php8_fixes
Open

Php8 fixes#13
gavinny wants to merge 3 commits intophillord:masterfrom
gavinny:php8_fixes

Conversation

@gavinny
Copy link

@gavinny gavinny commented Dec 8, 2025

Fix PHP8 compliance, avoid some warnings associated with unset variables, and added new functionality for in-text citations.

…f' option to the short code

PHP8 requires stricter delineation between static and non-static calls. Replaced all "__CLASS__" statements in the the add_XXXX calls with $this to follow standards. Additionally, the main call is rewritten for the same reason. 

New if tests to avoid code being exercised if variables are not defined. Not quite sure that this is the correct fix though.

New functionality in the shortcode. If [code ref="Jones et al. (2025)"]DOI[/code] is used, the link in the text will use "Jones et al (2025)" as the link anchor. This is useful for in-text citations - note that you can only have one distinct ref in the post.
@gavinny
Copy link
Author

gavinny commented Dec 8, 2025

These fixes allow kcite to work with WP 6.8.3 and PHP8.3.

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

Successfully merging this pull request may close these issues.

1 participant