$query = new WP_Query($args); while ($query->have_posts()) { $query->the_post(); $tags = get_the_terms($id, 'person-tags'); if (is_array($tags)) { //$values = array_map(function($tag) { return "<a href=\"".$tag->slug."\" rel=\"tag\">$tag->slug</a>"; }, $tags); $values = array_map(function ($tag) { return "<li class=\"filter personTag\" data-filter=\"." . custom_tag_escape($tag->slug) . "\" ><span>" . maxLength($tag->name, 22) . "</span></li>"; }, $tags); $taglist = implode("", $values); $persontags = array_map(function ($tag) { return $tag->slug; }, $tags); } else { //$taglist = "<a href=\"".$tag->slug."\" rel=\"tag\">$tag->slug</a>"; $taglist = "<li class=\"filter personTag\" data-filter=\"." . $tag->slug . "\" >" . maxLength($tag->name, 22) . "</li>"; $persontags = array($tag->slug); } ?> <div class="col-md-4 col-sm-6 col-xs-12 mb_40 mix <?php echo get_initials(get_the_title()) . " "; echo implode(" ", $persontags); ?> "> <div class="mb_15 person-box"> <div class="author_image_sm"> <a href="<?php the_permalink(); ?> " > <?php
//create the array to hold the user dater and load $_GET into it $userArray = array(); foreach ($_GET as $key => $value) { $userArray[$key] = $value; } //Declare default values for variables $numberOfWords = 4; $separator = ""; //check that the variable keys exist in the userArray and load them if they do if (array_key_exists("numberOfWords", $userArray) && is_numeric($userArray["numberOfWords"]) && $userArray["numberOfWords"] > 0) { $numberOfWords = $userArray["numberOfWords"]; } if (array_key_exists("separator", $userArray)) { $separator = $userArray["separator"]; } //build the word portion of the password $passWords = selectWords($wordList, $numberOfWords, $separator); //if special characters are selected add them to the end if (array_key_exists("numSpecChar", $userArray) && is_numeric($userArray["numSpecChar"])) { $passWords = addSpecialChar($passWords, $userArray["numSpecChar"]); } //add a random number between 0 and 9 to the end of the password if (array_key_exists("numberInc", $userArray) && $userArray["numberInc"] > 0) { $passWords = addNumbers($passWords); } //chop the password down to the maximum length if required - cuts from the front if (array_key_exists("maximumLength", $userArray) && is_numeric($userArray["maximumLength"]) && $userArray["maximumLength"] > 0) { $passWords = maxLength($passWords, $userArray["maximumLength"]); } //display the password echo '<h4 class="passwordSection"> <br>' . $passWords . '</h4>';
/** * Displays the menu form fields. * * @param FolderParser $folderParser folderParser object * @param string $folderId folder id */ function displayMenu($folderParser, $folderId) { global $runSuites; $folder = $folderParser->getFolder($folderId); if (isset($folder['subfolders'])) { foreach ($folder['subfolders'] as $subId) { $subfolder = $folderParser->getFolder($subId); $dir = str_replace(ROOT_DIR, '', $folder); // set the display state: $display = 'none'; $arrow = 'collapsed.png'; foreach ($runSuites as $suiteId => $tests) { if (strstr($suiteId, $dir)) { $display = 'block'; $arrow = 'expanded.png'; break; } } printf('<div class="groupName" onclick="toggleGroup(\'%s\')"><img id="arrow_%s" class="arrow" src="images/%s"/></span> %s</div>', $subId, $subId, $arrow, basename($subfolder['path'])); printf('<div class="group" id="%s" style="display: %s">', $subId, $display); displayMenu($folderParser, $subId); printf('</div>'); } } if (isset($folder['suites'])) { foreach ($folder['suites'] as $suiteId) { $suite = $folderParser->getSuite($suiteId); // suite name is the short file name (with suffix detached) $suiteName = str_replace(TEST_SUFFIX . '.php', '', basename($suite['path'])); // checked state $checked = in_array($suiteId, $runSuites); // Main box: printf('<div class="suiteSelect" onclick="setCheckBox(\'%s\'); setCheckBoxes(\'%s\', document.getElementById(\'%s\').checked);" onmouseover="toggleTests(\'%s\', event, true);" onmouseout="toggleTests(\'%s\', event, false);" id="suiteSelect_%s" >', $suiteId, 'tests_' . $suiteId, $suiteId, $suiteId, $suiteId, $suiteId); // checkbox for suite printf('<input class="checkbox" onclick="this.checked = !this.checked;" type="checkbox" name="suite" id="%s" value="%s"%s/>', $suiteId, $suiteId, $checked ? ' checked="checked"' : ''); printf('<span class="checkboxFront%s"></span>', $checked ? 'Set' : 'Unset'); // arrow for toggling the suite tests box printf('<img id="%s" class="arrow_suite" src="" fleoscmouseover="toggleTests(\'%s\', event, true);" fleoscmouseout="toggleTests(\'%s\', event, false);"/>', 'arrow_' . $suiteId, $suiteId, $suiteId); printf('<span>'); if (in_array($suiteId, $runSuites)) { printf('<a href="#a_%s">%s</a>', $suiteId, $suiteName); } else { echo $suiteName; } echo '</span>'; echo '</div>'; // Display the suite tests box: // Set height and width of the tests box $height = count($suite['tests']) * 17 + 43; $width = max(maxLength($suite['tests']) * 8, 175); // tests box printf('<div id="%s" class="testSelectClosed" style="width: ' . $width . 'px; height: ' . $height . 'px;" onmouseout="toggleTests(\'%s\', event, false);">', 'tests_' . $suiteId, $suiteId); foreach ($suite['tests'] as $test) { $testId = $suiteId . '@' . $test; // used the '@' string as delimiter // test box printf('<div class="testSelect" onclick="setCheckBox(\'%s\'); setCheckBoxSuite(\'%s\');">', $testId, $suiteId); // checkbox for test printf('<input class="checkbox" onclick="this.checked = !this.checked;" type="checkbox" name="runSuites[%s][]" id="%s" value="%s"%s/>', $suiteId, $testId, $test, $checked ? ' checked="checked"' : ''); printf('<span class="checkboxFront%s"></span>', $checked ? 'Set' : 'Unset'); echo $test; echo '</div>'; } // buttons for select and clear all printf('<p style="text-align: center;"><input class="button" style="width: 80px;" type="button" onclick="toggleAllTests(%s,%s);" value="%s"/>', "'{$suiteId}'", "false", CLEAR_ALL_LABEL); echo ' '; printf('<input class="button" style="width: 80px;" type="button" onclick="toggleAllTests(%s,%s);" value="%s"/></p>', "'{$suiteId}'", "true", SELECT_ALL_LABEL); echo ' '; echo '</div>'; } } // buttons for select and clear all printf('<p><input class="button" style="width: 80px;" type="button" onclick="setCheckBoxes(%s,%s)" value="%s"/>', "'{$folderId}'", "false", CLEAR_ALL_LABEL); echo ' '; printf('<input class="button" style="width: 80px;" type="button" onclick="setCheckBoxes(%s,%s)" value="%s"/></p>', "'{$folderId}'", "true", SELECT_ALL_LABEL); echo ' '; }
?> <?php setup_postdata($post); $tags = get_the_terms($id, 'person-tags'); if (is_array($tags)) { //$values = array_map(function($tag) { return "<a href=\"".$tag->slug."\" rel=\"tag\">$tag->slug</a>"; }, $tags); $values = array_map(function ($tag) { return "<li class=\"filter personTag\" data-filter=\"." . custom_tag_escape($tag->slug) . "\" ><span><a href=\"" . get_site_url() . "/authors/?person-tag=" . $tag->slug . "\">" . maxLength($tag->name, 22) . "</a></span></li>"; }, $tags); $taglist = implode("", $values); $persontags = array_map(function ($tag) { return $tag->slug; }, $tags); } else { //$taglist = "<a href=\"".$tag->slug."\" rel=\"tag\">$tag->slug</a>"; $taglist = "<li class=\"filter personTag\" data-filter=\"." . $tag->slug . "\" ><a href=\"" . get_site_url() . "/authors/?person-tag=" . $tag->slug . "\">" . maxLength($tag->name, 22) . "</a></li>"; $persontags = array($tag->slug); } ?> <div class="col-sm-6 col-xs-12 mb_40 mix <?php echo get_initials(get_the_title()) . " "; echo implode(" ", $persontags); ?> "> <div class="mb_15 person-box"> <div class="author_image_sm"> <a href="<?php the_permalink(); ?> " > <?php