wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



wp_register_icon › WordPress Function

Od7.1.0
Przestarzałyn/a
› wp_register_icon ( $icon_name, $args )
Parametry: (2)
  • (string) $icon_name Namespaced icon name in the form "collection/icon-name" (e.g. "my-plugin/arrow-left"). The "core" and "core-admin" collections are reserved for WordPress core icons; third-party code should register icons under its own collection rather than a reserved one.
    Wymagane: Tak
  • (array) $args { List of properties for the icon. @type string $label Required. A human-readable label for the icon. @type string $content Optional. SVG markup for the icon. If not provided, the content will be retrieved from the `file_path` if set. If both `content` and `file_path` are not set, the icon will not be registered. @type string $file_path Optional. The full path to the file containing the icon content. @type string[] $keywords Optional. Additional search terms for the icon, matched by `get_registered_icons()` alongside the name and label. }
    Wymagane: Tak
Powrót:
  • (bool) True if the icon was registered successfully, else false.
Zdefiniowane na:
Codex:
Dziennik zmian:
  • 7.2.0

Registers a new icon.



Źródło

function wp_register_icon( $icon_name, $args ) {
	return WP_Icons_Registry::get_instance()->register( $icon_name, $args );
}