fotoğraf da görüldüğü üzere üstdeki giriş bloğunun başlığını aşağıdaki blokdaki gibi yapmak istiyorum ama başlığı bir türlü
içerisine alamadım.
İlgili dosyanın php kodları;
/**
* BuddyPress Core Login Widget.
*
* @package BuddyPress
* @subpackage Core
* @since 1.9.0
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
/**
* BuddyPress Login Widget.
*
* @since 1.9.0
*/
class BP_Core_Login_Widget extends WP_Widget {
/**
* Constructor method.
*
* @since 1.9.0
*/
public function __construct() {
parent::__construct(
false,
_x( '(BuddyPress) Log In', 'Title of the login widget', 'buddypress' ),
array(
'description' => __( 'Show a Log In form to logged-out visitors, and a Log Out link to those who are logged in.', 'buddypress' ),
'classname' => 'widget_bp_core_login_widget buddypress widget',
'customize_selective_refresh' => true,
)
);
}
/**
* Display the login widget.
*
* @since 1.9.0
*
* @see WP_Widget::widget() for description of parameters.
*
* @param array $args Widget arguments.
* @param array $instance Widget settings, as saved by the user.
*/
public function widget( $args, $instance ) {
$title = isset( $instance['title'] ) ? $instance['title'] : '';
/**
* Filters the title of the Login widget.
*
* @since 1.9.0
* @since 2.3.0 Added 'instance' and 'id_base' to arguments passed to filter.
*
* @param string $title The widget title.
* @param array $instance The settings for the particular instance of the widget.
* @param string $id_base Root ID for all widgets of this type.
*/
$title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
echo $args['before_widget'];
echo $args['before_title'] . esc_html( $title ) . $args['after_title']; ?>
/**
* Fires before the display of widget content if logged in.
*
* @since 1.9.0
*/
do_action( 'bp_before_login_widget_loggedin' ); ?>
/**
* Fires after the display of widget content if logged in.
*
* @since 1.9.0
*/
do_action( 'bp_after_login_widget_loggedin' ); ?>
/**
* Fires before the display of widget content if logged out.
*
* @since 1.9.0
*/
do_action( 'bp_before_login_widget_loggedout' ); ?>
/**
* Fires after the display of widget content if logged out.
*
* @since 1.9.0
*/
do_action( 'bp_after_login_widget_loggedout' ); ?>
echo $args['after_widget'];
}
/**
* Update the login widget options.
*
* @since 1.9.0
*
* @param array $new_instance The new instance options.
* @param array $old_instance The old instance options.
* @return array $instance The parsed options to be saved.
*/
public function update( $new_instance, $old_instance ) {
$instance = $old_instance;
$instance['title'] = isset( $new_instance['title'] ) ? strip_tags( $new_instance['title'] ) : '';
return $instance;
}
/**
* Output the login widget options form.
*
* @since 1.9.0
*
* @param array $instance Settings for this widget.
* @return void
*/
public function form( $instance = array() ) {
$settings = wp_parse_args( $instance, array(
'title' => '',
) ); ?>
}
}