Patched install

This commit is contained in:
Mike Jolley 2011-09-06 16:22:53 +01:00
parent 8f600e17c6
commit 11a9e60c39
3 changed files with 14 additions and 1 deletions

View File

@ -16,6 +16,9 @@
*/
function install_woocommerce() {
global $woocommerce;
$woocommerce = &new woocommerce();
// Define post types before we start
woocommerce_post_type();

View File

@ -288,6 +288,16 @@ if (!isset($_SERVER['REQUEST_URI'])) {
if (isset($_SERVER['QUERY_STRING'])) { $_SERVER['REQUEST_URI'].='?'.$_SERVER['QUERY_STRING']; }
}
/**
* Fix 'insert into post' buttons for images
**/
add_filter('get_media_item_args', 'woocommerce_allow_img_insertion');
function woocommerce_allow_img_insertion($vars) {
$vars['send'] = true; // 'send' as in "Send to Editor"
return($vars);
}
/**
* Currency
**/

View File

@ -166,7 +166,7 @@ function woocommerce_post_type() {
'hierarchical' => true,
'rewrite' => false,
'query_var' => true,
'supports' => array( 'title', 'custom-fields', 'page-attributes', 'thumbnail' ),
'supports' => array( 'title', 'editor', 'custom-fields', 'page-attributes', 'thumbnail' ),
'show_in_nav_menus' => false,
//'show_in_menu' => 'edit.php?post_type=product'
)