WpLicense Function Reference

From Creative Commons
Jump to: navigation, search

WpLicense includes functions which may be added to templates in order to include license metadata or a license marking. Functions are also included to support retrieval of license RDF or URI for other applications to build on.

licenseRdf($display=True)

Deprecated; no longer supported in wpLicense 0.9

Retrieves the RDF block associated with the selected license. If $display is True or not specified, the RDF is echoed into the current document. If $display is False, the RDF block is returned as a String.

licenseHtml($display=True)

Retrieves the HTML block associated with the selected license. The HTML block includes the license name and the “Some Rights Reserved” image, if appropriate. The license URI is encoded as RDFa. If $display is True or not specified, the HTML is echoed into the current document. If $display is False, the HTML block is returned as a String.

licenseUri()

Returns the URI of the selected license. This will be a link to the human readable deed, which also includes embedded RDF defining the specific license properties.