This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Filter the collections browse SQL to sort records alphabetically by name. | |
*/ | |
function filter_collections_alphabetically($select, $params) | |
{ | |
if (!array_key_exists('sort_field', $params)) { | |
$select->order('c.name ASC'); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Returns users ordered by a given key. | |
* | |
* @param string The meta_key to order by. Default is 'last_name'. | |
* @param string The sort direction. Default is ASC. | |
* @todo Add parameter to skip users with specific IDs | |
* @todo Add parameter to skip users with an empty last name. | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Add the following to any of the templates in ExhibitBuilder/views/public/exhibits | |
echo link_to_exhibit('Back to “' . exhibit('title') . '” Home' ); | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Returns a string detailing the parameters of a given query array. | |
* | |
* @param array A search array | |
* @return string HTML | |
*/ | |
function dibny_display_filters($query = null) | |
{ | |
$html = ''; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$files = array( | |
'http://example.com/file1.txt' => array( | |
'Dublin Core' => array( | |
'Title' => array('text' => 'Title of my first item'), | |
'Description' => array('text' => 'Description of my first item.') | |
) | |
), | |
'http://example.com/file2.txt' => array( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Function to return whether to use local or external JavaScript libraries in | |
* Omeka. Useful if you'd like your plugin or theme to honor this setting. | |
* | |
* Checks presence of, and value for, useInternalJavascripts in | |
* application/config/config.ini. If it is not set, returns false. Otherwise, | |
* returns boolean value for the setting. | |
* | |
* @return boolean |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Test the NeatlineTimeTimeline model. | |
*/ | |
class NeatlineTimeTimelineTest extends PHPUnit_Framework_TestCase | |
{ | |
public function setUp() | |
{ | |
$this->dbAdapter = new Zend_Test_DbAdapter; | |
$this->db = new Omeka_Db($this->dbAdapter); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$filterName = Inflector::underscore($callback); | |
// Avoid creating a 'file_default_display_display' filter name. | |
if ($filterName == 'default_display') { | |
$filterName = 'file_'.$filterName; | |
} else { | |
$filterName = 'file_'.$filterName.'_display'; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#whatever:before { | |
display:block; | |
height:0; | |
content: ""; | |
border-top: 1px solid rgba(0,0,0,0.5); | |
border-bottom: 1px solid rgba(255,255,255,0.5); | |
} |