This file contains 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 | |
/** | |
* The template used for displaying an inline list of events. Used in side columns on landing page templates, mostly. | |
* | |
* | |
* @package bsu2014 | |
*/ | |
if( get_field('show_event_list') ) : |
This file contains 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
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.loulou2u</groupId> | |
<artifactId>testsuite</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<name>Selenium Testsuite</name> | |
<description>A selenium test setup with a collection of tests using Selenium Webdriver 3.0.0-beta release.</description> | |
<!-- properties --> | |
<properties> |
This file contains 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 | |
$_LW->REGISTERED_APPS['resize_summary'] = array( | |
'title' => 'Resize Summary', | |
'handlers' => array('onOutputRSS'), | |
'custom' => array( | |
'always_truncate'=>false, // always truncate, or require /truncate/1? | |
'fields_to_shorten'=>array( // fields to shorten, and the maximum number of words for that field | |
'description'=>30 | |
) | |
) |
This file contains 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
// JS functionality for a redundant checkbox above the group suggest selector box, providing a checkbox for users to select to a specific chosen group (like the homepage or main communications team). | |
(function($, LW) { | |
// Make adjustments below to match the group id and group name | |
// to the calendar group you want to use for this feature. | |
var group_id = '8'; | |
var group_name = 'Homepage'; | |
if (LW.page === 'events_edit' || LW.page === 'events_sub_edit' || LW.page === 'news_edit') { // define pages to target with this transformation |
This file contains 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 | |
// PHP functionality for a redundant checkbox above the group suggest selector box, providing a shortcut for users to suggest to a specific chosen group (like the homepage or main communications team). | |
$_LW->REGISTERED_APPS['suggest_to']=array( | |
'title'=>'suggest_to', | |
'handlers'=>array('onLoad','onOutput'), | |
'custom'=>array( | |
'label'=>'Suggest to main calendar' // Customize checkbox label as appropriate |
This file contains 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 | |
$_LW->REGISTERED_APPS['public_notifier']=array( | |
'title'=>'PublicNotifier', | |
'handlers' => array('onAfterPublicSubmission') | |
); | |
class LiveWhaleApplicationPublicNotifier { | |
// These two arrays are for including the users and/or groups that |
This file contains 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
// Calendar (3 events): Show three LiveWhale Calendar events in a horizontal row | |
// Below is the resulting code, which you can roll into the master functions.php if you want it to apply to all themes in a multisite site. | |
register_field_group(array ( | |
'id' => 'acf_calendar-3-events', | |
'title' => 'Calendar (3 events)', | |
'fields' => array ( | |
array ( | |
'key' => 'field_53d14e3d55dba', | |
'label' => 'Show events?', |
This file contains 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
//The custom app below redirects files tagged as "private" to a .htaccess protected directory | |
<?php | |
$_LW->REGISTERED_APPS['protect_files']=array( | |
'title'=>'Protect Files', | |
'handlers'=>array('onLoad') | |
); | |
class LiveWhaleApplicationProtectFiles { |
This file contains 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
SetEnvIfNoCase Request_URI "^/authenticated-directory/*" SECURED | |
# enforce auth if SECURED=1 | |
AuthType Basic | |
AuthName "Login Required" | |
AuthUserFile /path/to/.htpasswd | |
Require valid-user | |
Order allow,deny | |
Allow from all | |
Deny from env=SECURED |
This file contains 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 | |
$_LW->REGISTERED_APPS['resize_images'] = array( // configure this application module | |
'title' => 'Resize Images', | |
'handlers' => array('onLoad') | |
); | |
class LiveWhaleApplicationResizeImages { | |
public function onLoad() { // on frontend request |
NewerOlder