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
npm init -y
npm install gulp browser-sync sass gulp-sass --save-dev
npm install --global gulp-cli
add_filter( 'dlm_as3_request_valid_minutes', function ( $minutes, $download, $version, $path ) {
return 60;
}, 10, 4 );
add_filter( 'dlm_as3_request_valid_minutes', function ( $minutes, $download, $version, $path ) {
return 1;
}, 10, 4 );
<?php
/**
* Default output for a download via the [download] shortcode
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
} // Exit if accessed directly
/** @var DLM_Download $dlm_download */
add_action( 'dlm_page_addon_get_category_args', function ( $args ) {
$args['orderby'] = 'ID';
$args['order'] = 'DESC';
return $args;
}, 11, 1 );
<?php
$link_manager = new RP4WP_Post_Link_Manager();
$related_posts = $link_manager->get_children( get_the_ID() );
add_filter( 'dlm_page_addon_get_category_args', function ( $args ) {
$args['parent'] = 0;
return $args;
} );
<?php
// Get the connected posts
$child_posts = Post_Connector::API()->get_children( "course", get_the_id() );
$parent_posts = Post_Connector::API()->get_parents( "course", get_the_id() );
$my_connected_posts = array_merge( $child_posts, $parent_posts );
// Check
if ( count( $my_connected_posts ) > 0 ) {
add_filter( 'pc_display_backwards_linking_same_post_type', function ( $r ) {
return true;
} );
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
} // Exit if accessed directly
// use Helper namespace in this class, do not remove
use Never5\WPCarManager\Helper;
?>
<tr>