Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • in reply to: Hide some Kleo metabox #12716
     gazwal
    Participant

    any PHP expert that could help me remove an action inside a method function , under a CLASS ?
    /kleo-framework/lib/class-multiple.sidebars.php :

    COPY CODE
    
    class sidebar_generator {
    	function sidebar_generator(){
    		add_action('init',array('sidebar_generator','init'));
    		add_action('admin_menu',array('sidebar_generator','admin_menu'));
    		add_action('admin_print_scripts', array('sidebar_generator','admin_print_scripts'));
    		add_action('wp_ajax_add_sidebar', array('sidebar_generator','add_sidebar') );
    		add_action('wp_ajax_remove_sidebar', array('sidebar_generator','remove_sidebar') );
    			
    		//edit posts/pages
    		add_action('edit_form_advanced', array('sidebar_generator', 'edit_form'));
    		add_action('edit_page_form', array('sidebar_generator', 'edit_form'));
    		
    		//save posts/pages
    		add_action('edit_post', array('sidebar_generator', 'save_form'));
    		add_action('publish_post', array('sidebar_generator', 'save_form'));
    		add_action('save_post', array('sidebar_generator', 'save_form'));
    		add_action('edit_page_form', array('sidebar_generator', 'save_form'));
    	}
    ........
    }
    $sbg = new sidebar_generator;
    
    function generated_dynamic_sidebar($name='0'){
    	sidebar_generator::get_sidebar($name);	
    	return true;
    }
    
    in reply to: Hide some Kleo metabox #12680
     gazwal
    Participant

    ok thx, so I really need help cause I’m a poor PHP dev 🙂
    /kleo-framework/lib/class-multiple.sidebars.php is an old plugin “Sidebar generator”, seems to be rewrote by Kleo team.
    It use PHP class
    so I need to do a “remove_action from an external class”

    COPY CODE
    
    class sidebar_generator {
    	
    	function sidebar_generator(){
    ....			
    		//edit posts/pages
    		add_action('edit_form_advanced', array('sidebar_generator', 'edit_form'));
    		add_action('edit_page_form', array('sidebar_generator', 'edit_form'));
    ....
    	}
    .......
    

    I’ve found 2 articles about that:

    http://hardcorewp.com/2012/enabling-action-and-filter-hook-removal-from-class-based-wordpress-plugins/

    http://wordpress.stackexchange.com/questions/36013/remove-action-or-remove-filter-with-external-classes

    well this is to complicated to me 🙁
    help ?

Viewing 2 posts - 1 through 2 (of 2 total)

Log in with your credentials

Forgot your details?