I’m not sure if you are missing some code in the constructor where you write //code here
:
function __construct() {
//code here
}
Try replacing it with:
function __construct() {
parent::__construct(
'byad_countdown_widget', // Base ID
__('Byad Countdown', 'byad_countdown'), // Name
array( 'description' => __( 'The Byad Countdown Widget', 'byad_countdown' ), ) // Args
);
}
Your updated code example gives the following output:
<aside id="byadcd_widget-2" class="widget byad-countdown">
<div class="countdown-display" data-root="http://example.com/wp-content/plugins"></div>
<h3 class="widget-title">you know what?</h3>
</aside>
on my 3.8.1
install with the TwentyTwelve theme.
So the filter seems to be working.
Related Posts:
- How To Determine If A Filter Is Called In A Sidebar/Widget Context?
- Between functions.php (theme), widgets, and plugins, which is loaded first?
- Plugin upgrading: Widget settings
- What characters are allowed as a shortcode tag and how should they be sanitized?
- How to remove filter added by another plugin in a class
- Need to create a Theme demo site that features multiple themes
- Using add_filter inside another class
- Override dynamic_sidebar() in plugin?
- How to place random widgets in the WordPress sidebar?
- Pages with 2 Columns
- Hide WordPress Plugin Deactivation Links
- Custom Widget Creating PHP Exception When Placed In Its Own PHP File
- Alter post slug by a filter that is fired just after a post is created
- register child class in another plugin
- Does the ‘nav_menu_css_class’ filter accept 2 or 3 arguments?
- Very stubborn wp_register_script / add_action vs remove
- Conditional Display of Links in Widgets
- do_action and hook methods
- Remove action from a plugin class, forced to use global instance
- ElasticPress how to Include Meta to the mapping?
- Created Widget Not Showing up on Admin Panel
- remove filter which calls a public static function
- Determine plugin name from within plugin_action_links filter
- Flickr plugin that will display photos from multiple group pools? [closed]
- How to remove xmlns on language_attributes()?
- WordPress author details plugin/widget
- How to modify shortcode attributes with data from current post
- add_filter comment_edit_redirect not working
- WAMP to XAMPP WordPress transfer
- The plugin generated 3 characters of unexpected output during activation
- Edit default comments page in WP Admin
- Creating a plugin to sanitize comment and the url field before display only
- How to style the RSS wordpress?
- Modifying the comments section through a plugin regardless of theme
- How to add media field to WP_Widget form function?
- Passing an array from shortcode-function to filter-function
- How to disable a plugin for certain page?
- How can I inject options into an select tag inside the widget form?
- WordPress user account activation
- Custom plugin appears outside of the sidebar container
- How to change the name of the “edit my profile” link in the WordPress admin backend
- Hide certain widgets from specific user roles in admin
- add_filter doesn’t work
- Template filter for custom taxonomy terms
- Sidebar widget: Randomly select text from a given set
- How do I use add_action on custom widget?
- Exclude posts from widget while post is showing on home, single and categories
- remove_action not removing add_action from constructor
- Custom widget doesn’t save values from dropdown box
- Register Script in Plugin Widget
- jQuery Click event is not fired at all
- Override a Plugin Function
- strange shortcode error: does shortcodes requires any dependency?
- All custom widgets are not showing in widget area at the same time
- Widget for specific category
- Can I filter a function created by a theme or a plugin?
- get_term_meta returns false in widget
- Add a function call after content automatically?
- How to set the default value as the saved value once a form of widget is saved?
- How to use add_action for multiple instances of the same class
- How to Use the Filter “sidebar_login_widget_form_args”
- Looking for a filter to modify the months
- What’s the best way to echo out a filter variable?
- Listing all sidebars
- Edit post image attributes on fly?
- Unable to locate inline CSS causing parts of page to be blank
- How to convert Currency from USD to other IP Based currency in Php function
- Elementor pro page editing gives error There has been a critical error on this website. Please check your site admin email inbox for instructions
- How i remove specific script from header?
- Adding an item to an anonymous array inside a filter?
- What is the right way to populate a dropdown from MySql?
- taxonomy_template filter not working on pagination [duplicate]
- 500 Internal server error wp_handle_upload_prefilter
- Change WordPress plugin widget `id_base` without breaking widget
- Co-author plus: list of posts by authors in the sidebar
- Using Filters to modify contect – DB query results alwats appear fist
- Help needed with woocommerce (wc stripe) filter
- Widget outputs the value but doesn’t save anything inside the textarea
- How to add styling and script to a custom widget plugin
- WordPress Add advertising ads befor and after content with periority [closed]
- WordPress Widget: Is it possible to make the form dynamic without updating?
- Edit plugin filter
- How do i get all author posts on custom post type list
- Show widget location borders for development
- Cannot access variables within a widget
- How know the “admin” blog from wordpress multisite?
- twitter widget loads properly in all themes except my own theme?
- How to filter a a variable in a plugin’s function?
- Retrive images from the_content()
- adding image in the header of my dev widget
- passing ‘&’ in return function of add_filter
- Filter the HTML content of plugin
- Plugin: Unable to Save the Image Alignment Option to Display in the Widget in the Sidebar
- Filter for modifying image on upload
- County Finder form/plugin?
- What are the downsides of using bootstrap in plugin development?
- Order shipped by which driver[hook for woocoomerce order staus changed and popup in admin panel ] [closed]
- Am having issues intergrating this api into my wordpress site, any help please?
- Custom priority with the_content filter based on user input
- filter just a portion of plugin function