WordPress Notes
Video Player
// Removes quotes around the Playlist in Video Player
add_filter('gettext_with_context', function($translated, $text, $context, $domain){
if($context = 'playlist item title' && $text == '“%s”') $translated = "%s";
return $translated;
}, 10, 4);
Logout
// Logout without Confirmations
add_action('check_admin_referer', 'logout_without_confirm', 10, 2);
function logout_without_confirm($action, $result)
{
if ($action == "log-out" && !isset($_GET['_wpnonce'])) {
$redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : 'url-you-want-to-redirect';
$location = str_replace('&', '&', wp_logout_url($redirect_to));
header("Location: $location");
die;
}
}
TT Fix
/* Highlight Parent & Header Fix in TT */
li.current-menu-parent >a,
.current-menu-item >a {
color: #E19100 !important;
}
.container
{
padding:0px;
}