Skip to content

Instantly share code, notes, and snippets.

Henry Weismann weismannweb

Block or report user

Report or block weismannweb

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@weismannweb
weismannweb / ld-auto-mark-complete.php
Created Nov 9, 2018
Auto complete learndash topics and lessons
View ld-auto-mark-complete.php
//thanks to https://gist.github.com/sultann/24baa5483b4632c3cf214a8de5648204#file-ld-auto-mark-complete-php-L17 for most of
//this code, i just corrected it to work with ld_lesson_tag to grab the tags as the original version returned empty
//array since it was looking for standard wp tags
function ld_is_tagged($postId) {
//get all learndash tags on post
$tags = wp_get_post_terms($postId,'ld_lesson_tag');
foreach ($tags as $tag) {
//need to check for auto-mark-complete tag exists on this post
@weismannweb
weismannweb / add-to-functions.php
Created Nov 2, 2018
Fix to remove 2nd bootstrap for Download Accordion FAQ Wordpress plugin when theme already has bootstrap
View add-to-functions.php
/**
* Dequeue the 2nd bootstrap script added by accordian plugin
*
* Hooked to the wp_print_scripts action, with a late priority (100),
* so that it is after the script was enqueued.
*/
function second_bootstrap_dequeue_script() {
wp_dequeue_script( 'wpsm_ac_bootstrap-js-front' );
}
add_action( 'wp_print_scripts', 'second_bootstrap_dequeue_script', 100 );
@weismannweb
weismannweb / cache_category_data.xml
Last active Aug 17, 2019
Caches category data for Opencart 3.0 to make it faster. Opencart installs with alot of categories are really slow. http://forum.opencart.com/viewtopic.php?f=161&t=126241
View cache_category_data.xml
<modification>
<id>Cache category data to speed up page load for store with many categories and sub categories.</id>
<version>1.0.1</version>
<vqmver>2.3.2</vqmver>
<author>Weismann Web - www.weismannweb.com</author>
<file name="catalog/controller/extension/module/category.php">
<operation>
<search position="after"><![CDATA[
@weismannweb
weismannweb / cache_category_data.xml
Last active Jun 23, 2018
Caches category data for Opencart 1.5 to make it faster. Opencart installs with alot of categories are really slow. http://forum.opencart.com/viewtopic.php?f=161&t=126241 here is a new version for Opencart 3.0: https://gist.github.com/weismannweb/8add8fab5be99854db5c618d751281b2
View cache_category_data.xml
<modification>
<id>Cache category data to speed up page load for store with many categories and sub categories.</id>
<version>1.0.1</version>
<vqmver>2.3.2</vqmver>
<author>Weismann Web - www.weismannweb.com</author>
<file name="catalog/controller/module/category.php">
<operation>
<search position="after"><![CDATA[
You can’t perform that action at this time.