Patched install
This commit is contained in:
parent
8f600e17c6
commit
11a9e60c39
|
@ -16,6 +16,9 @@
|
|||
*/
|
||||
function install_woocommerce() {
|
||||
|
||||
global $woocommerce;
|
||||
$woocommerce = &new woocommerce();
|
||||
|
||||
// Define post types before we start
|
||||
woocommerce_post_type();
|
||||
|
||||
|
|
|
@ -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
|
||||
**/
|
||||
|
|
|
@ -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'
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue