Skip to content

Instantly share code, notes, and snippets.

View barrykooij's full-sized avatar
:shipit:
I may be slow to respond.

Barry Kooij barrykooij

:shipit:
I may be slow to respond.
View GitHub Profile
<?php
/**
* Setup some data
*/
// get the post type
$post_type = get_post_type( get_the_id() );
// The settings object
$pt_settings = RP4WP()->settings[ 'general_' . $post_type ];
/**
function pc_theme_setup() {
add_image_size( 'pc_image_custom', 300, 300, true ); // width: 300, height: 300 - feel free to change these values
}
add_action( 'after_setup_theme', 'pc_theme_setup' );
function pc_thumbnail_size( $size ) {
return 'pc_image_custom';
}
@barrykooij
barrykooij / dlm-cookie-on-email.php
Created December 7, 2017 14:11
Set dlm_mailchimp_email cookie on $_GET['email'] request
.wpcm-vehicle-listings .wpcm-vehicle-results-wrapper .wpcm-vehicle-results li.wpcm-listings-item a .wpcm-listings-item-description {
padding-left: 133px !important;
}
.wpcm-vehicle-listings .wpcm-vehicle-results-wrapper .wpcm-vehicle-results li.wpcm-listings-item a .wpcm-listings-item-image-wrapper {
width: 133px !important;
}
.wpcm-vehicle-listings .wpcm-vehicle-results-wrapper .wpcm-vehicle-results li.wpcm-listings-item a .wpcm-listings-item-image-wrapper {
width: 350px !important;
height: 350px !important;
}
.wpcm-vehicle-listings .wpcm-vehicle-results-wrapper .wpcm-vehicle-results li.wpcm-listings-item a .wpcm-listings-item-description {
padding-left: 350px !important;
}
.wpcm-vehicle-listings .wpcm-vehicle-results-wrapper .wpcm-vehicle-results li.wpcm-listings-item a {
.wpcm-share-this ul, .wpcm-share-this ul li {
list-style: none !important;
padding: 0 15px 0 0 !important;
}
.wpcm-share-this ul li:before {
width: 0 !important;
height: 0 !important;
}
<?php
if ( ! defined( 'WP_USE_EXT_MYSQL' ) ) {
define( 'WP_USE_EXT_MYSQL', false );
}
.wpcm-vehicle-listings .wpcm-vehicle-results-wrapper .wpcm-vehicle-results li.wpcm-listings-item a:hover {
background-color: transparent !important;
}
function dlm_custom_cpt_args( $args ) {
$args['exclude_from_search'] = false;
return true;
}
add_filter( 'dlm_cpt_dlm_download_args', 'dlm_custom_cpt_args' );
$aam = new Dlm_Aam_Access_Manager();
if ( $aam->has_access_to_download( $dlm_download ) ) {
// has access
} else {
// no access
}