Skip to content

Instantly share code, notes, and snippets.

View dohnutt's full-sized avatar
🍩
🍩🍩🍩🍩🍩🍩🍩🍩🍩🍩🍩

Eric Moss dohnutt

🍩
🍩🍩🍩🍩🍩🍩🍩🍩🍩🍩🍩
View GitHub Profile
@ville6000
ville6000 / index.php
Last active October 28, 2016 20:29
Get translated permalink with WPML 3.2+
<?php $object_id = apply_filters( 'wpml_object_id', YOUR-PAGE-ID-HERE, 'page' ); ?>
<a href="<?php echo get_permalink( $object_id ); ?>">
<?php _e( 'Link text', 'text-domain' );
</a>
@spivurno
spivurno / gw-gravity-forms-disable-submission-on-enter.js
Last active October 13, 2021 14:44
Gravity Wiz // Gravity Forms // Disable Submission when Pressing Enter
<script type="text/javascript">
/**
* Gravity Wiz // Gravity Forms // Disable Submission when Pressing Enter
* http://gravitywiz.com/disable-submission-when-pressing-enter-for-gravity-forms/
*/
jQuery(document).on( 'keypress', '.gform_wrapper', function (e) {
var code = e.keyCode || e.which;
if ( code == 13 && ! jQuery( e.target ).is( 'textarea,input[type="submit"],input[type="button"]' ) ) {
e.preventDefault();
return false;
@Vestride
Vestride / encoding-video.md
Last active June 5, 2024 14:38
Encoding video for the web

Encoding Video

Installing

Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
<?php
function the_date_range($args) {
global $post;
$default = array(
'start_field' => 'start_date',
'end_field' => null,
'base_format' => 'Ymd',
'post_id' => $post->ID,
'separator' => '<span class="date-separator">&ndash;</span>',
'month_format' => 'F',
@barbwiredmedia
barbwiredmedia / functions.php
Last active February 23, 2023 23:55
Wordpress SEO Yoast Order meta box. This will change the priority of Yoasts meta box and move it to the bottom of all pages / posts.
// Move Yoast Meta Box to bottom
function yoasttobottom() {
return 'low';
}
add_filter( 'wpseo_metabox_prio', 'yoasttobottom');