Skip to content

Instantly share code, notes, and snippets.

Firestorm Graphics Firestorm-Graphics

Block or report user

Report or block Firestorm-Graphics

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
@Firestorm-Graphics
Firestorm-Graphics / functions.php
Created Aug 21, 2017 — forked from yojance/functions.php
Removing a Product From The Cart Programatically In WooCommerce
View functions.php
<?php
add_action( 'template_redirect', 'remove_product_from_cart' );
function remove_product_from_cart() {
// Run only in the Cart or Checkout Page
if( is_cart() || is_checkout() ) {
// Set the product ID to remove
$prod_to_remove = 56;
// Cycle through each product in the cart
foreach( WC()->cart->cart_contents as $prod_in_cart ) {
@Firestorm-Graphics
Firestorm-Graphics / README.txt
Created Jul 17, 2017
fb-callback.php corrections to split first name and last name, also replace token->generate() with new uuid function
View README.txt
replace fb-callback.php, we have split the first and last names so they register in database seperately,
changed password generation slightly to use random uuid as part of phase out of old Token::generate();
TODO: Shouldnt we realy force the user to set a password on first login ? Shouldnt we require user to verify email aswell?
maybe we could do both in one email? user registers via fb -> receives verify email with link to create new password -> user creates password which verifys account
add the above generate_uuid4() function to us_helpers.
which incidently can be used in admin_backup.php to name the zips like: b6b42970-a25d-4bf8-b782-92fc3b5e7338
@Firestorm-Graphics
Firestorm-Graphics / Hooks.php
Created Jul 14, 2017
Hooks for userspice 4
View Hooks.php
<?php
/*
UserSpice 4
An Open Source PHP User Management System
by the UserSpice Team at http://UserSpice.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
@Firestorm-Graphics
Firestorm-Graphics / autoloader.php
Created Jul 7, 2017
Here’s an autoloader class I came up with for one of my framework-free PHP projects. Autoloading is a way to let PHP know how you’ve architected your class file locations hierarchy by supplying it with a function to run. This function will handle the including of the class file. This is awesome because we don’t need to hard code every file inclu…
View autoloader.php
<?php
class Autoloader {
static public function loader($className) {
$filename = "Classes/" . str_replace("\\", '/', $className) . ".php";
if (file_exists($filename)) {
include($filename);
if (class_exists($className)) {
return TRUE;
}
}
@Firestorm-Graphics
Firestorm-Graphics / Autoloader.php
Last active Jul 16, 2017 — forked from Nilpo/Autoloader.php
A simple recursive PHP autoloader using the RecursiveDirectoryIterator.
View Autoloader.php
<?php
/*
* The MIT License (MIT)
*
* Copyright (c) 2014 Rob Dunham
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
View class.autoloader.php
<?php
/*
UserSpice 4
An Open Source PHP User Management System
by the UserSpice Team at http://UserSpice.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
View Shuttle_Dumper.php
<?php
//bold("<br><br>Shuttle Dumper included");
/**
* Abstract dump file: provides common interface for writing
* data to dump files.
*/
abstract class Shuttle_Dump_File {
/**
* File Handle
*/
@Firestorm-Graphics
Firestorm-Graphics / example.html
Last active Aug 7, 2016 — forked from kylebarrow/example.html
Prevent links in standalone web apps opening Mobile Safari
View example.html
<!DOCTYPE html>
<head>
<title>Stay Standalone</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<script src="stay_standalone.js" type="text/javascript"></script>
</head>
<body>
<ul>
<li><a href="http://google.com/">Remote Link (Google)</a></li>
View example-list.js
/**
* plugin.js
*
* Copyright, Moxiecode Systems AB
* Released under LGPL License.
*
* License: http://www.tinymce.com/license
* Contributing: http://www.tinymce.com/contributing
*/
View example-list.js
/**
* plugin.js
*
* Copyright, Moxiecode Systems AB
* Released under LGPL License.
*
* License: http://www.tinymce.com/license
* Contributing: http://www.tinymce.com/contributing
*/
You can’t perform that action at this time.