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

Proposed v3.2.4 #28

Open
wants to merge 27 commits into
base: master
Choose a base branch
from
Open

Proposed v3.2.4 #28

wants to merge 27 commits into from

Conversation

codejp3
Copy link

@codejp3 codejp3 commented Oct 9, 2022

@mujahidi - Tested and ready for final review.

It may seem like a lot, but the bulk majority of it is just code cleanup with tabs/spaces for easier readability.

I've tested against ACF v5 & v6. Both are functioning properly, but I found 2 UI visual bugs with v6:

  • number field append "px" has really huge gap. It is a core ACF issue and I have notified them.
  • color_picker field has a wrong sized button. Also a core ACF issue and I have notified them.

I figured you may want to change some of the wording for things. That's why it will be the NEXT release that officially supports translations ( #24 ) after you re-word anything to your liking. This release was just getting it prepared for it.

Highlights for actual code changes:

functions.php:

  • Your enqueue function has been split into 4 functions:
    -- one handles post_id stuff and fixes the issue with trying to get an id of a non-object (WP Support topic)
    -- one handles getting the values for fields (based on valid post_id)
    -- one handles merging the values for fields (based on supplied values)
    -- one handles enqueueing the stylesheet (based on merged values)
  • Checks for getting good results back for google_fonts.json file ( PHP Warning - Google API Key 400 Bad Request #27 )
  • All new functions are setup and ready for integration with future enhancements (like saving stylesheets/font files locally)
  • The rest is minor code cleanup

admin_settings.php

  • Admin error messages if bad API Key or network issues ( PHP Warning - Google API Key 400 Bad Request #27 )
  • Admin error messages if ACF not installed/activated
  • Translation / Text Domain changes to get plugin ready for translations (next release)

acf-typography.php

  • Translation / Text Domain changes to get plugin ready for translations (next release)
  • Handle ACF versions proactively until ACF implements it in ACF core. Now supports ACF v6.

acf-Typography-v5.php

  • changed field type from "text" to "color_picker" for text_color field which ACF v5 & v6 support.

acf-Typography-v6.php

  • placeholder file that points to acf-Typography-v5.php for now, but is the future home for any v6-specific field changes

That's really about it. Everything else is superficial, minor code cleanup, and has zero impact on functionality.

@codejp3
Copy link
Author

codejp3 commented Oct 10, 2022

@mujahidi

Update on ACF v6 UI issues for the number field with append gap issue, and color_picker button size issue:
ACF acknowledged the issue and has forwarded support to the dev team & product team for both issues.

Copy link
Owner

@mujahidi mujahidi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@codejp3 Can you please fix little spacing and indentation issues? Thanks

fields/acf-Typography-v4.php Outdated Show resolved Hide resolved
fields/acf-Typography-v4.php Outdated Show resolved Hide resolved
fields/acf-Typography-v4.php Outdated Show resolved Hide resolved
fields/acf-Typography-v4.php Outdated Show resolved Hide resolved
fields/acf-Typography-v4.php Outdated Show resolved Hide resolved
fields/acf-Typography-v5.php Outdated Show resolved Hide resolved
fields/acf-Typography-v5.php Outdated Show resolved Hide resolved
fields/acf-Typography-v5.php Outdated Show resolved Hide resolved
fields/acf-Typography-v5.php Outdated Show resolved Hide resolved
fields/acf-Typography-v5.php Outdated Show resolved Hide resolved
@codejp3
Copy link
Author

codejp3 commented Oct 12, 2022

@mujahidi

  • Misaligned tabs / spaces corrected using VSCode. Corrected in every file I altered. DONE
  • Unnecessary line breaks removed. It's a personal code readability preference of mine that I think helps with code readability. Note taken and I will not add those line breaks to anything else I push to you in the future. DONE

Let me know if anything else needs changing.

@codejp3 codejp3 requested a review from mujahidi October 15, 2022 01:44
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.

None yet

2 participants