Skip to content

Instantly share code, notes, and snippets.

View elearningplugins's full-sized avatar

Brian Batt elearningplugins

View GitHub Profile
@elearningplugins
elearningplugins / function.php
Created June 20, 2023 16:10
Adds a custom button to Oxygen Builder's TinyMCE editor for "rich text"
<?php
/**
* Plugin Name: My Custom Button
* Description: This is a plugin that adds a custom button to the Oxygen Builder's TinyMCE editor.
* Version: 1.0.0
* Author: Your Name
*/
function custom_button_plugin() {
if (!current_user_can('edit_posts') && !current_user_can('edit_pages')) {
@elearningplugins
elearningplugins / gist:4783b0b4bdec3f94ced3d9bd62cbf6dd
Created May 1, 2023 22:52
AFL WC UTM First Referrer and Landing Page
<?php
/*
Plugin Name: AFL WC UTM First Referrer and Landing Page
Description: Adds the "First Website Referrer" and "First Landing Page" attributes as columns on the page=afl-wc-utm-reports.
Author: Brian Batt
Version: 1.0
*/
if (!defined('ABSPATH')) {
exit; // Exit if accessed directly.
@elearningplugins
elearningplugins / README.md
Created March 31, 2022 23:19 — forked from flesch/README.md
Fake SCORM API

Fake SCORM API

Some courses won't work outside of an LMS. That's annoying when you just want to review a course, so drop this in to provide a fake SCORM API implementation - getAPI should then pick up this fake API.

require 'selenium-webdriver'
driver = Selenium::WebDriver.for :chrome
wait = Selenium::WebDriver::Wait.new(:timeout => 15)
driver.manage.window.maximize
url = "https://mywebsite.com"
contact_case_url = url + "/support/contact/case"
driver.get url
driver.manage.timeouts.implicit_wait=(10)
driver.get contact_case_url
//- (void)playerViewDidBecomeReady:(nonnull YTPlayerView *)playerView{
// NSLog(@"Ready to play");
//[playerView setPlaybackQuality:kYTPlaybackQualitySmall];
// self.playerView.tag = 1;
// [self.playerView playVideo];
//}
- (void)playerViewDidBecomeReady:(YTPlayerView *)playerView {
TMReachability *reachability = [TMReachability reachabilityForInternetConnection];
[reachability startNotifier];