Skip to content

Instantly share code, notes, and snippets.

View felipe-pita's full-sized avatar

Felipe Farias Pita felipe-pita

View GitHub Profile
@tsantos8080
tsantos8080 / adp.user.js
Last active September 28, 2026 16:39
ADP userscript
// ==UserScript==
// @name ADP
// @namespace https://expert.hcm.adp.com/
// @version 0.7.4
// @description Previsão de saída (com tolerância de 10 min), saldo do banco de horas, pagamentos a receber e confirmação de batida no ADP eXpert Brasil.
// @author Thyago
// @license MIT
// @icon https://www.adp.com/favicon.ico
// @match https://expert.hcm.adp.com/expert2/v5/*
// @run-at document-idle
@tomazzaman
tomazzaman / functions.php
Created February 18, 2015 23:57
Insert image in WordPress with HTML5 <figure> tag and caption
<?php
// Don't include the opening tag
function html5_insert_image( $html, $id, $caption, $title, $align, $url, $size, $alt ) {
$src = wp_get_attachment_image_src( $id, $size, false );
$html5 = "<figure id=\"post-$id media-$id\" class=\"align-$align\">";
if ( $url ) {
$html5 .= "<a href=\"$url\" class=\"image-link\"><img src=\"$src[0]\" alt=\"$alt\" /></a>";
} else {
@mustardBees
mustardBees / functions.php
Last active October 4, 2024 13:37
Filter a few parameters into WordPress YouTube oEmbed requests. Enable modest branding which hides the YouTube logo. Remove the video title and uploader information. Prevent related videos from being shown once the video has played.
<?php
/**
* Filter a few parameters into YouTube oEmbed requests
*
* @link http://goo.gl/yl5D3
*/
function iweb_modest_youtube_player( $html, $url, $args ) {
return str_replace( '?feature=oembed', '?feature=oembed&modestbranding=1&showinfo=0&rel=0', $html );
}
add_filter( 'oembed_result', 'iweb_modest_youtube_player', 10, 3 );