This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// hide admin's activities from all activity feeds | |
function ( $a, $activities ) { | |
// ... but allow admin to see his activities! | |
if ( is_super_admin() ) | |
return $activities; | |
foreach ( $activities->activities as $key => $activity ) { | |
// ID's to exclude, separated by commas. ID 1 is always the superadmin | |
if ( $activity->user_id == 1 ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
const counters = document.querySelectorAll(".count"); | |
const speed = 200; | |
counters.forEach((counter) => { | |
const updateCount = () => { | |
const target = parseInt(+counter.getAttribute("data-target")); | |
const count = parseInt(+counter.innerText); | |
const increment = Math.trunc(target / speed); | |
console.log(increment); |
NewerOlder