Plugin Directory

Changeset 2870559


Ignore:
Timestamp:
02/24/2023 11:18:07 AM (3 years ago)
Author:
codingmall
Message:

Bug fixed. It works fine with WordPress 6.1.1

Location:
multistore-multivendor/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • multistore-multivendor/trunk/index.php

    r2581737 r2870559  
    66Author: CodingMall.com
    77Author URI: https://codingmall.com/wordpress/
    8 Version: 1.0.0
     8Version: 1.1.1
    99License: GPLv2 (or later)
    1010Text Domain: cm-mswoo
     
    5050        }
    5151    }
     52
     53   
    5254   
    5355    private function setHooks(){
     
    5557
    5658        if (is_admin()){
     59            add_filter( 'wp_dropdown_users_args', array($this,'wpdocs_add_subscribers_to_dropdown'),10,1 );         
    5760        }else{
    5861            add_filter( 'pre_option_siteurl', array($this,'modif_url'), 10, 2 );
    5962            add_filter( 'pre_option_home',    array($this,'modif_url'), 10, 2 );
    6063           
    61             add_action('wp_loaded', array($this, 'buffer_start'));
    62             add_action('shutdown',  array($this, 'buffer_end'  ));
     64            //add_action('wp_loaded', array($this, 'buffer_start'));
     65            //add_action('shutdown',  array($this, 'buffer_end'  ));
    6366            add_action( 'woocommerce_product_query', array($this, 'modif_prod_qry') );
    6467            add_filter( 'woocommerce_product_related_posts_query',array($this,'modif_related_prods'), 10, 3);
    6568        }       
     69    }
     70
     71    function wpdocs_add_subscribers_to_dropdown( $query_args ) {
     72        //echo '<pre>';var_dump($query_args); die();
     73        $query_args['role__in'] = array( 'contributor', 'administrator' );
     74        $query_args['capability'] = [];
     75        //$query_args['role__not_in'] = array( 'editor' );
     76
     77        // Unset the 'who' as this defaults to the 'author' role
     78        unset( $query_args['who'] );
     79     
     80        return $query_args;
    6681    }
    6782
     
    89104
    90105    public function wpInit(){
    91         add_post_type_support( 'product', 'author' );
     106        add_post_type_support( 'product', array('author') );
    92107    }
    93108
    94     public function buffer_start() { ob_start(array($this, 'modifContent')); }
     109/* public function buffer_start() { ob_start(array($this, 'modifContent')); }
    95110    public function buffer_end() { @ob_end_flush(); }
    96111   
     
    100115        $content = str_replace($home,$dom,$content);
    101116        return $content;       
    102     }
     117    } */
    103118   
    104119    private function getAid($dom){
     
    112127}
    113128
    114 
  • multistore-multivendor/trunk/readme.txt

    r2581737 r2870559  
    55Requires at least: 5.0
    66Tested up to: 5.8
    7 Requires PHP: 7.0
    8 Stable tag: 1.0.0
     7Requires PHP: 7.2
     8Stable tag: 1.1.1
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    7676== Upgrade Notice ==
    7777
    78 = 1.0 =
     78= 1.1.1 = bug fixed and now compatible with WP 6.1
Note: See TracChangeset for help on using the changeset viewer.