<commit_before><?php
/**
 * Template Name: Pods - Conference
 * Description: The template used for Conference Pods
 *
 * @package LSECities2012
 */
?>
<?php
/**
 * Pods initialization
 */
global $pods;
$TRACE_ENABLED = is_user_logged_in();
$TRACE_PREFIX = 'pods-conference';

$pod_slug = get_post_meta($post->ID, 'pod_slug', true);
$pod = new Pod('conference', $pod_slug);
$is_conference = true;

var_trace('pod_slug: ' . $pod_slug, $TRACE_PREFIX, $TRACE_ENABLED);

var_trace('button_links: ' . var_export($button_links, true), $TRACE_PREFIX, $TRACE_ENABLED);

$event_hashtag = ltrim($pod->get_field('hashtag'), '#');

$event_blurb = do_shortcode($pod->get_field('abstract'));

$slider = $pod->get_field('slider');
if(!$slider) {
  $featured_image_uri = get_the_post_thumbnail(get_the_ID(), array(960,367));
}

/* process list of partners */
$partners = array();
$conference_partners_slugs = (array) $pod->get_field('partners.slug');
$slug_list = '(';
foreach($conference_partners_slugs as $slug) {
	$slug_list .=  "'$slug',";
}
$slug_list = substr($slug_list, 0, -1);
$slug_list .= ')';

$organizations_pod = new Pod('organization');
$organizations_pod->findRecords(array('where' => 'slug IN ' . $slug_list));

while($organizations_pod->fetchRecord()) {
  var_trace($GLOBALS['site-ec2012'], "GLOBALS['site-ec2012']");<commit_msg>order partners by slug<commit_after><?php
/**
 * Template Name: Pods - Conference
 * Description: The template used for Conference Pods
 *
 * @package LSECities2012
 */
?>
<?php
/**
 * Pods initialization
 */
global $pods;
$TRACE_ENABLED = is_user_logged_in();
$TRACE_PREFIX = 'pods-conference';

$pod_slug = get_post_meta($post->ID, 'pod_slug', true);
$pod = new Pod('conference', $pod_slug);
$is_conference = true;

var_trace('pod_slug: ' . $pod_slug, $TRACE_PREFIX, $TRACE_ENABLED);

var_trace('button_links: ' . var_export($button_links, true), $TRACE_PREFIX, $TRACE_ENABLED);

$event_hashtag = ltrim($pod->get_field('hashtag'), '#');

$event_blurb = do_shortcode($pod->get_field('abstract'));

$slider = $pod->get_field('slider');
if(!$slider) {
  $featured_image_uri = get_the_post_thumbnail(get_the_ID(), array(960,367));
}

/* process list of partners */
$partners = array();
$conference_partners_slugs = (array) $pod->get_field('partners.slug');
// MONKEYPATCH_BEGIN: sort by slug
asort($conference_partners_slugs);
// MONKEYPATCH_END
$slug_list = '(';
foreach($conference_partners_slugs as $slug) {
	$slug_list .=  "'$slug',";
}
$slug_list = substr($slug_list, 0, -1);
$slug_list .= ')';

$organizations_pod = new Pod('organization');
$organizations_pod->findRecords(array('where' => 'slug IN ' . $slug_list));

while($organizations_pod->fetchRecord()) {
  var_trace($GLOBALS['site-ec2012'], "GLOBALS['site-ec2012']");
{'fraction_non_alphanumeric': 0.18817984046410444, 'fraction_numerical': 0.014503263234227702, 'mean_word_length': 6.706703910614525, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '97904', 'n_tokens_mistral': 1026, 'n_tokens_neox': 1038, 'n_words': 172}