-
Notifications
You must be signed in to change notification settings - Fork 82
✨ Dashboard Account Settings #2310
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
base: v4-reviews
Are you sure you want to change the base?
Conversation
…s form dirty state
…t conditional visibility for action buttons.
…l width to dashboard header.
…lexible attachment card, and updated input field requirements.
…ignature uploader to single image type
Refactored the register method to better handle checkbox and file input types, set appropriate default values, and simplified the binding logic for Alpine.js. This enhances support for different input types and improves code clarity.
Moved and renamed profile-header.php to account/settings/header.php and updated references. Deleted obsolete profile-settings.php. Refactored billing address, notifications, preferences, and social accounts templates to use new InputField components, improved form state management, and enhanced UI consistency.
Enhanced the user social icons array by adding 'svg_icon' and 'pattern' fields for Facebook, X (Twitter), LinkedIn, GitHub, and Website. This provides SVG icon references and URL validation patterns for each social profile, improving consistency and validation.
Introduced a dropdown for selecting font size in account preferences, replacing the text input. Added predefined font size options and updated default value handling. Also improved select component styling for better UI consistency.
Introduced User::get_profile_settings_data() to centralize and streamline retrieval of user profile data for the account settings form. Updated the account settings template to use this method, improved default value handling, and switched display name and bio fields to use select and textarea input types, respectively.
The add_action call for 'wp_enqueue_scripts' no longer specifies PHP_INT_MAX as the priority, reverting to the default priority. This may affect the order in which scripts are enqueued.
…ate loads for attachment cards.
…e limits, and WordPress media integration.
…minating page reloads and updating field default values.
✨ Update asset enqueuing with calendar dashboard
…e uploader attachment card meta.
…version and WP Media integration.
…nts, and streamline button component usage by removing redundant primary variant calls.
| wp_localize_script( 'tutor-core', '_tutorobject', $localize_data ); | ||
|
|
||
| if ( $is_dashboard ) { | ||
| wp_enqueue_media(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need this script in other page. Load it where it's needed.
| * | ||
| * @return string | ||
| */ | ||
| private function render_custom_attributes( array $attributes ): string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method is not rendering. It's returning string.
It should be get_custom_attributes_string
| * | ||
| * @return self | ||
| */ | ||
| public function title_attr( string $key, string $value ): self { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can handle it by base attr method
| * @return self | ||
| */ | ||
| public function meta_attr( string $key, string $value ): self { | ||
| $this->meta_attr[ $key ] = $value; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
| * @return self | ||
| */ | ||
| public function action_attr( string $key, string $value ): self { | ||
| $this->action_attr[ $key ] = $value; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
| ), | ||
| 'withdraw' => array( | ||
| 'id' => 'withdraw', | ||
| 'label' => 'Withdraw', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here
| ), | ||
| 'preferences' => array( | ||
| 'id' => 'preferences', | ||
| 'label' => 'Preferences', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here
| * @since 3.0.0 | ||
| * @since 4.0.0 | ||
| */ | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prevent direct access
| <div class="tutor-grid tutor-md-grid-cols-1 tutor-grid-cols-2 tutor-gap-5"> | ||
| <?php | ||
| InputField::make() | ||
| ->type( InputType::TEXT ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to set type. Default is text
| ->render(); | ||
|
|
||
| InputField::make() | ||
| ->type( InputType::TEXT ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
This PR includes
New/Enhanced feature
-instead of double--incardscssget_profile_settings_datafunction toUserclass