Vergleich admin/inc/functions_themes.php - 1.8.2 - 1.8.22

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 220Zeile 220
	else
{
$db->delete_query("themestylesheets", "tid='{$options['tid']}'");

	else
{
$db->delete_query("themestylesheets", "tid='{$options['tid']}'");

		$db->update_query("themes", array("properties" => $db->escape_string(serialize($properties))), "tid='{$options['tid']}'");

		$db->update_query("themes", array("properties" => $db->escape_string(my_serialize($properties))), "tid='{$options['tid']}'");

		$theme_id = $options['tid'];
}


		$theme_id = $options['tid'];
}


Zeile 262Zeile 262
		$loop = 1;
foreach($theme['stylesheets']['stylesheet'] as $stylesheet)
{

		$loop = 1;
foreach($theme['stylesheets']['stylesheet'] as $stylesheet)
{

 
			$stylesheet['attributes']['name'] = my_substr($stylesheet['attributes']['name'], 0, 30);


			if(substr($stylesheet['attributes']['name'], -4) != ".css")

			if(substr($stylesheet['attributes']['name'], -4) != ".css")

			{

			{

				continue;

				continue;

			}


			}


			if(empty($stylesheet['attributes']['lastmodified']))

			if(empty($stylesheet['attributes']['lastmodified']))

			{

			{

				$stylesheet['attributes']['lastmodified'] = TIME_NOW;

				$stylesheet['attributes']['lastmodified'] = TIME_NOW;

			}

			}


if(empty($stylesheet['attributes']['disporder']))
{
$stylesheet['attributes']['disporder'] = $loop;


if(empty($stylesheet['attributes']['disporder']))
{
$stylesheet['attributes']['disporder'] = $loop;

			}

			}


if(empty($stylesheet['attributes']['attachedto']))
{


if(empty($stylesheet['attributes']['attachedto']))
{

Zeile 304Zeile 306
			if(!$attachedto)
{
$attachedto = "global";

			if(!$attachedto)
{
$attachedto = "global";

			}

			}


// private.php?compose,folders|usercp.php,global|global
$attachedto = explode("|", $attachedto);


// private.php?compose,folders|usercp.php,global|global
$attachedto = explode("|", $attachedto);

Zeile 327Zeile 329
		}
// Now we have our list of built stylesheets, save them
$updated_theme = array(

		}
// Now we have our list of built stylesheets, save them
$updated_theme = array(

			"stylesheets" => $db->escape_string(serialize($theme_stylesheets))

			"stylesheets" => $db->escape_string(my_serialize($theme_stylesheets))

		);


		);


		if(is_array($properties['disporder']))
{
asort($properties['disporder'], SORT_NUMERIC);

// Because inherited stylesheets can mess this up
$loop = 1;
$orders = array();
foreach($properties['disporder'] as $filename => $order)
{
$orders[$filename] = $loop;
++$loop;
}

$properties['disporder'] = $orders;
$updated_theme['properties'] = $db->escape_string(serialize($properties));
}

		$db->update_query("themes", $updated_theme, "tid='{$theme_id}'");
}



















		$db->update_query("themes", $updated_theme, "tid='{$theme_id}'");
}

update_theme_stylesheet_list($theme_id);

	update_theme_stylesheet_list($theme_id);





// And done?
return $theme_id;


// And done?
return $theme_id;

Zeile 388Zeile 373
{
global $mybb;


{
global $mybb;


	$filename = str_replace('/', '', $filename);

	$filename = basename($filename);

	$tid = (int) $tid;
$theme_directory = "cache/themes/theme{$tid}";

	$tid = (int) $tid;
$theme_directory = "cache/themes/theme{$tid}";

 

if(substr($filename, -4) != ".css")
{
return false;
}


// If we're in safe mode save to the main theme folder by default
if($mybb->safemode)


// If we're in safe mode save to the main theme folder by default
if($mybb->safemode)

Zeile 420Zeile 410
		"theme" => $theme_directory
);
$stylesheet = parse_theme_variables($stylesheet, $theme_vars);

		"theme" => $theme_directory
);
$stylesheet = parse_theme_variables($stylesheet, $theme_vars);

	$stylesheet = preg_replace_callback("#url\((\"|'|)(.*)\\1\)#", create_function('$matches', 'return fix_css_urls($matches[2]);'), $stylesheet);

	$stylesheet = preg_replace_callback("#url\((\"|'|)([^\"'\s]*?)\\1\)#", 'fix_css_urls_callback', $stylesheet);


$fp = @fopen(MYBB_ROOT . "{$theme_directory}/{$filename}", "wb");
if(!$fp)


$fp = @fopen(MYBB_ROOT . "{$theme_directory}/{$filename}", "wb");
if(!$fp)

Zeile 441Zeile 431
	@fwrite($fp_min, $stylesheet_min);
@fclose($fp_min);


	@fwrite($fp_min, $stylesheet_min);
@fclose($fp_min);


	if($mybb->settings['usecdn'] && !empty($mybb->settings['cdnpath']))
{
$cdn_path = rtrim($mybb->settings['cdnpath'], '/\\');
$cache_themes_dir = $cdn_path . '/' . $theme_directory;

$copy_to_cdn = true;

if(!is_dir($cache_themes_dir))
{
if(!@mkdir($cache_themes_dir))
{
$copy_to_cdn = false;
}
}

if($copy_to_cdn)
{
@copy(MYBB_ROOT . "{$theme_directory}/{$filename}", "{$cache_themes_dir}/{$filename}");
@copy(MYBB_ROOT . "{$theme_directory}/{$filename_min}", "{$cache_themes_dir}/{$filename_min}");
}
}

	copy_file_to_cdn(MYBB_ROOT . "{$theme_directory}/{$filename}");
copy_file_to_cdn(MYBB_ROOT . "{$theme_directory}/{$filename_min}");





















return "{$theme_directory}/{$filename}";
}


return "{$theme_directory}/{$filename}";
}

Zeile 472Zeile 443
 *
* @param $stylesheet string The stylesheet in it's untouched form.
* @return string The minified stylesheet

 *
* @param $stylesheet string The stylesheet in it's untouched form.
* @return string The minified stylesheet

 */

 */

function minify_stylesheet($stylesheet)
{
// Remove comments.

function minify_stylesheet($stylesheet)
{
// Remove comments.

Zeile 487Zeile 458
	return $stylesheet;
}


	return $stylesheet;
}


 
/**
* @param array $stylesheet
*
* @return bool
*/

function resync_stylesheet($stylesheet)
{
global $db;

// Try and fix any missing cache file names
if(!$stylesheet['cachefile'] && $stylesheet['name'])

function resync_stylesheet($stylesheet)
{
global $db;

// Try and fix any missing cache file names
if(!$stylesheet['cachefile'] && $stylesheet['name'])

	{

	{

		$stylesheet['cachefile'] = $stylesheet['name'];
$db->update_query("themestylesheets", array('cachefile' => $db->escape_string($stylesheet['name'])), "sid='{$stylesheet['sid']}'");
}

		$stylesheet['cachefile'] = $stylesheet['name'];
$db->update_query("themestylesheets", array('cachefile' => $db->escape_string($stylesheet['name'])), "sid='{$stylesheet['sid']}'");
}

Zeile 524Zeile 500
	return false;
}


	return false;
}


 
/**
* @deprecated
* @param string $url
*
* @return string
*/

function fix_css_urls($url)

function fix_css_urls($url)

{

{

	if(!preg_match("#^([a-z0-9]+\:|/)#i", $url) && strpos($url, "../../../") === false)

	if(!preg_match("#^([a-z0-9]+\:|/)#i", $url) && strpos($url, "../../../") === false)

	{

	{

		return "url(../../../{$url})";

		return "url(../../../{$url})";

	}

	}

	else
{
return "url({$url})";
}
}


	else
{
return "url({$url})";
}
}


 
/**
* @param array $matches Matches.
*
* @return string
*/
function fix_css_urls_callback($matches)
{
return fix_css_urls($matches[2]);
}

/**
* @deprecated
* @param string $url
*
* @return string
*/

function unfix_css_urls($url)
{
return str_replace("../../../", "", $url);

function unfix_css_urls($url)
{
return str_replace("../../../", "", $url);

Zeile 569Zeile 567
	{
$query = $db->simple_select("themes", "*", "tid='".(int)$parent."'");
$parent_theme = $db->fetch_array($query);

	{
$query = $db->simple_select("themes", "*", "tid='".(int)$parent."'");
$parent_theme = $db->fetch_array($query);

		if(count($properties) == 0 || !is_array($properties))

		if(!is_array($properties) || count($properties) == 0)

		{
$parent_properties = my_unserialize($parent_theme['properties']);
if(!empty($parent_properties))

		{
$parent_properties = my_unserialize($parent_theme['properties']);
if(!empty($parent_properties))

Zeile 632Zeile 630
		);
$properties['logo'] = parse_theme_variables($properties['logo'], $theme_vars);
}

		);
$properties['logo'] = parse_theme_variables($properties['logo'], $theme_vars);
}

 
	
$updated_theme = array();

	if(!empty($stylesheets))
{

	if(!empty($stylesheets))
{

		$updated_theme['stylesheets'] = $db->escape_string(serialize($stylesheets));

		$updated_theme['stylesheets'] = $db->escape_string(my_serialize($stylesheets));

	}

	}

	$updated_theme['properties'] = $db->escape_string(serialize($properties));

	$updated_theme['properties'] = $db->escape_string(my_serialize($properties));


if(count($updated_theme) > 0)
{


if(count($updated_theme) > 0)
{

Zeile 705Zeile 705
	return $parsed_css;
}


	return $parsed_css;
}


function get_selectors_as_options($css, $selected_item="")







/**
* @param array|string $css
* @param int $selected_item
*
* @return string
*/
function get_selectors_as_options($css, $selected_item=null)

{
$select = "";


{
$select = "";


Zeile 741Zeile 747
	return $select;
}


	return $select;
}


 
/**
* @param array $a
* @param array $b
*
* @return int
*/

function css_selectors_sort_cmp($a, $b)
{
if(!$a['name'])

function css_selectors_sort_cmp($a, $b)
{
if(!$a['name'])

	{

	{

		$a['name'] = $a['class_name'];

		$a['name'] = $a['class_name'];

	}

	}


if(!$b['name'])
{
$b['name'] = $b['class_name'];
}
return strcmp($a['name'], $b['name']);


if(!$b['name'])
{
$b['name'] = $b['class_name'];
}
return strcmp($a['name'], $b['name']);

}








}

/**
* @param array|string $css
* @param string $id
*
* @return array|bool
*/

function get_css_properties($css, $id)
{
if(!is_array($css))

function get_css_properties($css, $id)
{
if(!is_array($css))

Zeile 832Zeile 850
	foreach($new_css as $css_line)
{
$generated_css .= "\t".trim($css_line)."\n";

	foreach($new_css as $css_line)
{
$generated_css .= "\t".trim($css_line)."\n";

	}

$parsed_css = array();


	}

$parsed_css = array();


	// Parse out the CSS
if($css)
{

	// Parse out the CSS
if($css)
{

Zeile 899Zeile 917
	return $css;
}


	return $css;
}


 
/**
* @param array $stylesheet
* @param int $tid
*
* @return bool|int
*/

function copy_stylesheet_to_theme($stylesheet, $tid)
{
global $db;

function copy_stylesheet_to_theme($stylesheet, $tid)
{
global $db;

Zeile 920Zeile 944
	return $sid;
}


	return $sid;
}


 
/**
* @param int $tid
* @param bool|array $theme
* @param bool $update_disporders
*
* @return bool
*/

function update_theme_stylesheet_list($tid, $theme = false, $update_disporders = true)
{

function update_theme_stylesheet_list($tid, $theme = false, $update_disporders = true)
{

	global $db, $cache;

	global $mybb, $db, $cache, $plugins;


$stylesheets = array();



$stylesheets = array();


Zeile 939Zeile 970
	// Get our list of stylesheets
$query = $db->simple_select("themestylesheets", "*", "tid IN ({$tid_list})", array('order_by' => 'tid', 'order_dir' => 'desc'));
while($stylesheet = $db->fetch_array($query))

	// Get our list of stylesheets
$query = $db->simple_select("themestylesheets", "*", "tid IN ({$tid_list})", array('order_by' => 'tid', 'order_dir' => 'desc'));
while($stylesheet = $db->fetch_array($query))

	{

	{

		if(empty($stylesheets[$stylesheet['name']]))
{
if($stylesheet['tid'] != $tid)

		if(empty($stylesheets[$stylesheet['name']]))
{
if($stylesheet['tid'] != $tid)

Zeile 965Zeile 996
				$cdnpath = rtrim($mybb->settings['cdnpath'], '/\\').'/';
if(file_exists($cdnpath."cache/themes/theme{$theme_id}/{$stylesheet['name']}") && filemtime(
$cdnpath."cache/themes/theme{$theme_id}/{$stylesheet['name']}"

				$cdnpath = rtrim($mybb->settings['cdnpath'], '/\\').'/';
if(file_exists($cdnpath."cache/themes/theme{$theme_id}/{$stylesheet['name']}") && filemtime(
$cdnpath."cache/themes/theme{$theme_id}/{$stylesheet['name']}"

					) >= $stylesheet['lastmodified']
)
{
$css_url = "cache/themes/theme{$theme_id}/{$stylesheet['name']}";
break;
}
}
else
{

					) >= $stylesheet['lastmodified']
)
{
$css_url = "cache/themes/theme{$theme_id}/{$stylesheet['name']}";
break;
}
}
else
{

				if(file_exists(MYBB_ROOT."cache/themes/theme{$theme_id}/{$stylesheet['name']}") && filemtime(
MYBB_ROOT."cache/themes/theme{$theme_id}/{$stylesheet['name']}"
) >= $stylesheet['lastmodified']

				if(file_exists(MYBB_ROOT."cache/themes/theme{$theme_id}/{$stylesheet['name']}") && filemtime(
MYBB_ROOT."cache/themes/theme{$theme_id}/{$stylesheet['name']}"
) >= $stylesheet['lastmodified']

Zeile 983Zeile 1014
					break;
}
}

					break;
}
}

 
		}

if(is_object($plugins))
{
$plugins->run_hooks('update_theme_stylesheet_list_set_css_url', $css_url);

		}

$attachedto = $stylesheet['attachedto'];

		}

$attachedto = $stylesheet['attachedto'];

Zeile 1008Zeile 1044
			}

foreach($attached_actions as $action)

			}

foreach($attached_actions as $action)

			{

			{

				$theme_stylesheets[$attached_file][$action][] = $css_url;

if(!empty($stylesheet['inherited']))

				$theme_stylesheets[$attached_file][$action][] = $css_url;

if(!empty($stylesheet['inherited']))

Zeile 1021Zeile 1057

// Now we have our list of built stylesheets, save them
$updated_theme = array(


// Now we have our list of built stylesheets, save them
$updated_theme = array(

		"stylesheets" => $db->escape_string(serialize($theme_stylesheets))

		"stylesheets" => $db->escape_string(my_serialize($theme_stylesheets))

	);

// Do we have a theme present? If so, update the stylesheet display orders
if($update_disporders)

	);

// Do we have a theme present? If so, update the stylesheet display orders
if($update_disporders)

	{

	{

		if(!is_array($theme) || !$theme)
{
$theme_cache = cache_themes();

		if(!is_array($theme) || !$theme)
{
$theme_cache = cache_themes();

Zeile 1060Zeile 1096
		}

if(!empty($orphaned_stylesheets))

		}

if(!empty($orphaned_stylesheets))

		{

		{

			$loop = $max_disporder + 1;
$max_disporder = $loop;
foreach($orphaned_stylesheets as $stylesheet)

			$loop = $max_disporder + 1;
$max_disporder = $loop;
foreach($orphaned_stylesheets as $stylesheet)

Zeile 1069Zeile 1105
				++$loop;
}
}

				++$loop;
}
}





		asort($orders);
$properties['disporder'] = $orders;

		asort($orders);
$properties['disporder'] = $orders;

		$updated_theme['properties'] = $db->escape_string(serialize($properties));

		$updated_theme['properties'] = $db->escape_string(my_serialize($properties));

	}

	}





	$db->update_query("themes", $updated_theme, "tid = '{$tid}'");

// Do we have any children themes that need updating too?

	$db->update_query("themes", $updated_theme, "tid = '{$tid}'");

// Do we have any children themes that need updating too?

	if(count($child_list) > 0)
{

	if(is_array($child_list) && count($child_list) > 0)
{

		foreach($child_list as $id)
{
update_theme_stylesheet_list($id, false, $update_disporders);
}
}

		foreach($child_list as $id)
{
update_theme_stylesheet_list($id, false, $update_disporders);
}
}





	$cache->update_default_theme();

return true;
}


	$cache->update_default_theme();

return true;
}


 
/**
* @param int $tid
*
* @return array|bool
*/

function make_parent_theme_list($tid)
{
static $themes_by_parent;

function make_parent_theme_list($tid)
{
static $themes_by_parent;

Zeile 1111Zeile 1152
	}

if(!isset($themes_by_parent[$tid]) || !is_array($themes_by_parent[$tid]))

	}

if(!isset($themes_by_parent[$tid]) || !is_array($themes_by_parent[$tid]))

	{
return false;
}

	{
return false;
}


reset($themes_by_parent);


reset($themes_by_parent);

	reset($themes_by_parent[$tid]);

$themes = array();

	reset($themes_by_parent[$tid]);

$themes = array();


foreach($themes_by_parent[$tid] as $key => $theme)
{


foreach($themes_by_parent[$tid] as $key => $theme)
{

Zeile 1128Zeile 1169
		if(is_array($parents))
{
$themes = array_merge($themes, $parents);

		if(is_array($parents))
{
$themes = array_merge($themes, $parents);

		}
}

return $themes;

		}
}

return $themes;

}


}


 
/**
* @param int $tid
*
* @return array|null
*/

