It looks like the $args passed to the function is not an object for some reason. I can’t see the origin of this problem but for a quick solution, you can add $args = (object) $args; before the first time you use $args, here on line 44
Also, as commented by toscho, dropdown_menu() is not a valid function in wordpress core
Related Posts:
- add_action in namespace not working
- Does an activated plugin automatically mean its methods are available to other WP functions?
- Best way to extends core classes in theme?
- OOP Plugin Development. Including external object
- WP Plugin + OOP: Adding Menu Page doesn’t create required effect
- Initiate only latest version of a class
- How to do conditional publishing?
- Extend a class of a plugin
- Shortcode Inside Class Not Working
- How to get media objects
- Use object in template part
- database interactions using OOP
- Customizer – Prefix Class Extension
- Extending the WP_Widget_Text class
- How to prevent XSS alter custom global javascript object & methods in WordPress
- Extend Woocommerce Widget Class – WC_Widget_Product_Categories
- Undefined method class::construct() when creating a plugin
- How can I access string value in an array?
- Need oop for wordpress theme? [duplicate]
- Usage of call back function of add_meta_box()
- Why is a wp function used in current PHP namespace’s callback not resolved to global scope?
- Cant register rest routs from class instance
- Check class_exists before class definition / Doxygen problem
- PHP Helper Class to create shortcodes
- Class property seems to lose scope, attached to save_post action?
- Get options from database using php class
- OOP PHP class extends TwentyTwenty_Customize in Child Theme
- add_action in namespace not working
- Call to “admin_notices” hook from a static method
- Use PHP Class in WordPress functions
- can I extend the WP_Query class to deal with ‘duplicate’ posts created by joining to wp_posts?
- Access variable from another class that was passed in constructor
- How to add typehints to function in functions.php when argument is an object?
- Proper use of Output Buffer for a whole php clas
- Calling WordPress hook from within a class: call to undefined function error
- PHP calling function within a class
- What is wrong with assigning values to a WP_List_Table class?
- calling a function from a class in your template
- Property value of null when value is assigned inside a method hooked to the wp action hook
- How to execute add_action() function from custom plugin to Crontrol plugin or do_action()?
- Issues separating my Plugin pages into different files
- $_html is empty when var dumped
- Reposition WooCommerce breadcrumb outside of wrapper content
- How can I access the “description” of a menu item?
- How do I know what variables are passed in a filter/action and what their meaning is?
- Wrap each shortcode in array to div
- How can I change WordPress domain from remote to localhost?
- Notify WordPress Site I Have Linked To Them
- SQL QUERY – Select a value directly from the database
- Swapping wp_dropdown_categories function with wp_category_checklist
- Use custom post type for a store locator
- Most efficient way to use classes to create admin pages using Settings API
- How to change menu order item
- Unique session WordPress
- get_users meta_query: REGEXP not working for matching new lines
- Started getting warning message following host’s PHP upgrade
- Where does “rel=0” get removed from my YouTube parameters?
- Custom array from a query only write the last row of the query
- Ajax button not working
- PHP if statement works in template files, but not header
- How do I populate custom field with current user role in Woocommerce [closed]
- Large WordPress CRON job
- WordPress query undefined offset in loop
- Divi change project category slug
- Can’t upload CSV file to plugin directory using custom upload form in admin panel
- Custom route and query
- In WordPress, I want to run a loop to get posts in tabular format
- Automatically generator a WordPress installation on my subdomain
- Get URL of Featured Image After wp_insert_post()
- WP_Query() load selected post
- custom stripe plugin
- Call to undefined function error in plugin
- Creating a Category Taxonomy
- WordPress Custom Hook with Class method
- How to add a CSS class to this php code [closed]
- population category dropdown and sub category onselect
- Using Google Analytics in an enqueued JS file
- How to put variable in array, wp_insert_post?
- Use CSS tag inside PHP code
- Get field value and use as variable in php
- Filter portforlio with librairie isotop
- Remove specific javascript when viewing page in Customizer?
- Priority call methods – PHPMailer->addAddress(NULL)
- Renaming “Expand Details” within “Add Media”
- Custom Taxonomy as Link
- How to use PHP code with wordpress page
- Second foreach in the loop returns bool(false) though array is present
- adsense code showing on random post thumb
- if is_bbPress register jquery
- Why I can download any file except PHP files from a URL but I can download any from another site?
- How to extend the page editor?
- Hide empty categories from get_categories
- Make a permalink to the most recent blog post
- How to automatically convert images to WebP on WordPress?
- Font Awesome Icons as squares [closed]
- index.php changed on its own
- Exclude a category ID from the following function
- How to get default variation ID (woocommerce)
- wordpress media library description column
- I have issue with decoding json ex. ‘{“a”:”b”}’