Skip to content

Instantly share code, notes, and snippets.

View remkus's full-sized avatar

Remkus de Vries remkus

View GitHub Profile
@tomazzaman
tomazzaman / README.md
Last active March 31, 2021 06:30
Simple WordPress Optin form with CURL support

Simple Optin form example for WordPress

This is a simplified showcase of how you can easily build your own Optin form in WordPress.

It can connect to any API that supports cURL (most of them do). There is no error reporting implemented. It uses exit intent detection script called Ouibounce, which needs to be enqueued in your functions.php

See the tutorial here: How to build your own WordPress email form

@pixeline
pixeline / .gitignore
Last active February 8, 2025 23:26 — forked from redoPop/.gitignore
Default Wordpress .gitignore file
# This is a template .gitignore file for git-managed WordPress projects.
#
# Fact: you don't want WordPress core files, or your server-specific
# configuration files etc., in your project's repository. You just don't.
#
# Solution: stick this file up your repository root (which it assumes is
# also the WordPress root directory) and add exceptions for any plugins,
# themes, and other directories that should be under version control.
#
# See the comments below for more info on how to add exceptions for your
@danielbachhuber
danielbachhuber / gist:9508957
Created March 12, 2014 15:13
Helpful P2 comment settings
<?php
/**
* Permit anyone to post HTML in the comments
* Because ThunderP2 is only accessible by qualified users,
* this is just fine.
*/
add_action( 'init', function() {
remove_filter( 'pre_comment_content', 'wp_filter_kses' );
add_filter( 'pre_comment_content', 'wp_filter_post_kses' );
@nacin
nacin / london-contribute.md
Created November 24, 2013 12:40
WordCamp London 2013 Contributor Day Notes from the introduction to contributing to core.
@robneu
robneu / wordpress-widgeted-page-template-helper.php
Last active December 22, 2015 14:09
Sometimes you might want to create a custom page template that is built entirely using widgets. This can give your content a lot of flexibility for the end user; however, it could also be confusing. If you're not using the standard WordPress editor at all in your template, you should disable it and explain why it has been removed. This code will…
<?php
/**
* If your theme or plugin has a page template that
* uses widgets to build the layout, users might be
* confused as to why the standard editor doesn't
* work as expected. This will disable the editor
* and introduce a notice explaining its absence.
*
* @author FAT Media <http://youneedfat.com>
* @copyright Copyright (c) 2013, FAT Media, LLC
@stephenharris
stephenharris / bbpress-kses.php
Last active February 3, 2020 08:44
By default bbpress can be quite strict on the HTML it allows in posts (tags are whitelisted). The following loosens those restrictions and is taken from this post: http://buddypress.org/support/topic/tutorial-allow-more-html-tags-in-bp-forum-topics/
<?php
function myprefix_kses_allowed_tags($input){
return array_merge( $input, array(
// paragraphs
'p' => array(
'style' => array()
),
'span' => array(
'style' => array()
),

Build your own private, encrypted, open-source Dropbox-esque sync folder

Prerequisites:

  • One or more clients running a UNIX-like OS. Examples are given for Ubuntu 12.04 LTS, although all software components are available for other platforms as well (e.g. OS X). YMMV
  • A cheap Ubuntu 12.04 VPS with storage. I recommend Backupsy, they offer 250GB storage for $5/month. Ask Google for coupon codes.

Software components used:

  • Unison for file synchronization
  • EncFS for folder encryption
@norcross
norcross / no-comment-notes.php
Created July 19, 2013 16:41
remove comment notes field
<?php
function no_comment_notes($fields) {
$fields['comment_notes_after'] = '';
return $fields;
}
add_filter('comment_form_defaults', 'no_comment_notes');
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active July 25, 2026 20:55
A badass list of frontend development resources I collected over time.
@rfmeier
rfmeier / functions.php
Last active October 29, 2018 14:36
Add custom nav item to Genesis primary menu
<?php
//* do no include php tags
add_filter( 'wp_nav_menu_items', 'custom_nav_item', 10, 2 );
/**
* Callback for Genesis 'wp_nav_menu_items' filter.
*
* Add custom right nav item to Genesis primary menu.
*
* @package Genesis