function make_child_theme_list($tid)
{
static $themes_by_child;

function make_child_theme_list($tid)
{
static $themes_by_child;

Zeile 1143Zeile 1189
	{
$theme_cache = cache_themes();
foreach($theme_cache as $key => $theme)

	{
$theme_cache = cache_themes();
foreach($theme_cache as $key => $theme)

		{
if($key == "default")
{
continue;
}


		{
if($key == "default")
{
continue;
}


			$themes_by_child[$theme['pid']][$theme['tid']] = $theme;
}
}

			$themes_by_child[$theme['pid']][$theme['tid']] = $theme;
}
}

Zeile 1174Zeile 1220
	return $themes;
}


	return $themes;
}


 
/**
* @return array
*/

function cache_themes()
{
global $db, $theme_cache;

function cache_themes()
{
global $db, $theme_cache;

Zeile 1182Zeile 1231
	{
$query = $db->simple_select("themes", "*", "", array('order_by' => "pid, name"));
while($theme = $db->fetch_array($query))

	{
$query = $db->simple_select("themes", "*", "", array('order_by' => "pid, name"));
while($theme = $db->fetch_array($query))

		{

		{

			$theme['properties'] = my_unserialize($theme['properties']);
$theme['stylesheets'] = my_unserialize($theme['stylesheets']);
$theme_cache[$theme['tid']] = $theme;

			$theme['properties'] = my_unserialize($theme['properties']);
$theme['stylesheets'] = my_unserialize($theme['stylesheets']);
$theme_cache[$theme['tid']] = $theme;

Zeile 1192Zeile 1241
				$theme_cache['default'] = $theme['tid'];
}
}

				$theme_cache['default'] = $theme['tid'];
}
}

	}


	}


	// Do we have no themes assigned as default?
