GRAYBYTE WORDPRESS FILE MANAGER6689

Server IP : 68.65.123.43 / Your IP : 216.73.216.162
System : Linux server266.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
PHP Version : 8.0.30
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /home/inteuuod/public_html/wp-content/plugins/userswp/widgets/
Upload Files :
Current_dir [ Writeable ] Document_root [ Writeable ]

Command :


Current File : /home/inteuuod/public_html/wp-content/plugins/userswp/widgets//user-cover.php
<?php
if ( ! defined( 'ABSPATH' ) ) {
    exit;
}

/**
 * UsersWP user cover widget.
 *
 * @since 1.1.2
 */
class UWP_User_Cover_Widget extends WP_Super_Duper {

    /**
     * Register the user cover widget with WordPress.
     *
     */
    public function __construct() {


        $options = array(
            'textdomain'    => 'userswp',
            'block-icon'    => 'admin-site',
            'block-category'=> 'widgets',
            'block-keywords'=> "['userswp','profile']",
            'class_name'     => __CLASS__,
            'base_id'       => 'uwp_user_cover',
            'name'          => __('UWP > User Cover Image','userswp'),
            //'no_wrap'       => true,
            'block-wrap'    => '',
            'widget_ops'    => array(
                'classname'   => 'uwp-user-cover bsui',
                'description' => esc_html__('Displays user cover image for user.','userswp'),
            ),
            'arguments'     => array(
	            'link'  => array(
		            'title' => __("Link to profile?:", 'userswp'),
		            'desc' => __('Link cover image to user\'s profile page.', 'userswp'),
		            'type' => 'checkbox',
		            'desc_tip' => true,
		            'value'  => '1',
		            'default'  => '0',
		            'advanced' => true
	            ),
	            'allow_change'  => array(
		            'title' => __('Allow to change cover:', 'userswp'),
		            'desc' => __('Allow user to change cover image in profile page.', 'userswp'),
		            'type' => 'checkbox',
		            'desc_tip' => true,
		            'value'  => '1',
		            'default'  => 0,
		            'advanced' => true
	            ),
	            'user_id'  => array(
		            'title' => __('User ID:', 'userswp'),
		            'desc' => __('Leave blank to use current user ID or use post_author for current post author ID. For profile page it will take displayed user ID. Input specific user ID for other pages.', 'userswp'),
		            'type' => 'text',
		            'desc_tip' => true,
		            'default'  => '',
		            'advanced' => true
	            ),
            )

        );

	    parent::__construct( $options );
    }

	/**
	 * The Super block output function.
	 *
	 * @param array $args
	 * @param array $widget_args
	 * @param string $content
	 *
	 * @return mixed|string|bool
	 */
	public function output( $args = array(), $widget_args = array(), $content = '' ) {

		global $post;

		$defaults = array(
			'link'      => 0,
			'allow_change' => 0,
		);

		$args = wp_parse_args( $args, $defaults );

		$args['link'] = 1 == $args['link'] ? 1 : 0;
		$args['allow_change'] = !empty($args['allow_change']) ? $args['allow_change'] : 0;

		if('post_author' == $args['user_id'] && $post instanceof WP_Post){
			$user = get_userdata($post->post_author);
			$args['user_id'] = $post->post_author;
		} else if(isset($args['user_id']) && (int)$args['user_id'] > 0){
			$user = get_userdata($args['user_id']);
		} else {
			$user = uwp_get_displayed_user();
		}

		if(empty($args['user_id']) && !empty($user->ID)){
			$args['user_id'] = $user->ID;
		}

		if(!$user){
			return '';
		}

		wp_enqueue_script( 'jcrop', array( 'jquery' ) );
		wp_enqueue_script( 'jquery-ui-progressbar', array( 'jquery' ) );
		wp_enqueue_style( 'jcrop' );
		wp_enqueue_style( 'jquery-ui' );

		ob_start();

		add_filter( 'upload_dir', 'uwp_handle_multisite_profile_image', 10, 1 );
		$uploads = wp_upload_dir();
		remove_filter( 'upload_dir', 'uwp_handle_multisite_profile_image' );
		$upload_url = $uploads['baseurl'];

		$banner = uwp_get_usermeta($user->ID, 'banner_thumb', '');
		if (empty($banner)) {
			$banner = uwp_get_default_banner_uri();
		} else {
			$banner = $upload_url.$banner;
		}

		$args['banner_url'] = $banner;

		$design_style = !empty($args['design_style']) ? esc_attr($args['design_style']) : uwp_get_option("design_style",'bootstrap');
		$template = $design_style ? $design_style."/user-cover.php" : "user-cover.php";

		uwp_get_template($template, $args);

		return ob_get_clean();

	}

}

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
July 10 2025 04:32:23
inteuuod / inteuuod
0755
.htaccess
0.41 KB
July 10 2025 04:32:23
inteuuod / inteuuod
0644
account.php
3.679 KB
August 11 2020 15:42:14
inteuuod / inteuuod
0644
authorbox.php
7.871 KB
February 04 2025 23:32:52
inteuuod / inteuuod
0644
button-group.php
5.444 KB
April 28 2022 17:18:48
inteuuod / inteuuod
0644
change.php
3.71 KB
September 22 2021 17:04:04
inteuuod / inteuuod
0644
forgot.php
3.684 KB
September 22 2021 17:04:04
inteuuod / inteuuod
0644
login.php
7.884 KB
September 22 2021 17:04:04
inteuuod / inteuuod
0644
output-location.php
2.602 KB
September 22 2021 17:04:04
inteuuod / inteuuod
0644
profile-actions.php
1.735 KB
October 30 2019 18:46:22
inteuuod / inteuuod
0644
profile-header.php
5.928 KB
November 04 2021 10:28:08
inteuuod / inteuuod
0644
profile-section.php
3.427 KB
August 11 2020 15:42:14
inteuuod / inteuuod
0644
profile-social.php
2.062 KB
September 22 2021 17:04:04
inteuuod / inteuuod
0644
profile-tabs.php
6.597 KB
November 04 2021 10:28:08
inteuuod / inteuuod
0644
profile.php
2.304 KB
November 04 2021 10:28:08
inteuuod / inteuuod
0644
register.php
4.284 KB
February 04 2025 23:32:52
inteuuod / inteuuod
0644
reset.php
3.28 KB
June 21 2022 14:28:20
inteuuod / inteuuod
0644
user-actions.php
1.784 KB
May 30 2020 12:36:16
inteuuod / inteuuod
0644
user-avatar.php
4.309 KB
March 15 2023 16:33:38
inteuuod / inteuuod
0644
user-badge.php
10.726 KB
January 09 2025 21:52:58
inteuuod / inteuuod
0644
user-cover.php
3.991 KB
September 06 2021 15:30:56
inteuuod / inteuuod
0644
user-meta.php
7.332 KB
January 09 2025 21:52:58
inteuuod / inteuuod
0644
user-post-counts.php
4.469 KB
June 25 2024 02:23:32
inteuuod / inteuuod
0644
user-title.php
2.68 KB
March 14 2024 20:54:16
inteuuod / inteuuod
0644
users-item.php
1.725 KB
September 22 2021 17:04:04
inteuuod / inteuuod
0644
users-loop-actions.php
1.484 KB
September 22 2021 17:04:04
inteuuod / inteuuod
0644
users-loop.php
2.605 KB
September 22 2021 17:04:04
inteuuod / inteuuod
0644
users-search.php
1.919 KB
September 22 2021 17:04:04
inteuuod / inteuuod
0644
users.php
2.684 KB
September 22 2021 17:04:04
inteuuod / inteuuod
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF