You are here

function _crumbs_get_default_text in Crumbs, the Breadcrumbs suite 6

Same name and namespace in other branches
  1. 6.2 crumbs.admin.inc \_crumbs_get_default_text()
  2. 7 admin/crumbs.admin.inc \_crumbs_get_default_text()
1 call to _crumbs_get_default_text()
crumbs_admin_form in ./crumbs.admin.inc

File

./crumbs.admin.inc, line 35

Code

function _crumbs_get_default_text() {
  $x = _crumbs_load_plugin_data();
  $lines = array(
    'inherit' => _crumbs_get_available_rule_lines($x),
    'enabled' => array(),
    'disabled' => array(),
  );
  foreach ($x->order as $order_key => $enabled) {
    if (isset($lines['inherit'][$order_key])) {
      $lines[$enabled ? 'enabled' : 'disabled'][$order_key] = $lines['inherit'][$order_key];
      unset($lines['inherit'][$order_key]);
    }
  }
  return "\n\n" . implode("\n", $lines['enabled']) . "\n\n---- disabled ----\n" . implode("\n", $lines['disabled']) . "\n\n---- inherit ----\n" . implode("\n", $lines['inherit']) . "\n\n";
}