Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="https://www.w3.org/1999/xhtml" style="margin: 0; padding: 0; font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;">
<head style="margin: 0; padding: 0; font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;">
<!-- If you delete this tag, the sky will fall on your head -->
<meta name="viewport" content="width=device-width" style="margin: 0; padding: 0; font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" style="margin: 0; padding: 0; font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;">
<title style="margin: 0; padding: 0; font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;">{EMAIL_SUBJECT}</title>
</head>
<body bgcolor="#FFFFFF" style="margin: 0; padding: 0; font-family: 'Oswald'; -webkit-font-smoothi
@font-face {
font-family: 'star';
font-display: swap;
src: url('/wp-content/plugins/woocommerce/assets/fonts/star.woff') format('woff');
}
@fovoc
fovoc / hbapicheck.php
Created June 23, 2018 09:20 — forked from JRMorris77/hbapicheck.php
Hummingbird API Quick Diagnostics
<?php
/**
* Script Name: Hummingbird API Quick Diagnostics
* Script URI: https://premium.wpmudev.org/
* Description: Misc diagnostic tools used by WPMU DEV SLS Tech Support
* Author: James Morris @ WPMU DEV
* Version: 0.1
* Author URI: https://premium.wpmudev.org/
*
*/
@fovoc
fovoc / create-admin-user.php
Last active October 20, 2017 14:12 — forked from wpscholar/create-admin-user.php
Create a new admin user in WordPress via code. Drop this file in the mu-plugins directory and update the variables, then load a page in WordPress to create the user. Remove the file when done.
<?php
add_action( 'init', function () {
$username = 'admin';
$password = 'password';
$email_address = 'webmaster@mydomain.com';
if ( ! username_exists( $username ) ) {
$user_id = wp_create_user( $username, $password, $email_address );
@fovoc
fovoc / single-jbp_job.php
Created July 9, 2017 17:15
Jobs&Experts plugin & Listify theme
<?php
/**
* Template Name: Layout: Full Width
*
* @package Listify
*/
get_header(); ?>
<div <?php echo apply_filters( 'listify_cover', 'page-cover', array( 'size' => 'full' ) ); ?>>
@fovoc
fovoc / index.html
Last active May 24, 2017 11:49 — forked from anonymous/double-line-subtitles.markdown
Double Line Subtitles
<article>
<h1>Main Title</h1>
<p class="subtitle fancy"><span>A fancy subtitle</span></p>
</article>
@fovoc
fovoc / api.php
Created December 20, 2016 19:27
WPMUDEV M2PRO API theme use example
<?php
/**
* If you want to use M2 API in theme's functions.php try the following method.
* Calling ms_init hook will work from plugins and mu-plugins, as this hook is not designed to work from a theme.
*/
add_action( 'init', 'my_api_hook', 99, 1 );
function my_api_hook() {
// Assume user ID is 3
@fovoc
fovoc / 1-instructions.txt
Created October 21, 2016 14:03 — forked from bappi-d-great/1-instructions.txt
Add custom field in M2 registration form (Basic) WPMU Membership2
### We are adding telephone number as custom field
1. Go to /wp-content/plugins/membership/app/view/templates/ and copy all 4 files.
2. Go to /wp-content/themes/YOUR_CURRENT_THEME/ and create a new folder called membership2, then paste all 4 files inside the new created membership2 folder
3. Open membership_registration_form.php and put the following: membership_registration_form.php
4. Now open the membership_account.php file and put the following: membership_account.php
5. Finally need to add some code: mu-plugin.php
## You can add those codes in your functions.php in the theme,
## if you think your theme won’t be changed. Otherwise mu-plugins is the best solution.
@fovoc
fovoc / code.php
Created September 25, 2016 07:28 — forked from bappi-d-great/code.php
WPMU Membership assign membership based on role on registration
<?php
add_action( 'user_register', 'assign_membership_on_register', 10, 1 );
function assign_membership_on_register( $user_id ) {
$membership = array(
// 'role' => 'membership ID'
'abc' => 123,
'xyz' => 456
);
@fovoc
fovoc / code.php
Created September 22, 2016 07:35 — forked from bappi-d-great/code.php
WPMU Membership 2: Adding more column in billing table and sorting example
<?php
/**
* Example: Member first name and last name and sorting ASC and DESC
*/
add_filter( 'ms_helper_listtable_billing_get_columns', function( $columns, $currency ) {
$columns['first_name'] = 'First Name';
$columns['last_name'] = 'Last Name';