This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$count = 0; | |
echo '<ul>'; | |
foreach ( $tickets as $ticket ) { | |
global $product; | |
$count++; | |
if ( class_exists( 'WC_Product_Simple' ) ) $product = new WC_Product_Simple( $ticket->ID ); | |
else $product = new WC_Product( $ticket->ID ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Please see https://github.com/Lewiscowles1986/WordPressSVGPlugin from now on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for uid in $(wp user list --field=ID) | |
do | |
pass=`< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-32}` | |
wp user update $uid --user_pass="$pass" | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<templateSet group="WordPress"> | |
<template name="aa" value="add_action( '$hook$', '$callback$' ); $END$" description="add_action" toReformat="false" toShortenFQNames="true"> | |
<variable name="hook" expression="" defaultValue="" alwaysStopAt="true" /> | |
<variable name="callback" expression="" defaultValue="" alwaysStopAt="true" /> | |
<context> | |
<option name="HTML_TEXT" value="false" /> | |
<option name="HTML" value="false" /> | |
<option name="XSL_TEXT" value="false" /> | |
<option name="XML" value="false" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Hide editor on specific pages. | |
* | |
*/ | |
add_action( 'admin_init', 'hide_editor' ); | |
function hide_editor() { | |
// Get the Post ID. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Mod Default Query | |
* | |
* get at the default query and make your changes before the template ( or whatever is run ) | |
* | |
*/ | |
function ahso_default_query_mods( $query ) { | |
// use conditional tags | |
if ( is_tax('work_cat') ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Customize Admin toolbar if you do desiced to keep it around... | |
function change_toolbar($wp_toolbar) { | |
$wp_toolbar->remove_node('comments'); | |
$wp_toolbar->add_node(array( | |
'id' => 'myhelp', | |
'title' => 'Help', | |
'meta' => array('target' => 'help') | |
)); | |
$wp_toolbar->add_node(array( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Remove Meta-Boxes from Posts & Pages Editor Screens | |
function remove_extra_meta_boxes() { | |
remove_meta_box( 'postcustom' , 'post' , 'normal' ); // custom fields for posts | |
remove_meta_box( 'postcustom' , 'page' , 'normal' ); // custom fields for pages | |
remove_meta_box( 'postexcerpt' , 'post' , 'normal' ); // post excerpts | |
remove_meta_box( 'postexcerpt' , 'page' , 'normal' ); // page excerpts | |
remove_meta_box( 'commentsdiv' , 'post' , 'normal' ); // recent comments for posts | |
remove_meta_box( 'commentsdiv' , 'page' , 'normal' ); // recent comments for pages | |
remove_meta_box( 'tagsdiv-post_tag' , 'post' , 'side' ); // post tags |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Remove any unwanted widgets... | |
* | |
* WP_Widget_Pages = Pages Widget | |
* WP_Widget_Calendar = Calendar Widget | |
* WP_Widget_Archives = Archives Widget | |
* WP_Widget_Links = Links Widget | |
* WP_Widget_Meta = Meta Widget | |
* WP_Widget_Search = Search Widget |
NewerOlder