Skip to content

Instantly share code, notes, and snippets.

@barryceelen
Last active December 29, 2015 04:59
Show Gist options
  • Save barryceelen/7619021 to your computer and use it in GitHub Desktop.
Save barryceelen/7619021 to your computer and use it in GitHub Desktop.
Simplechimp options filter WordPress plugin.
<?php
/**
* @package SimpleChimp Options
* @version 1.0.0
*/
/*
* Plugin Name: SimpleChimp Options
* Plugin URI: https://github.com/barryceelen/simplechimp
* Description: Filters Simplechimp options.
* Author: Barry Ceelen
* Author URI: http://github.com/barryceelen/
* Version: 1.0.0
* License: GPL2+
*/
add_filter( 'simplechimp_options', 'simplechimp_options_filter_options', 9999 );
function simplechimp_options_filter_options( $options ) {
/**
* Simplechimp defaults:
*
* $options = array(
* 'api_key' => '',
* 'list_id' => '',
* 'labels' => array(
* 'label' => __( 'E-mail', 'simplechimp' ),
* 'submit' => __( 'Subscribe', 'simplechimp' ),
* 'placeholder' => __( 'E-mail', 'simplechimp' )
* ),
* 'messages' => array(
* 'error' => __( 'An error occurred.', 'simplechimp' ),
* 'error_nonce' => __( 'An error occurred, try reloading the page.', 'simplechimp' ),
* 'invalid_email' => __( 'Invalid email address.', 'simplechimp' ),
* 'already' => __( 'Already subscribed.', 'simplechimp' ),
* 'success' => __( 'Thank you for subscribing.', 'simplechimp' )
* )
* );
*/
$options['list_id'] = '';
$options['api_key'] = '';
return $options;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment