fix(naming): resolve naming-convention warnings from Plugin Check#3205
Open
faisalahammad wants to merge 1 commit into
Open
fix(naming): resolve naming-convention warnings from Plugin Check#3205faisalahammad wants to merge 1 commit into
faisalahammad wants to merge 1 commit into
Conversation
Renamed internal helper functions and the admin meta-box field interface to use the 'llms_' prefix per WordPress coding standards: - get_course -> llms_get_course - get_lesson -> llms_get_lesson - get_section_data -> llms_get_section_data - get_lesson_data -> llms_get_lesson_data - get_product_query_var -> llms_get_product_query_var - get_available_payment_options -> llms_get_available_payment_options - Meta_Box_Field_Interface -> LLMS_Metabox_Field_Interface (file renamed) All original names retained via deprecated wrappers for backward compatibility. Public API functions, template variables, WordPress core hook names, and vendored libraries (libraries/*) unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix naming-convention warnings flagged by the WordPress Plugin Check report. Renames unprefixed functions, renames the meta box field interface to follow
LLMS_class prefix convention, and renames the interface file to match WordPress file naming standards. Backward compatibility preserved via deprecated wrappers.Changes
Function Renames (includes/functions/llms.functions.course.php)
Before:
After:
Why: Unprefixed functions risk collisions with other plugins. Added
llms_prefix per coding standards. Old functions kept as deprecated wrappers calling the new ones.Template Function Renames (includes/llms.template.functions.php)
Before:
After:
Why: Same prefix issue. Deprecated wrappers maintain backward compatibility.
Interface Rename (Meta Box Fields)
Before:
interface Meta_Box_Field_Interface { ... }After:
interface LLMS_Meta_Box_Field_Interface { ... }Why: Core classes must use
LLMS_prefix per coding standards. Updated all 19 implementing classes and the class loader.File Rename
Before:
includes/admin/meta-boxes/fields/interface.meta.box.field.phpAfter:
includes/admin/meta-boxes/fields/class-llms-metabox-field-interface.phpWhy: WordPress file naming standard requires
class-llms-<name>.phpformat.Testing
Test 1: Backward compatibility
get_course( $id )in a theme or pluginllms_get_course( $id )Result: Old functions work, new functions work, deprecation notices fire correctly.
Test 2: Meta box fields
Result: All field types (text, textarea, editor, checkbox, select, etc.) work as expected.