I'm trying to understand an error so I know how to start fixing it. This is the full error and I find it a bit overwhelming. I'm sorry to post so much code, but the specific question is, how do I narrow down what the fault is?
Is saying there is a call to an undefined function, so is it saying it cant find the function even though I have included the file the function is in?
Fatal error: Uncaught Error: Call to undefined function
wp_login_form1() in /home/yyyy/public_html/wp-
content/plugins/download/main.php:220 Stack trace: #0
/home/yyy/public_html/wp-includes/shortcodes.php(319): download_area('',
'', 'download...') #1 [internal function]: do_shortcode_tag(Array) #2
/home/yyy/public_html/wp-includes/shortcodes.php(197):
preg_replace_callback('/\\[(\\[?)(client...', 'do_shortcode_ta...',
'[downloa...') ....
The reference on main.php at line 220:
function download_area()
{
global $client_path;
include('client_form.php');
return wp_login_form1(array ('echo' => false));
}
and then my wp_login_form1 function within my file client_form.php is:
function wp_login_form1( $args = array() ) {
$defaults = array( 'echo' => true,
'form_id' => 'clientform',
'label_username' => __( 'Postcode' ),
'label_password' => __( 'Password' ),
'label_log_in' => __( 'Log In' ),
'username' => 'user_login',
'password' => 'user_pass',
'submit' => 'wp-submit',
'value_username' => '',
);
$args = wp_parse_args( $args, apply_filters( 'login_form_defaults', $defaults ) );
$form = '
<form name="' . $args['form_id'] . '" id="' . $args['form_id'] . '" action="" method="post">
' . apply_filters( 'login_form_top', '', $args ) . '
<p class="input">
<label for="' . esc_attr( $args['username'] ) . '">' . esc_html( $args['label_username'] ) . '</label>
<input type="text" name="username" id="' . esc_attr( $args['username'] ) . '" class="input" value="" size="20" tabindex="10" />
</p>
<p class="input">
<label for="' . esc_attr( $args['password'] ) . '">' . esc_html( $args['label_password'] ) . '</label>
<input type="password" name="password" id="' . esc_attr( $args['password'] ) . '" class="input" value="" size="20" tabindex="20" />
</p>
<p class="submit">
<input type="submit" name="wp-submit" id="' . esc_attr( $args['wp-submit'] ) . '" class="wp-submit" value="' . esc_attr( $args['label_log_in'] ) . '" tabindex="100" />
</p>
' . apply_filters( 'login_form_bottom', '', $args ) . '
</form>';
if ( $args['echo'] )
echo $form;
else
return $form;
}