Support » Plugin: Polylang » Documentation for ppl_

  • Fleuv

    (@fleuv)


    Documentation is missing for ppl_${$class} filters.

    The following array is iteratively applying filters so you can use your own class instead of the default PLL_Admin_${$class}.

    
    $classes = array( 'Filters', 'Filters_Columns', 'Filters_Post', 'Filters_Term', 'Nav_Menu', 'Sync', 'Classic_Editor' );
    foreach ($classes as $class) { add_filter(...) }
    

    Have a look at the add_filters method near line 97 in file ./polylang/admin/admin.php

    When I do something like this:

    
    class MyClass {}
    add_filter('pl_nav_menu', 'MyClass');
    

    Than I get: Fatal error: Uncaught Error: Class name must be a valid object or a string in admin.php on line 117

    Seems like I still have to include my class somewhere.

    Please update the documentation regarding this filter.

    • This topic was modified 1 year ago by Fleuv.
    • This topic was modified 1 year ago by Fleuv.
    • This topic was modified 1 year ago by Fleuv. Reason: grammar
  • The topic ‘Documentation for ppl_’ is closed to new replies.