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
- WordPress and event-driven programming – what is it about?
- How WordPress encrypt password? [duplicate]
- Retrieve POST data from AJAX call
- Adding a custom image upload size and making it selected by default?
- Facebook Comment Count
- Conditionally loading JavaScript based on the Advanced Custom Fields in the post
- Filter the blog title displayed in the header
- How do I show the featured images for my child pages on my parent pages?
- Converting MYSQL to WordPress $WPDB
- WP_Query loop, does not display special characters in title correctly
- Get Admin Email Address From External PHP page
- How do I get current page ID in WordPress customizer file?
- How to run a php file that uses wordpress functions from command line?
- How to check if a meta value has already been assigned to any user?
- Notice : add_theme_support( ‘post-formats’ ) was called incorrectly [closed]
- PHP, Creating a dynamic variable
- I restricted wordpress by logged users. It’s possible exclude a page?
- Metabox Not saving data
- 2nd page displaying the exact same posts as my first page (minus the very first post)
- Timthumb.php image gallery not working on Multisite WordPress
- Use get() method to grab all categories and output inside another method
- get_the_ID() doesnt work
- How do I check if there is a tag in the title
- GravityForms Limit Submission Per Time Period by User or IP by 30 minutes?
- Truncate title to single line & container width
- WordPress Rewrite Rule
- Programmatically revert to backup .htaccess a possibility?
- Prevent post from being published and show error
- how to get wordpress page url php code [duplicate]
- Problems updating nested ACF field groups
- how to pull all usernames from a custom user role, then do some array modification
- Unable to delete related media attachments with deleted post
- Embed video from streamtape using direct link
- separate list of programs in html/javascript coming from php
- Is there a PHP function that will return the block ID generated by WordPress?
- retrieve “Link Color” value
- How to print all the inline styles in the WP_Styles instance together with their keys?
- Issues adding Recaptcha v3 to WordPress Registration
- Theme editing “post thumbnail” help
- Hide comment notification number and buttons in wp backend
- Create html tree sitemap
- meta field for numerous links
- Custom HTML form using PHP – help with ajax/username validation
- Custom Theme, Editor won’t wrap text (i.e. change width)
- Where can I find the declaration of `$_wp_theme_features`?
- How I can add div to menu?
- How to print redirected query string variables to the page?
- Multiple URL from Custom post name
- Admin-area broken through weird issues
- Display a query with multiple post types and same relationship on a single page
- Get string from array and start loop [closed]
- Custom query_posts() parameter
- How to modify this function to exclude also the post belonging to a specific category?
- wp_link_pages return value even when is condition inside if statement
- login redirect based on user role not work as expected
- redirect user from login page if is logged
- How to set variable to specific field when querying
- How to lock users account until approvation