Difference between revisions of "WpLicense Function Reference"

From Creative Commons
Jump to: navigation, search
 
Line 13: Line 13:
 
== licenseHtml($display=True) ==
 
== licenseHtml($display=True) ==
  
Retrieves the HTML block associated with the selected license. The HTML block includes the license RDF and optional work RDF, encoded in an HTML comment, along with the “Some Rights Reserved” image, if appropriate. 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.
+
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() ==
 
== 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.
 
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.

Latest revision as of 20:46, 31 July 2007

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.