PluginProbe
Extendify / 3.2.3
Extendify v3.2.3
3.2.3 3.2.2 3.2.1 3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 All 129 releases
← All changes | app/Mcp/Surface.php +14 -0 3.2.2 → 3.2.3 View file →
@@ -440,8 +440,22 @@
440 440 return $described;
441 441 }
442 442
443 443 /**
444 + * @return array - The name a client calls each registered ability by.
445 + */
446 + public static function abilityNames()
447 + {
448 + if (!function_exists('wp_get_abilities')) {
449 + return [];
450 + }
451 +
452 + return array_values(array_map(function ($ability) {
453 + return self::name($ability->get_name());
454 + }, \wp_get_abilities()));
455 + }
456 +
457 + /**
444 458 * @param string $subject - The ability name.
445 459 * @return string
446 460 */
447 461 private static function name($subject)