From the error message, it appears that your prior iteration made use of the looser nature of PHP5:
Too few arguments to function printDirectory(), 3 passed … and
exactly 4 expected in …
I see that you define printDirectory() with four parameters:
- $url
- $root
- $path
- $sort
The first time you call this function, you pass all four parameters. Unfortunately, when you call it recursively (within the function itself) you only pass three of the four.
$sRtn .= printDirectory($url, $root, $path . "https://wordpress.stackexchange.com/" . $f);
Try passing the $sort variable in that recursive call.
Related Posts:
- Using plugin functionality in external php script not working
- Fatal error: Call to undefined function cmsms_theme_page_layout_scheme()
- Fatal error “Call to undefined function is_plugin_active” each time the plugin is activated
- is_plugin_active() not defined on active plugin, in the thumbnails.php file
- How to create an input field, and base the output on spreadsheet data? [closed]
- Facebook Messager Plugin
- Nested shortcode functions accessing variable
- Calling an attribute from a plugin shortcode
- How to call WordPress function other files
- Why “Call to a member function on a non-object” in plugin only?
- All sites themes functions.php have been changed
- Customize permalink wordpress category id
- Conditional attributes and logic per product category
- Disqus deleted comments are syncing with wordpress but active comments do not
- Admin style for just one plugin in dashboard
- WP Query. Is there a maximum size?
- How to remove custom post type and add category and post name
- Grab WordPress Salt Data From URL
- Ajax : Call undefined function plugin_function() … can’t call any plugin function
- WordPress get_avatar function not correct working
- WordPress metaboxes – textfield suggestion automatically populated
- bbPress plugin: forum lists not showing in correct order? [closed]
- Which file of wordpress manage plugins functionalities?
- Fatal error can’t activate a plugin [closed]
- How to create an option page for this simple plugin
- Difference and examples of esc_attr__() and esc_attr_e()
- How to set Noindex to all wordpress pages in a catergory?
- Redirect to another page using contact form 7? [closed]
- What is @Action in WordPress?
- Improving the perfomance of a plugin action
- Display Custom Field Value on Admin Page Column
- List the authors that have written posts in a category
- Load Javascript from Plugin in One Page Only?
- Is there a best practice remediation for PhpStorm’s warning that void function the_post_thumbnail is used?
- the_tags : can we insert a class
- Cannot access my wp-admin after installing Gzip compression [closed]
- How to over-ride a file in a plugin? [closed]
- Overwrite category head title
- Plugin is a widget, but I want to call it in the head, can I?
- How to get plugin name from plugin file location
- Check if variable is set in filter
- Cannot get wpdb data (Error in a simple fuction) [closed]
- How to prevent additional code in functions.php to be removed once there is an update?
- Checking the count within a foreach loop
- execute function after one completed
- How to keep variable `$post` to using in another file
- WordPress checkbox and Illegal string offset
- Invalid plugin installation directory, Google Analytics [closed]
- Image change on hover
- Passing stored variables to add_filter
- How to prevent PHP fatal error if plugin hasn’t been enabled and a method is called in theme file?
- Create a post builder skin in a plugin
- Plugin Development – Functions or Hooks?
- Proper way to use plugin functions in functions.php
- Undefined index: action plugin problem
- PHP script from functions php is loaded via admin-ajax to div…and the result is 0, not the desired content
- How to reset the plugins without deactivate the plugin
- plugins_url() works everywhere but wp_reqister_script()
- JQuery prepend a function
- Basics of changing plugin output
- Adding class to last list item? Not WP generated
- Replacing global wp_query
- Why can’t I call a (member) function from within a foreach?
- Are there action hooks for comments?
- Help with WP Business Directory Manager Plugin?
- I changed .live() to .on() but change is not reflected on the server
- wp_dequeue_script for a Plugin
- Need to replace Currency Shortforms
- wp_enqueue_scripts
- Return multiple values in a shortcode attribute
- Fatal error on some pages after cancelling WPSTAGING cloning process
- get specific value of a array | PHP
- How to get specific string/value from an array? php [closed]
- There has been a critical error on your website – won’t fix no matter what
- Shortcode Attributes to Return different $_POST
- How to make a dynamic css class whose name changes every visit to confuse scraper
- Plugin onclick button activate other plugin
- wc_get_template new template does not showing up
- WordPress Stock Update Programatically
- Loading a plugin’s js file from functions.php
- How can I fetch data from another website to my wordpress website with mysql database
- Activate and deactivate plugin automatically
- add_query_arg not work in admin
- Woocommerce singe product custom gallery output works just on the first slide
- Overriding an Array in a Plugin’s Class/Function from functions.php
- Send email with list of active plugins upon activation/deactivation
- Using custom fields for image alt and title
- How do I create a custom permalink structure for a page template
- Where Should i write the code for wordpress ajax voting?
- How to remove a class function from a plugin by using remove_action()?
- Error with get_price (and others) in self-written plugin to show price
- Getting a ressource ID, from a WC_Order_Item_Product/Order
- How to translate wordpress error message
- dynamic name of the style for wp_enqueue_style
- Api external with wordpress
- strange shortcode error: does shortcodes requires any dependency?
- All custom widgets are not showing in widget area at the same time
- Set up functions to be overridden without using function_exists() by short-circuiting them?
- WordPress function to add text warning on every pages [closed]
- How do I convert my WordPress website to be domain agnostic?