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

feat: register_meta. Closes #1348. #1600

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

feat: register_meta. Closes #1348. #1600

wants to merge 7 commits into from

Conversation

tanftw
Copy link
Contributor

@tanftw tanftw commented Aug 19, 2024

Register meta and unit test. Closes #1348.

@tanftw tanftw requested a review from rilwis August 19, 2024 03:55
Copy link
Member

@rilwis rilwis left a comment

Choose a reason for hiding this comment

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

A có comment mấy cái nhỏ để cleanup trước. E thêm type hint cho các params và return value (nếu có thể) nhé.

inc/field.php Outdated Show resolved Hide resolved
inc/field-registry.php Outdated Show resolved Hide resolved
inc/field.php Show resolved Hide resolved
inc/fields/custom-html.php Show resolved Hide resolved
inc/field.php Outdated Show resolved Hide resolved
@tanftw
Copy link
Contributor Author

tanftw commented Aug 19, 2024

A có comment mấy cái nhỏ để cleanup trước. E thêm type hint cho các params và return value (nếu có thể) nhé.

E update hết rồi nhé, giờ e chuyển qua làm block binding nếu cần update gì bên này thì e update tiếp

@rilwis rilwis changed the title feat: register_meta feat: register_meta. Closes #1348. Aug 19, 2024
Copy link
Member

@rilwis rilwis left a comment

Choose a reason for hiding this comment

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

Hiện tại 1 số field như post, taxonomy, usertaxonomy_advanced (khi ko multiple) thì đều trả về giá trị định dạng integer e nhé. E format lại giá trị trả về nhé.

Trong commit mới, a có update lại hàm register_meta vì tham số đầu tiên của nó phải là object_type, và nhận giá trị post, term, user, ... thôi. Tham số object_subtype mới nhận giá trị là post type.

A có 1 số comment nhỏ khác, e xem nhé.

inc/field.php Outdated Show resolved Hide resolved
inc/fields/file.php Show resolved Hide resolved
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.

Register fields to Wordpress internals
2 participants