HEX
Server: Apache/2.4.57 (Debian)
System: Linux web-server-k8s-e92jnr3j-6f99bff6b6-rp2wg 6.1.0-22-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.94-1 (2024-06-21) x86_64
User: apache (48)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: /var/www/sites/1250.info/wp-content/plugins/nm-custom-code/includes/shortcodes/social-profiles.php
<?php
	
	// Shortcode: nm_social_profiles
	function nm_shortcode_social_profiles( $atts, $content = NULL ) {
		extract( shortcode_atts( array(
			'social_profile_facebook'	    => '',
			'social_profile_instagram'	    => '',
			'social_profile_twitter'	    => '',
            'social_profile_flickr'         => '',
            'social_profile_linkedin'	    => '',
			'social_profile_pinterest'	    => '',
			'social_profile_rss'		    => '',
            'social_profile_snapchat'       => '',
            'social_profile_behance'        => '',
            'social_profile_dribbble'       => '',
            'social_profile_line'           => '',
            'social_profile_mixcloud'       => '',
            'social_profile_odnoklassniki'  => '',
            'social_profile_soundcloud'     => '',
            'social_profile_telegram'       => '',
            'social_profile_tiktok'		    => '',
            'social_profile_tumblr'		    => '',
			'social_profile_vimeo'		    => '',
            'social_profile_vk'             => '',
            'social_profile_weibo'          => '',
            'social_profile_whatsapp'       => '',
            'social_profile_youtube'	    => '',
            'social_profile_email'          => '',
			'icon_size'					    => 'medium',
			'alignment'					    => 'center'
		), $atts ) );
		
		$social_profiles = array(
			'facebook'		=> array( 'title' => 'Facebook', 'url' => $social_profile_facebook ),
			'instagram'		=> array( 'title' => 'Instagram', 'url' => $social_profile_instagram ),
			'twitter'		=> array( 'title' => 'Twitter', 'url' => $social_profile_twitter ),
            'flickr'		=> array( 'title' => 'Flickr', 'url' => $social_profile_flickr ),
            'linkedin'		=> array( 'title' => 'LinkedIn', 'url' => $social_profile_linkedin ),
			'pinterest'		=> array( 'title' => 'Pinterest', 'url' => $social_profile_pinterest ),
			'rss-square'	=> array( 'title' => 'RSS', 'url' => $social_profile_rss ),
            'snapchat'      => array( 'title' => 'Snapchat', 'url' => $social_profile_snapchat ),
            'behance'		=> array( 'title' => 'Behance', 'url' => $social_profile_behance ),
            'dribbble'		=> array( 'title' => 'Dribbble', 'url' => $social_profile_dribbble ),
            'line-app'      => array( 'title' => 'LINE', 'url' => $social_profile_line ),
            'mixcloud'      => array( 'title' => 'MixCloud', 'url' => $social_profile_mixcloud ),
            'odnoklassniki' => array( 'title' => 'OK.RU', 'url' => $social_profile_odnoklassniki ),
            'soundcloud'    => array( 'title' => 'SoundCloud', 'url' => $social_profile_soundcloud ),
            'telegram'	    => array( 'title' => 'Telegram', 'url' => $social_profile_telegram ),
            'tiktok'		=> array( 'title' => 'TikTok', 'url' => $social_profile_tiktok ),
            'tumblr'		=> array( 'title' => 'Tumblr', 'url' => $social_profile_tumblr ),
			'vimeo-square'	=> array( 'title' => 'Vimeo', 'url' => $social_profile_vimeo ),
            'vk'			=> array( 'title' => 'VK', 'url' => $social_profile_vk ),
            'weibo'			=> array( 'title' => 'Weibo', 'url' => $social_profile_weibo ),
            'whatsapp'		=> array( 'title' => 'WhatsApp', 'url' => $social_profile_whatsapp ),
            'youtube'		=> array( 'title' => 'YouTube', 'url' => $social_profile_youtube ),
            'envelope'      => array( 'title' => 'Email', 'url' => $social_profile_email )
		);
		
		$output = '';
		foreach ( $social_profiles as $service => $details ) {
            if ( $details['url'] !== '' ) {
                if ( $service == 'envelope' ) {
                    $details['url'] = 'mailto:' . $details['url'];
                }
                
                $output .= '<li><a href="' . esc_url( $details['url'] ) . '" target="_blank" title="' . esc_attr( $details['title'] ) . '" class="dark"><i class="nm-font nm-font-' . esc_attr( $service ) . '"></i></a></li>';
			}
		}
		
		return '<ul class="nm-social-profiles icon-size-' . esc_attr( $icon_size ) . ' align-' . esc_attr( $alignment ) . '">' . $output . '</ul>';
	}
	
	add_shortcode( 'nm_social_profiles', 'nm_shortcode_social_profiles' );