Skip to content

Instantly share code, notes, and snippets.

@julien731
julien731 / breadcrumbs.php
Last active December 22, 2015 08:59
Generates a very customizable breadcrumb for WordPress. It supports all kind of content (pages, posts, archives, CPT...).
<?php
/**
* Generates a breadcrumb for WordPress
*
* This function will generate a very customizable breadcrumb
* for WordPress. It supports all kind of content (pages, posts,
* archives, CPT...).
*
* @author Julien Liabeuf <[email protected]>
* @copyright 2013 ThemeAvenue

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

@julien731
julien731 / class-custom-post-type.php
Last active March 29, 2018 04:22
Custom post type registration class.
<?php
/**
* Custom Post Type Registration.
*
* @package Contract Builder
* @author ThemeAvenue <[email protected]>
* @license GPL-2.0+
* @link http://themeavenue.net
* @copyright 2013 ThemeAvenue
*/
@julien731
julien731 / class-theme-switch.php
Created May 22, 2014 09:34
class-theme-switcher.php
<?php
/**
* Theme Switcher.
*
* @package DBA_Components
* @author Julien Liabeuf <[email protected]>
* @license GPL-2.0+
* @link http://n2clic.com
* @copyright 2014 N2Clic
*/
@julien731
julien731 / class-salesforce.php
Last active January 14, 2018 23:49
class-salesforce.php
<?php
/**
* Salesforce Web-To-Lead cURL PHP Wrapper.
*
* This class is a helper for Salesforce web-to-lead
* feature.
*
* @package Salesforce_WTL
* @version 0.1.1
* @author Julien Liabeuf <[email protected]>
@julien731
julien731 / awesome-support-custom-fields.php
Last active February 14, 2022 10:12
Awesome Support Custom Fields Starter Kit
<?php
/**
* @package Awesome Support/Custom Fields
* @author ThemeAvenue <[email protected]>
* @license GPL-2.0+
* @link http://themeavenue.net
* @copyright 2014 ThemeAvenue
*
* @wordpress-plugin
* Plugin Name: Awesome Support: My Custom Fields
add_filter( 'wpas_get_custom_fields', 'wpas_make_product_required' );
/**
* Make the products field required
*
* @param array $custom_fields Registered custom fields
*
* @return array
*/
function wpas_make_product_required( $custom_fields ) {
@julien731
julien731 / install.sh
Last active August 11, 2016 12:10
Ubuntu Config
# Initial system update
sudo apt-get update && sudo apt-get upgrade
# Install system utilities
## TLP
sudo apt-get install tlp tlp-rdw
sudo tlp start
## Sublime Text 2
@julien731
julien731 / wpas-check.php
Last active July 25, 2016 00:32
Add extra verification to AS submission process
<?php
add_filter( 'wpas_before_submit_new_ticket_checks', 'wpas_extra_submission_check' );
/**
* Add extra verifications to the ticket submission process
*
* @param bool|WP_Error $go The submission authorization status
* @return bool|WP_Error
*/
function wpas_extra_submission_check( $go ) {
@julien731
julien731 / limit-concurrent-tickets.php
Last active July 25, 2016 06:46
Limit the number of concurrently open tickets in AS
<?php
add_filter( 'wpas_before_submit_new_ticket_checks', 'wpas_limit_concurrently_open_tickets' );
/**
* Limit the Number of Concurrent Open Tickets
*
* @param bool|WP_Error $go Submission status
*
* @return bool|WP_Error
*/
function wpas_limit_concurrently_open_tickets( $go ) {