View Move Yoast SEO box to the bottom of the page.php
function yoasttobottom() {
return 'low';
}
add_filter( 'wpseo_metabox_prio', 'yoasttobottom');
View Rewrite Rule with custom page ID.php
// required functions
function get_id_by_slug($page_slug) {
$page = get_page_by_path($page_slug);
if ($page) {
return $page->ID;
} else {
return null;
}
}
function get_url_path(){
View Position Window Right.applescript
on run {input, parameters}
set front_app to (path to frontmost application as Unicode text)
tell application front_app
activate
#set bounds of window 1 to {1237, 30, 2437, 1350}
set bounds of window 1 to {1237, 57, 2437, 1325}
end tell
return input
end run
View Position Window Left.applescript
on run {input, parameters}
set front_app to (path to frontmost application as Unicode text)
tell application front_app
activate
#set bounds of window 1 to {8, 30, 1228, 1350}
set bounds of window 1 to {28, 57, 1207, 1325}
end tell
return input
end run
View Wordpress Page Speed.sh
Header unset Pragma
FileETag None
Header unset ETag
Options All -Indexes
<IfModule pagespeed_module>
ModPageSpeed on
ModPagespeedRewriteLevel CoreFilters
ModPagespeedEnableFilters prioritize_critical_css
View Admin Limiting Functions.php
/**
* Remove 1st level menu items
*/
function remove_menus () {
global $menu;
$restricted = array(__('Plugins'), __('Appearance'), __('Tools'), __('Settings'), __('Anxiety Institute'));
end ($menu);
while (prev($menu)){
$value = explode(' ',$menu[key($menu)][0]);
if(in_array($value[0] != NULL?$value[0]:"" , $restricted)){unset($menu[key($menu)]);}
View Position Window Developer.applescript
on run {input, parameters}
set front_app to (path to frontmost application as Unicode text)
tell application front_app
activate
set bounds of window 1 to {8, 30, 1758, 1351}
#set bounds of window 1 to {28, 58, 1718, 1325}
end tell
return input
end run
View Jira Issue Collector.php
/**
* Add Jira Issue Collector code snippet
*
* Required in wp-config.php:
* define('JIRA_ISSUE_COLLECTOR_URL', '[URL]'); for DEV only
* define('JIRA_ISSUE_COLLECTOR_URL', false); for LIVE
*/
function wpb_add_jira_issue_collector(){
if(JIRA_ISSUE_COLLECTOR_URL){
View Obfuscate email address mailto links.php
View formatphone().php
/**
* format a phone number
* cleans contents of $phone into digits and returns (123) 555-1234 formatted number
*/
function formatphone($phone) {
$phone = str_replace(".","", str_replace(")","", str_replace("(","", str_replace("-","", str_replace(" ","",$phone)))));
if (empty($phone)) return "";
if (strlen($phone) == 7){
sscanf($phone, "%3s%4s", $prefix, $exchange);
} else if (strlen($phone) == 10) {