Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* Class Liked_Videos_Custom_Shortcode
* @package
*/
final class Liked_Videos_Custom_Shortcode {
/**
* Main Liked_Videos_Custom_Shortcode Instance
<?php
/**
* The template for displaying archive pages
*
* Used to display archive-type pages if nothing more specific matches a query.
* For example, puts together date-based pages if no date.php file exists.
*
* If you'd like to further customize these archive views, you may create a
* new template file for each one. For example, tag.php (Tag archives),
* category.php (Category archives), author.php (Author archives), etc.
@atwellpub
atwellpub / class.social-warfare-edd.php
Created October 24, 2018 02:11
Extending SocialWarfare plugin to Easy Digital Downloads with custom permalink prefix
<?php
/**
*
*/
class Codeable_Social_Warefare {
public function __construct() {
self::load_hooks();
}
@atwellpub
atwellpub / functions.php
Created August 2, 2017 00:55
Testing the Client to Inbound Now connection.
<?PHP
/* look up api key to see what permissions it has */
$response = wp_remote_post('https://www.inboundnow.com/pro-api/key/check/', array(
'body' => array(
'api-key' => trim('1234'),
'site' => 'https://dev.inboundnow.com'
)
));
[inbound-cookie name="inbound_wpleads_first_name"]
@atwellpub
atwellpub / custom-js-function-on-inbound-form-completion.js
Last active April 19, 2017 15:02
Trigger custom javascript on inbound form completion
// Usage: https://github.com/inboundnow/cta/blob/master/shared/docs/analytics.events.md#form_before_submission
// Adding the callback
function form_after_submission_function( data ) {
var data = data || {};
// filter form data
};
// Hook the function up the the `form_after_submission` event
_inbound.add_action( 'form_after_submission', form_after_submission_function, 10 );
@atwellpub
atwellpub / geotargeting-popups-with-wordpress.md
Last active April 5, 2017 02:57
Getting started Geo-targeting Popups with WordPress
@atwellpub
atwellpub / search-and-filter-plugin.php
Last active March 26, 2017 22:49
This file extends the Search and Replace Plugins's tag filters into the WordPress Jupiter theme's 'View More Posts' button. This file is located in /wp-content/themes/jupiter/framework/functions/search-and-filter-plugin.php and is included by, as of 2/26/2017, the main Jupiter functions.php file around line 238.
<?php
class Codeable_Modifications_Search_And_Filter_Support {
/**
* Initialize Class
*/
public function __construct() {
//add_action('after_setup_theme' , array( __CLASS__ , 'remove_hooks' ));
self::remove_hooks();
@atwellpub
atwellpub / functions.php
Last active May 6, 2023 21:10
Juptiter WordPress theme. Custom redirect after login.
<?php
/**
* Redirect admins to the dashboard and other users to //kmizs.com/user/
*/
add_filter( 'login_redirect', 'codeable_custom_login_redirect', 11, 3 );
function codeable_custom_login_redirect( $redirect_to, $request, $user ) {
if ( is_array( $user->roles ) ) {
if ( in_array( 'administrator', $user->roles ) ) {