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 | |
function insert_countries() { | |
wp_insert_term('CA', 'countries', array('description'=>'Canada')); | |
$array_data = csv_to_array('/var/www/cinema/wp-content/themes/cp-theme/country.csv'); | |
// Knock off the first line | |
array_shift($array_data); | |
foreach($array_data as $data) | |
{ |
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
SELECT n.nid FROM node n LEFT JOIN search_dataset d ON d.type = 'node' AND d.sid = n.nid WHERE d.sid IS NULL OR d.reindex <> 0 ORDER BY d.reindex ASC, n.nid asc; |
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
jQuery(function($) { | |
// Scroll the popup with the user | |
$(window).scroll(function() { | |
var windowWidth = document.documentElement.clientWidth; | |
var windowHeight = document.documentElement.clientHeight; | |
var popupWidth = $("#likeus").width(); | |
var popupHeight = $("#likeus").height(); | |
var topPopup = windowHeight * 2 / 3 + $(window).scrollTop(); | |
var leftPopup = windowWidth - popupWidth; |
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
/** | |
* Like Us Popup CSS | |
*/ | |
#likeus { | |
width:342px; | |
height:170px; | |
border: 1px solid #666; | |
background-color:#fff; | |
-webkit-box-shadow: 0 0 16px #666; | |
box-shadow: 0 0 16px #666; |
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
<div id="likeus"><div id="likeus-wrapper"> | |
<div id="likeus-banner"> </div> | |
<div id="likeus-inner"> | |
<h2>Join us on Facebook</h2> | |
<div class="fb-like" width="300" data-href="http://www.facebook.com/yourpath" data-layout="standard" data-action="like" data-show-faces="false" data-share="true"></div> | |
<div id="likeus-close-wrapper"> | |
<a href="#likeus" class="close-like">Close</a> · | |
<a href="#likeus"> class="close-forever">I already like Bees on a Bike</a> | |
</div> | |
</div> |
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
/** | |
* Preprocess output of form element | |
* | |
*/ | |
function yourtheme_preprocess_form_element(&$vars) { | |
if (!empty($vars['element']['#id']) && ($vars['element']['#id'] == 'edit-hour')) { | |
// Add special class for JS to work properly but we need to edit the #children value :/ | |
$children = $vars['element']['#children']; | |
if (!empty($children)) { | |
$vars['element']['#children'] = str_replace('form-text', 'form-text edit-timefield-timepicker filter-project-event-time', $children); |
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 | |
/** | |
* Alter the exposed form for the projects view | |
* | |
* $form | |
* Relative form that is being created | |
* $form_state | |
* Existing statee | |
*/ |