';
$render();
echo '';
}
/** Return an icon from the local, trusted set. */
public static function icon( $name ) {
$aliases = array(
'build' => 'grid', 'style' => 'palette', 'delivery' => 'mail', 'review' => 'check',
'general' => 'home', 'email' => 'mail', 'spam' => 'shield', 'privacy' => 'lock',
'templates' => 'grid', 'import' => 'arrows', 'usage' => 'pin', 'guide' => 'book',
'health' => 'pulse', 'activity' => 'clock', 'protection' => 'shield', 'presets' => 'palette',
'team' => 'users', 'manual' => 'file', 'automatic' => 'layers', 'block' => 'code',
);
$name = $aliases[ $name ] ?? $name;
$paths = array(
'grid' => '',
'home' => '',
'mail' => '',
'shield' => '',
'lock' => '',
'palette' => '',
'check' => '',
'arrows' => '',
'pin' => '',
'book' => '',
'pulse' => '',
'clock' => '',
'user' => '',
'users' => '',
'file' => '',
'layers' => '',
'code' => '',
'edit' => '',
'inbox' => '',
'alert' => '',
'trash' => '',
'calendar' => '',
'chart' => '',
'eye' => '',
'copy' => '',
'more' => '',
'chevron' => '',
'restore' => '',
);
return '';
}
/** Render a decorative icon and an escaped, visible label. */
public static function label( $name, $label ) {
return self::icon( $name ) . '' . esc_html( $label ) . '';
}
/** Add a decorative icon without changing an existing action's name or behavior. */
public static function action_icon( $markup, $icon ) {
return preg_replace( '/(<(?:a|button)\b[^>]*>)/i', '$1' . self::icon( $icon ), $markup, 1 );
}
}