The “remove_filter” function only accepts 3 params: the hook name (“wp_date”), the callback function (“wpp_fix_i18n”) and the priority (10). You are using 4 params.
I’m sure your problem is related with the execution lifecycle. You are trying to remove a filter before it was created.
To solve it, wrap your function inside init hook in your theme functions.php to ensure plugin is loaded (and filter is added):
function mytheme_fix_date_issue () {
if (get_locale() != 'fa_IR') {
remove_filter('wp_date', 'wpp_fix_i18n', 10);
}
}
add_action('init', 'mytheme_fix_date_issue');
Related Posts:
- Add custom options to the wplink dialog
- How to show page content in feed?
- Insert new element to array with add_filter
- remove_filter( ‘the_content’, ‘wpautop’ ); only for certain post types
- Valid characters for actions, hooks and filters
- How can I add information underneath the user’s name on the users.php page?
- Is calling function_exists() faster or slower that apply_filters()
- Filtered query_vars becomes global. Why does this work?
- Can I add custom meta for each image uploaded via media-upload.php?
- Alter only the page title, not the post titles within
- Load different template file when condition met?
- Search with filters and title
- Some questions regarding filter
- Problem getting single_template filter to work – I want to serve a different single.php file for posts in a certain category
- Too many actions/filters!
- How can override a add_filter of a plugin?
- Adding Filter Conditionally Per Page ID
- Nested calls the the_content filter
- How to change domain used when pinging sites
- Filter list by a unique meta value dilemma
- How to use shortcode attribute in separate function
- Is it possible to track down Actions and Filters?
- Return a custom value in a function added to an action hook
- Using Conditional Statement in functions.php
- Adding id and class to the search input in WordPress search form
- Multiple filters for wp_get_archive
- Filter and modify entry-footer link in twentyseventeen
- Function the_content not working
- Filter Posts by current Month
- Break out of wordpress filter
- Are there actions or filters I can use for Ajax calls?
- Add filter problems
- Where is the content cache when using apply_filters(‘the_content…?
- How to filter for user registration, be able to throw error message
- No ‘Access-Control-Allow-Origin’ header is present [closed]
- How to prepare WordPress Rest data for Preview Changes?
- How to validate recaptcha on comments form?
- Does a plugin with a AJAX button filter exist? [closed]
- Contact Form 7: Make field required after checkbox is checked
- Customize title, description and focused keyword [closed]
- Is there any filter to trigger as soon as media is uploaded to post or page?
- wp_mail works with add_action(‘save_post’, …) but not an ajax action
- add_filter with retrieve_password_message() not working in plugin, but works in functions.php
- Add a div of content within the_content after a certain block
- Gutenberg Block – Post Featured Image Filter Hook
- Can i use multiple ‘the_content’ filters?
- Is it possible to put the add-filter()-hook into a function?
- How can I return shortcode output to the top of the content?
- separate categories with comma and srounded by single quote
- Filter for when the post is updated
- Prevent add_filter being applied to wp-admin pages
- Translate custom order status through a filter?
- Using preg_replace() with the_content filter
- Filter a pluggable function
- apply_filters(‘get_the_content’, $content) + Except
- Filter everything from content except output of a shortcode
- Filter media upload attachment meta
- Filter have_posts()/ the_post()
- Is there a way to globallly apply esc_html( … ) to all inputs and anchors to filter out XSS markup?
- Filter wp_redirect() to stop redirect under certain condition
- Filter get_page_by_path()
- Handle multiple parameters in filter
- How to add filter in custom rss feed
- Want to use wp_get_current_user() in query filter
- WP 4.5 hide core customizer sections
- Apply wordpress filter checking category
- Custom nav walker: How to acces the $args parameter?
- How To Get Search Term and Use in Function
- alternative to the_content filter
- How to set a filter search for categories of blog posts in wordpress
- Same URL for portfolio and for a page creates 404 error. Is there any filter that i can use for a child page?
- Filter widget_posts_args not working
- How to pass a variable between filter/action functions?
- How to exclude or include categories in wp rest API without query parameters?
- Remove and replace woocommerce add to cart button [closed]
- add_filter( ‘the_title’ gets through this if statement twice
- Changing the category for existing Gutenberg blocks
- Replace a specific URL on all apperances on the Website (Maybe a filter?)
- Modify WordPress Page Title ()
- How to add lazy field in content endpoint using Gutenberg blocks
- Modify Contextual Help
- how to use apply filter for Class?
- Modify WordPress search behaviour in backend?
- Re-order search results with posts_orderby filter and post meta value
- Set Microsoft Word links to open in new window/tab
- WordPress get_avatar filter to match logins
- ‘the_content’ Filter delivers empty string with lengh (608)
- Testing requested query in pre_get_posts
- Output dynamic_sidebar_params in wp_head
- How to sort posts according to meta value?
- Modify WooCommerce email shipping text value
- Change shortcode output (filter?)
- Using Filters To Change Page Title
- Updating User Profile on Registration
- remove_filter excerpt_more from a plugin class
- Why does using excerpt_more filter change link location?
- Replacing text using add_filter
- Background color and background image below element in Contact Form 7 – error tip [closed]
- Change password reqts with NO plugin without breaking resetpass link?
- How can I conditionally add the filter option_home?