This file contains 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 | |
/** | |
* @package Media_hacks | |
* @version 1.0 | |
*/ | |
/* | |
Plugin Name: Media hacks | |
Plugin URI: http://wordpress.org/extend/plugins/# | |
Description: This is an example plugin | |
Author: Carlo Daniele |
This file contains 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 | |
require dirname(__FILE__).'/wp-blog-header.php'; | |
$wpdb->query("DELETE FROM wp_terms WHERE term_id IN (SELECT term_id FROM wp_term_taxonomy WHERE taxonomy LIKE 'pa_%')"); | |
$wpdb->query("DELETE FROM wp_term_taxonomy WHERE taxonomy LIKE 'pa_%'"); | |
$wpdb->query("DELETE FROM wp_term_relationships WHERE term_taxonomy_id not IN (SELECT term_taxonomy_id FROM wp_term_taxonomy)"); | |
$wpdb->query("DELETE FROM wp_term_relationships WHERE object_id IN (SELECT ID FROM wp_posts WHERE post_type IN ('product','product_variation'))"); | |
$wpdb->query("DELETE FROM wp_postmeta WHERE post_id IN (SELECT ID FROM wp_posts WHERE post_type IN ('product','product_variation'))"); | |
$wpdb->query("DELETE FROM wp_posts WHERE post_type IN ('product','product_variation')"); |
This file contains 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 | |
/** | |
* WooCommerce Ajax Handlers | |
* | |
* Handles AJAX requests via wp_ajax hook (both admin and front-end events) | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly | |
/** Frontend AJAX events **************************************************/ |
This file contains 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 | |
/* | |
Plugin Name: Periods in Title | |
Version: 1.0 | |
Description: Allows periods to appear in post/category URIs | |
Author: Mark Jaquith | |
Plugin URI: http://txfx.net/code/wordpress/periods-in-titles/ | |
Author URI: http://txfx.net/ | |
*/ |
This file contains 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 | |
/** | |
* Tab Title filters do not work with WooCommerce 1.6.5.1 or lower | |
* Please download this zip file http://cl.ly/2Y3S3D3M3C23 , extract the 3 files and copy them to : | |
* wp-content/themes/YOUR_THEME/woocommerce/single-product/tabs/ | |
**/ | |
add_filter ( 'woocommerce_product_description_tab_title', 'custom_product_description_tab_title' ) ; | |
function custom_product_description_tab_title() { |
This file contains 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 | |
/** | |
* post-process.php | |
* make sure to include post-process.php in your functions.php. Use this in functions.php: | |
* | |
* get_template_part('post-process'); | |
* | |
*/ | |
function do_insert() { | |
if( 'POST' == $_SERVER['REQUEST_METHOD'] |