Skip to content

Instantly share code, notes, and snippets.

Kristof Bernaert ssstofff

Block or report user

Report or block ssstofff

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ssstofff
ssstofff / functions.php
Last active Apr 11, 2018
WordPress Shortcode function to use URL QueryString value
View functions.php
function URLPARAM( $att01 ) {
extract( shortcode_atts( array(
'var' => 'var',
), $att01 ) );
if (isset($_GET[$var])) {
return $_GET[$var];
}
}
View gravityforms.py
# http://www.gravityhelp.com/documentation/page/Web_API#Security
import time
import base64
import urllib
import requests
import json
import hmac
from hashlib import sha1
@ssstofff
ssstofff / function.php
Created Dec 13, 2017
Keep WordPress Post Date & Time on current time
View function.php
wp_update_post(
array (
'ID' => 101, // ID of the post to update
'post_date' => $time,
'post_date_gmt' => get_gmt_from_date( $time )
)
);
View keybase.md

Keybase proof

I hereby claim:

  • I am ssstofff on github.
  • I am ssstofff (https://keybase.io/ssstofff) on keybase.
  • I have a public key whose fingerprint is 0DBC AFA6 A1E4 D00C 87A3 C0D1 B494 4EBC 5BD7 02E0

To claim this, I am signing this object:

@ssstofff
ssstofff / gist:710939144018a44a9c25bb1f613b1dea
Last active Dec 17, 2018
WordPress: List subpages on a parent page through a shortcode
View gist:710939144018a44a9c25bb1f613b1dea
function wpb_list_child_pages() {
global $post;
if ( is_page() && $post->post_parent )
$childpages = wp_list_pages( 'sort_column=menu_order&title_li=&child_of=' . $post->post_parent . '&echo=0' );
else
$childpages = wp_list_pages( 'sort_column=menu_order&title_li=&child_of=' . $post->ID . '&echo=0' );
@ssstofff
ssstofff / style.css
Last active Dec 5, 2017
GenesisWP most simple child theme
View style.css
/*
Theme Name: Genesis Child Theme
Theme URI: http://link-to-page-with-theme-exaplanation
Description: Designed by <a href="https://kristofbernaert.be">Kristof Bernaert</a>.
Author: Kristof Bernaert
Version: 0.1
Template: genesis
Tags: the child of genesis
*/
@ssstofff
ssstofff / WP-exclude-from-search
Last active Jan 17, 2016
Exclude a (Custom) Post Type from WordPress Search Result
View WP-exclude-from-search
@ssstofff
ssstofff / functions.php
Created Nov 12, 2015 — forked from wpspeak/functions.php
Add Estimated Post Reading Time in Genesis Framework
View functions.php
<?php
//* Add Estimated Post Reading Time in Genesis Framework using Estimated Post Reading Time plugin
add_filter( 'genesis_post_info', 'afn_post_info_filter' );
function afn_post_info_filter($post_info) {
$post_info = '[post_date] by [post_author_posts_link] [post_comments] [post_edit] Estimated reading time: [est_time]';
return $post_info;
}
@ssstofff
ssstofff / gist:4dd1557abda08e7be90a
Last active Nov 3, 2015
Gravity Forms: restrict days on datepicker
View gist:4dd1557abda08e7be90a
jQuery(function () {
// 0 = monday, 1 = tuesday, 2 = wednesday, 3 = thursday,
// 4=friday, 5 = saturday, 6=sunday
var daysToDisable = [2, 4, 5];
jQuery("#input_id_id").datepicker({
beforeShowDay: disableSpecificWeekDays
});
View Clickthrough Splash
<html>
<head>
<title>Welcome to Public WiFi</title>
</head>
<body>
<h1>Welcome to Public WiFi</h1>
<?php
$base_grant_url = urldecode($_GET['base_grant_url']);
$user_continue_url = urldecode($_GET['user_continue_url']);
You can’t perform that action at this time.