Even better answer that doesn’t involve changing the plugin:
remove_action('transition_post_status','stc_publish_auto_check',10,3);
add_action('transition_post_status','my_custom_publish_rules',10,3);
function my_custom_publish_rules($new, $old, $post) {
if ($post->post_type == 'page') return;
else stc_publish_auto_check($new, $old, $post);
}
Put it in a theme’s functions.php.
Side note: Whenever you’re dealing with a function called by an action or filter hook, then you can easily wrap the call in a different function and add your own code to that function instead. remove_action and remove_filter should be two tools you use a lot in your WP arsenal.
Related Posts:
- Trying to inject twitter metadata into using wp_head action in functions.php – get_the_excerpt() returns null
- Pulling Twitter RSS feed not working as expected (fatal error)
- Retrieve a value from Yoast SEO to use to set a default twitter card image honoring overrides
- Auto-Tweet if Type is ‘Status’ using OAuth
- Need To Change WordPress Meta Tags… Includes wordpress shortcodes
- How to customize the_archive_title()?
- How to override parent functions in child themes?
- Solution to render Shortcodes in Admin Editor
- Trying to use add_action and do_action with parameters
- Define page template in wp_insert_post
- Safe to disable wptexturize?
- Get a list of all available fields in the User Profile
- How do I use the WP image functions in a page template?
- How to remove Customize from admin menu bar after WP 4.3
- Child theme functions.php do I use php open and close tags?
- Modify Admin Bar Link
- why doesnt is_home() work in functions.php
- WP 4.4. responsive loads normal image after loading the responsive image
- Insert Ad Code in the Middle of a Post
- Enabling shortcodes for custom fields
- Passing variables to templates (alternatives to globalizing variables)
- Load post with a different template?
- Add options to featured image
- Programmatically Add Font-Awesome Icons to Category Widget
- Dynamically Register Sidebars For Each Top Level Page
- Two different menus for two different locations?
- Error after editing functions.php
- Run Product Filter Javascript On Page Template
- Most efficient way to get custom database records from 20 buttons and 20 tables?
- How to add a column to the Trash page?
- Custom registration URL lost when user makes signup mistake
- Images uploaded using media uploader are appearing upside down
- Empty Date Returned on my function
- Woocommerce Attributes pulling in wrong data
- How to get the post_name when in preview?
- Display first name of logged in user?
- Identical custom taxonomy slugs for same hierarchical children
- How do I customize my wordpress Admin Area?
- User meta and author meta
- Sorting table function default
- Custom Post excerpt not working correctly
- Custom Nav Walker sub-menu
- Wait a result before enqueue
- How do I remove the date and category form my portfolio pages
- Default Custom Field Value Automatically Update
- Get list of all custom tanonomy id
- Add button to kitchen sink toggle
- Get User Login Data (date, time… )
- How to pass variables from a function in functions.php to an other one
- Modify post filter to set custom number of posts per page and exclude child posts
- Remove “Published On” inside wp-admin
- Changing parent element’s class or style
- How can we know we are not in edit page
- Adding jQuery datepicker to Custom Post Type Metabox [closed]
- User function to return multiple get_post_meta()
- wordpress acts like functions.php doesn’t exist [closed]
- How can i unload effect.min.js file?
- How can I pass a shortcode value to the head in wordpress functions.php
- Native gallery custom html output
- WordPress wraps span tags into p tags
- Auto scroll to id on page load on all pages except home page. Only do this on mobile
- why is this function firing on all child menu items as well?
- Custom styles in Tiny MCE with an external CSS file
- I changed Functions.php and now I get “cannot decode raw data NSURLErrorDomain:-1015” (not blank)
- How to add schema markup to WordPress menu function
- Use add_action within template
- Replace admin header logo with an image
- contact form in template with jquery,validate and ajax
- Changing the header image using WPML
- How to require a config file in a template and in function.php?
- Issue passing action class to nested function. Admin Columns
- Populate Product Regular Price with a calculated ACF Field Value
- Header menu aligned right on all pages except for single-post page [closed]
- How Do I Unhook This Parent Theme Function?
- How to make the RTL.css the dominant css code?
- How to create an array if ’empty’?
- Auto remove tags on certain date
- get_field() with ID in one signal filter not working
- i can’t use wordpress functions in ajax loaded php file
- Woocommerce – Switching Price for Category
- Remove External Links from WordPress posts Using add_filter() in Theme functions.php
- How to create a WordPress Customizer Button to Clear a Cache?
- Is there any requirements to do socket programming with WordPress?
- Adding A New Widget to WordPress Disables the Existing Widgets
- Slider Thumbnail Size Issue [closed]
- same get_posts function works diffrently in tag.php and functions.php
- Javascript and Stylesheet in child page
- Call custom field using php
- Problem in outputting shortcode
- Retrieve array of attachment IDs attached to a given Post ID
- add_theme_support not outputting thumbnails
- How to get tags and categories?
- Archive.php, and post_is_in_descendant_category
- update_user_option not working as expected
- Having problems loading Jquery in functions.php
- How do I access variables outside a function [closed]
- How can I append and prepend something to all post hyperlinks without using ::before or ::after? PHP hook solution?
- Retrieving next_post_link() and previous_post_link() in functions.php
- function to show youtube videos within excerpt – if condition and apply_filters
- sort by date in users