wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi



wp_register_icon › WordPress Function

Da7.1.0
Deprecaton/a
› wp_register_icon ( $icon_name, $args )
Parametri: (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.
    Richiesto: Sì
  • (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. }
    Richiesto: Sì
Ritorna:
  • (bool) True if the icon was registered successfully, else false.
Definito a:
Codex:
ChangeLog:
  • 7.2.0

Registers a new icon.



Sorgenti

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