Comments (1)
This snippet of code sets the default to "do not send":
function register_meta_args_filter_jetpack_dont_send_post_by_default( $args, $defaults, $object_type, $meta_key ) {
if ( $meta_key !== '_jetpack_dont_email_post_to_subs' ) {
return $args;
}
$args['default'] = 1;
return $args;
}
add_filter( 'register_meta_args', 'register_meta_args_filter_jetpack_dont_send_post_by_default', 10, 4 );
Now when you hit publish on new posts:
![Screenshot 2024-06-21 at 15 44 45](https://private-user-images.githubusercontent.com/87168/341766220-05d2741d-7698-46b7-b7b4-2b04e912bf6e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE2NDAyOTIsIm5iZiI6MTcyMTYzOTk5MiwicGF0aCI6Ii84NzE2OC8zNDE3NjYyMjAtMDVkMjc0MWQtNzY5OC00NmI3LWI3YjQtMmIwNGU5MTJiZjZlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzIyVDA5MTk1MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWFkYWM2ZTUxMjk2NTJlYmZjMWJiYTIyNGY4ZTQxMzhlZDJjMWQ3MmFkMzk2NWI0NzA5NTQ5ZTMwOTNkZTcxODMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.2Bcd5PvMyaPPFG0lyZUjEg7kDgA8hV9wHuyvzHs52M0)
If we would want to add more straightforward filter, we'd add it here:
from jetpack.
Related Issues (20)
- Jetpack Newsletter: Add support for tags in Jetpack Newsletter categories HOT 3
- Google Fonts: formating the fontFamily block attribute fails if it's not a string HOT 5
- AI Proofread: Add long sentences feature
- Jetpack: Multisite License Activation Error has Typo HOT 1
- WP Super Cache: Fix $wp_cache_request_uri checks so WP CLI works properly
- Publicize: editors cannot connect an account
- Cover Block: Add Slideshow-type functionality, options for multiple covers HOT 1
- WP Super Cache: call to undefined function is_utf8_charset() in WordPress 6.6 HOT 11
- Form Block: Make It Easier To Select Parent Block HOT 2
- Newsletter: Enhance email preview
- Newsletter: Allow background and font customization HOT 2
- Form block: Unexpected Contact Form Checkbox Block Size on Twenty Twenty and Twenty Twenty One HOT 2
- wp_insert_post No such file or directory’ HOT 2
- Form Block: pattern picker broken in WordPress 6.6
- Jetpack AI: copy logo generator code from Calypso to Jetpack repo
- JSX Transform: React compatibility - Add polyfill to prevent issues on sites running WP 6.5.5 or lower
- Feature Request: Allow All AI Features to be Disabled HOT 1
- AI Logo Generator: Extend the logo block to add the AI button on the toolbar
- Remove SiteEditorSnackbars HOT 3
- codeblock_preserve() incorrectly detects and encodes Markdown code fences
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jetpack.