Remove action from private_file_default_handlers.class.php

Home Forums Feature Requests Remove action from private_file_default_handlers.class.php

Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #601184
    it2b
    Participant

    How can remove this action from that file in another plugin?:

    add_action('cuar/private-content/files/render-select-method?id=ftp-folder', array(&$this, 'render_ftp_folder_form'));

    Thanks.

    #601190

    Hi,

    The best thing to do is not to remove that action, but to remove the FTP Folder method from the list of known methods.

    add_filter('cuar/private-content/files/select-methods', 'wpca_custom_select_methods');
    function wpca_custom_select_methods($methods) {
        unset($methods['ftp-folder']);
        return $methods;
    }
    

    Have a nice day!

    Please, write a review on wordpress.org πŸ˜‰

    #601233
    it2b
    Participant

    Thanks for your answer, and isn’t there a way to eliminate the action?

    I overwrite that action in the external plugin, and now I need to delete the old one so that it doesn’t appear twice

    Thanks

    #601234

    Hi,

    Currently not, as the $default_handlers which is refered to by the filter is a private member of the class CUAR_PrivateFileAddOn.

    What is your intention? Just changing the way things are displayed? Or removing it altogether?

    Regards,

    Have a nice day!

    Please, write a review on wordpress.org πŸ˜‰

    #601241
    it2b
    Participant

    Remove it completely to just call the new one

    Regards,

    #602045
    it2b
    Participant

    is there any way?

    Regards,

    #602496

    You simply want to change the UI? Don’t you?

    Have a nice day!

    Please, write a review on wordpress.org πŸ˜‰

    #602550
    it2b
    Participant

    yes, I don’t want that action to be shown

    #602830

    Then use the snippet :

    add_filter('cuar/private-content/files/select-methods', 'wpca_custom_select_methods');
    function wpca_custom_select_methods($methods) {
        unset($methods['ftp-folder']);
        return $methods;
    }

    Have a nice day!

    Please, write a review on wordpress.org πŸ˜‰

    #602922
    it2b
    Participant

    Thanks, but if I use the snippet, the custom action for ftp will not be shown

    Regards,

    #602932

    You said you did not want to show it ?!

    yes, I don’t want that action to be shown

    Have a nice day!

    Please, write a review on wordpress.org πŸ˜‰

    #602950
    it2b
    Participant

    I don’t want the plugin action to be shown, but I want the custom action that I call in the external plugin to be displayed

    #603247

    That cannot be done the way you want to do it.

    However, I suggest you read our template system documentation.

    You will see that any HTML produced by our plugin can be customized. So you can change the way the FTP folder method is rendered by simply overriding a file.

    The file you will want to target is private-attachments-add-ftp-folder-admin.template.php

    You can find the original file in the plugin folder customer-area\src\php\core-addons\private-file\templates

    You can copy that file to wp-content/customer-area/templates as indicated in the documentation.

    Have a nice day!

    Please, write a review on wordpress.org πŸ˜‰

    #603672
    it2b
    Participant

    thanks, i have already done that to show it customized, but now what i want to do is customize the render_ftp_folder_form function

    #603693

    You can’t. You can however put your code in the template file, it will get executed too.

    Have a nice day!

    Please, write a review on wordpress.org πŸ˜‰

    #603767
    it2b
    Participant

    Ok, thank you very much for your time, greetings

Viewing 16 posts - 1 through 16 (of 16 total)
  • You must be logged in to reply to this topic.