if(empty($theme_cache['default']))
{
$theme_cache['default'] = 1;

	// Do we have no themes assigned as default?
if(empty($theme_cache['default']))
{
$theme_cache['default'] = 1;

	}


	}


	return $theme_cache;
}


	return $theme_cache;
}


 
/**
* @param int $parent
* @param int $depth
*/

function build_theme_list($parent=0, $depth=0)
{
global $mybb, $db, $table, $lang, $page; // Global $table is bad, but it will have to do for now

function build_theme_list($parent=0, $depth=0)
{
global $mybb, $db, $table, $lang, $page; // Global $table is bad, but it will have to do for now

Zeile 1247Zeile 1300

if(!is_array($theme_cache[$parent]))
{


if(!is_array($theme_cache[$parent]))
{

		return;
}

foreach($theme_cache[$parent] as $theme)
{

		return;
}

foreach($theme_cache[$parent] as $theme)
{

		$popup = new PopupMenu("theme_{$theme['tid']}", $lang->options);
if($theme['tid'] > 1)
{

		$popup = new PopupMenu("theme_{$theme['tid']}", $lang->options);
if($theme['tid'] > 1)
{

Zeile 1260Zeile 1313

// We must have at least the master and 1 other active theme
if($theme_cache['num_themes'] > 2)


// We must have at least the master and 1 other active theme
if($theme_cache['num_themes'] > 2)

			{

			{

				$popup->add_item($lang->delete_theme, "index.php?module=style-themes&action=delete&tid={$theme['tid']}&my_post_key={$mybb->post_code}", "return AdminCP.deleteConfirmation(this, '{$lang->confirm_theme_deletion}')");
}


				$popup->add_item($lang->delete_theme, "index.php?module=style-themes&action=delete&tid={$theme['tid']}&my_post_key={$mybb->post_code}", "return AdminCP.deleteConfirmation(this, '{$lang->confirm_theme_deletion}')");
}


Zeile 1268Zeile 1321
			{
$popup->add_item($lang->set_as_default, "index.php?module=style-themes&action=set_default&tid={$theme['tid']}&my_post_key={$mybb->post_code}");
$set_default = "<a href=\"index.php?module=style-themes&amp;action=set_default&amp;tid={$theme['tid']}&amp;my_post_key={$mybb->post_code}\"><img src=\"styles/{$page->style}/images/icons/make_default.png\" alt=\"{$lang->set_as_default}\" style=\"vertical-align: middle;\" title=\"{$lang->set_as_default}\" /></a>";

			{
$popup->add_item($lang->set_as_default, "index.php?module=style-themes&amp;action=set_default&amp;tid={$theme['tid']}&amp;my_post_key={$mybb->post_code}");
$set_default = "<a href=\"index.php?module=style-themes&amp;action=set_default&amp;tid={$theme['tid']}&amp;my_post_key={$mybb->post_code}\"><img src=\"styles/{$page->style}/images/icons/make_default.png\" alt=\"{$lang->set_as_default}\" style=\"vertical-align: middle;\" title=\"{$lang->set_as_default}\" /></a>";

			}

			}

			else
{
$set_default = "<img src=\"styles/{$page->style}/images/icons/default.png\" alt=\"{$lang->default_theme}\" style=\"vertical-align: middle;\" title=\"{$lang->default_theme}\" />";

			else
{
$set_default = "<img src=\"styles/{$page->style}/images/icons/default.png\" alt=\"{$lang->default_theme}\" style=\"vertical-align: middle;\" title=\"{$lang->default_theme}\" />";

Zeile 1284Zeile 1337

// Fetch & build any child themes
build_theme_list($theme['tid'], ++$depth);


// Fetch & build any child themes
build_theme_list($theme['tid'], ++$depth);

	}
}

	}
}





// returns an array which can be sent to generate_select_box()









/**
* returns an array which can be sent to generate_select_box()
*
* @param int $ignoretid
* @param int $parent
* @param int $depth
*
* @return null|string
*/

function build_theme_array($ignoretid = null, $parent=0, $depth=0)
{
global $list;

function build_theme_array($ignoretid = null, $parent=0, $depth=0)
{
global $list;

Zeile 1302Zeile 1363
			if($key == "default")
{
continue;

			if($key == "default")
{
continue;

			}


			}


			$theme_cache[$theme['pid']][$theme['tid']] = $theme;

			$theme_cache[$theme['pid']][$theme['tid']] = $theme;

		}

		}

		unset($theme);

		unset($theme);

	}

	}


if(!is_array($theme_cache[$parent]) || $ignoretid === $parent)
{
return null;
}


if(!is_array($theme_cache[$parent]) || $ignoretid === $parent)
{
return null;
}





	foreach($theme_cache[$parent] as $theme)
{
if($ignoretid === $theme['tid'])

	foreach($theme_cache[$parent] as $theme)
{
if($ignoretid === $theme['tid'])

		{
continue;
}


		{
continue;
}


		$list[$theme['tid']] = str_repeat("--", $depth).$theme['name'];
// Fetch & build any child themes
build_theme_array($ignoretid, $theme['tid'], $depth+1);

		$list[$theme['tid']] = str_repeat("--", $depth).$theme['name'];
// Fetch & build any child themes
build_theme_array($ignoretid, $theme['tid'], $depth+1);

	}


	}


	if(!$parent)
{
return $list;
}
}


	if(!$parent)
{
return $list;
}
}


 
/**
* @param array $theme
*
* @return array|bool
*/

function fetch_theme_stylesheets($theme)
{
// Fetch list of all of the stylesheets for this theme

function fetch_theme_stylesheets($theme)
{
// Fetch list of all of the stylesheets for this theme

Zeile 1354Zeile 1420
		}

foreach($action_stylesheet as $action => $style)

		}

foreach($action_stylesheet as $action => $style)

		{

		{

			foreach($style as $stylesheet2)
{
$stylesheets[$stylesheet2]['applied_to'][$file][] = $action;

			foreach($style as $stylesheet2)
{
$stylesheets[$stylesheet2]['applied_to'][$file][] = $action;

Zeile 1388Zeile 1454
	return $stylesheets;
}


	return $stylesheets;
}


 
/**
* @param string $css
*
* @return string
*/

function upgrade_css_120_to_140($css)
{
// Update our CSS to the new stuff in 1.4

function upgrade_css_120_to_140($css)
{
// Update our CSS to the new stuff in 1.4