Skip to content

Instantly share code, notes, and snippets.

View mrwweb's full-sized avatar

Mark Root-Wiley mrwweb

View GitHub Profile
@mrwweb
mrwweb / convert_milliseconds_to_formatted_time.php
Created September 21, 2024 00:21 — forked from bcls/convert_milliseconds_to_formatted_time.php
convert milliseconds to formatted time #php
/**
* Converts milliseconds to formatted time or seconds.
* @param int [$ms] The length of the media asset in milliseconds
* @param bool [$seconds] Whether to return only seconds
* @return mixed The formatted length or total seconds of the media asset
*/
function convertTime($ms, $seconds = false)
{
$total_seconds = ($ms / 1000);
function flexslider_hg_admin_icon()
{
echo '
<style>
/*
Selectors:
1. Admin Menu
2. "Site Content" Dashboard Widget (Post Types only)
*/
#adminmenu #menu-posts-slides div.wp-menu-image:before,