MOON
Server: Apache
System: Linux server.netcommlabs.in 3.10.0-1160.83.1.el7.x86_64 #1 SMP Wed Jan 25 16:41:43 UTC 2023 x86_64
User: dermova (1051)
PHP: 5.4.45
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/dermova/public_html/india/wp-content/plugins/wptouch/admin/settings/include/color.php
<?php

global $wptouch_desktop_theme_colors;

function wptouch_get_desktop_theme_colors() {
	global $wptouch_desktop_theme_colors;

	if ( $wptouch_desktop_theme_colors ) {
		return $wptouch_desktop_theme_colors;
	}

	global $wptouch_pro;
	$desktop_colors = array();

	$name = get_option( 'template' );  

	$style_file = $wptouch_pro->load_file( WP_CONTENT_DIR . '/themes/' . $name . '/style.css' );

	$result = preg_match_all( '!color: (.*);!U', $style_file, $matches );
	if ( $result ) {
		foreach( $matches[1] as $color ) {
			if ( !in_array( $color, $desktop_colors ) ) {
				
				if ( stripos( $color, '#' ) !== false ) {
					$desktop_colors[] = $color;					
				}
			}
		}
	}		

	$wptouch_desktop_theme_colors = $desktop_colors;

	return $desktop_colors;
}

require_once( 'text.php' );