I have a wordpress theme buddyboss. and I want to change the register.php file(html). location: E:\Xampp\htdocs\wordpress\wp-content\plugins\buddyboss-platform\bp-templates\bp-nouveau\buddypress\members
But where is the html of this file generated? I don't see that anywhere.
This is the register.php file:
<?php
/**
* BuddyBoss - Members/Blogs Registration forms
*
* @since BuddyPress 3.0.0
* @version 3.1.0
*/
?>
<?php bp_nouveau_signup_hook('before', 'page'); ?>
<div id="register-page" class="page register-page">
<?php bp_nouveau_template_notices(); ?>
<?php bp_nouveau_user_feedback(bp_get_current_signup_step()); ?>
<form action="" name="signup_form" id="signup-form" class="standard-form signup-form " method="post" enctype="multipart/form-data">
<div>
<?php if ('request-details' === bp_get_current_signup_step()) : ?>
<?php bp_nouveau_signup_hook('before', 'account_details'); ?>
<div class="register-section default-profile" id="basic-details-section">
<?php /***** Basic Account Details ******/ ?>
</div><!-- #basic-details-section -->
<?php bp_nouveau_signup_hook('after', 'account_details'); ?>
<?php /***** Extra Profile Details ******/ ?>
<?php if (bp_is_active('xprofile') && bp_nouveau_base_account_has_xprofile()) : ?>
<?php bp_nouveau_signup_hook('before', 'signup_profile'); ?>
<div class="register-section extended-profile register-section-form " id="profile-details-section">
<?php /* Use the profile field loop to render input fields for the 'base' profile field group */ ?>
<?php while (bp_profile_groups()) : bp_the_profile_group(); ?>
<?php while (bp_profile_fields()) : bp_the_profile_field();
if (function_exists('bp_member_type_enable_disable') && false === bp_member_type_enable_disable()) {
if (function_exists('bp_get_xprofile_member_type_field_id') && bp_get_the_profile_field_id() === bp_get_xprofile_member_type_field_id()) {
continue;
}
}
?>
<div <?php bp_field_css_class('editfield');
bp_field_data_attribute(); ?>>
<fieldset>
<div>
<?php
$field_type = bp_xprofile_create_field_type(bp_get_the_profile_field_type());
$field_type->edit_field_html();
?>
</div>
</fieldset>
</div>
<?php endwhile; ?>
<input type="hidden" name="signup_profile_field_ids" id="signup_profile_field_ids" value="<?php bp_the_profile_field_ids(); ?>" />
<?php endwhile; ?>
<?php bp_nouveau_signup_hook('', 'signup_profile'); ?>
</div><!-- #profile-details-section -->
<?php bp_nouveau_signup_hook('after', 'signup_profile'); ?>
<?php endif; ?>
<?php bp_nouveau_signup_form(); ?>
</div><!-- //.layout-wrap -->
<?php bp_nouveau_signup_terms_privacy(); ?>
<?php bp_nouveau_submit_button('register'); ?>
<?php endif; // request-details signup step
?>
<?php bp_nouveau_signup_hook('custom', 'steps'); ?>
</form>
</div>
<?php bp_nouveau_signup_hook('after', 'page'); ?>
Thank you
If I do this:
add_filter( 'bp_nouveau_get_signup_fields', function($fields){
var_dump( $fields);
});
I get this as output:
array(2) { ["account_details"]=> array(3) { ["signup_email"]=> array(6) { ["label"]=> string(5) "Email" ["required"]=> bool(true) ["value"]=> string(25) "bp_get_signup_email_value" ["attribute_type"]=> string(5) "email" ["type"]=> string(5) "email" ["class"]=> string(0) "" } ["signup_password"]=> array(6) { ["label"]=> string(8) "Password" ["required"]=> bool(true) ["value"]=> string(0) "" ["attribute_type"]=> string(8) "password" ["type"]=> string(8) "password" ["class"]=> string(14) "password-entry" } ["signup_password_confirm"]=> array(6) { ["label"]=> string(16) "Confirm Password" ["required"]=> bool(true) ["value"]=> string(0) "" ["attribute_type"]=> string(8) "password" ["type"]=> string(8) "password" ["class"]=> string(22) "password-entry-confirm" } } ["blog_details"]=> array(4) { ["signup_blog_url"]=> array(6) { ["label"]=> string(8) "Site URL" ["required"]=> bool(true) ["value"]=> string(28) "bp_get_signup_blog_url_value" ["attribute_type"]=> string(4) "slug" ["type"]=> string(4) "text" ["class"]=> string(0) "" } ["signup_blog_title"]=> array(6) { ["label"]=> string(10) "Site Title" ["required"]=> bool(true) ["value"]=> string(30) "bp_get_signup_blog_title_value" ["attribute_type"]=> string(5) "title" ["type"]=> string(4) "text" ["class"]=> string(0) "" } ["signup_blog_privacy_public"]=> array(6) { ["label"]=> string(3) "Yes" ["required"]=> bool(false) ["value"]=> string(6) "public" ["attribute_type"]=> string(0) "" ["type"]=> string(5) "radio" ["class"]=> string(0) "" } ["signup_blog_privacy_private"]=> array(6) { ["label"]=> string(2) "No" ["required"]=> bool(false) ["value"]=> string(7) "private" ["attribute_type"]=> string(0) "" ["type"]=> string(5) "radio" ["class"]=> string(0) "" } } }
Thatbp_nouveau_signup_form
in theregister.php
file looks like it would be responsible for generating the form. Here is the code for it. Looking at that code, I see you could usedo_action( "bp_{$section}_fields" );
to add fields to the end of a section, but even better, that function uses bp_nouveau_get_signup_fields which has a filter also calledbp_nouveau_get_signup_fields
that you can hook into to change what fields are returned. If you do
add_filter( 'bp_nouveau_get_signup_fields', function($fields){
var_dump($fields);
});
then you will see what the data looks like and you can manipulate or add new fields as needed. If you need to add HTML that is more complicated then what is generated from the data presented by that filter, then use thedo_action("bp_{$section}_fields")
filter where according to the docstring$section
will be either'account_details'
or'blog_details'
.
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Find the answer in similar questions on our website.
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.
PHP (from the English Hypertext Preprocessor - hypertext preprocessor) is a scripting programming language for developing web applications. Supported by most hosting providers, it is one of the most popular tools for creating dynamic websites.
The PHP scripting language has gained wide popularity due to its processing speed, simplicity, cross-platform, functionality and distribution of source codes under its own license.
https://www.php.net/
CSS (Cascading Style Sheets) is a formal language for describing the appearance of a document written using a markup language.
It is mainly used as a means of describing, decorating the appearance of web pages written using HTML and XHTML markup languages, but can also be applied to any XML documents, such as SVG or XUL.
https://www.w3.org/TR/CSS/#css
HTML (English "hyper text markup language" - hypertext markup language) is a special markup language that is used to create sites on the Internet.
Browsers understand html perfectly and can interpret it in an understandable way. In general, any page on the site is html-code, which the browser translates into a user-friendly form. By the way, the code of any page is available to everyone.
https://www.w3.org/html/
Welcome to the Q&A site for web developers. Here you can ask a question about the problem you are facing and get answers from other experts. We have created a user-friendly interface so that you can quickly and free of charge ask a question about a web programming problem. We also invite other experts to join our community and help other members who ask questions. In addition, you can use our search for questions with a solution.
Ask about the real problem you are facing. Describe in detail what you are doing and what you want to achieve.
Our goal is to create a strong community in which everyone will support each other. If you find a question and know the answer to it, help others with your knowledge.