Modify wp_installed_email / wp_new_blog_notification
I found a solution: mu-plugins. My code isn’t executed in this early state, but that’s what mu-plugins are for. https://wordpress.org/support/article/must-use-plugins/ This did the trick.
I found a solution: mu-plugins. My code isn’t executed in this early state, but that’s what mu-plugins are for. https://wordpress.org/support/article/must-use-plugins/ This did the trick.
According to the Site Health screen https://github.com/WordPress/wordpress-develop/blob/db30405f478e9813b0cc59f81992f16eb0a29ced/src/wp-admin/includes/class-wp-site-health.php#L470 Inactive plugins are tempting targets for attackers. If you’re not going to use a plugin, you should consider removing it. Default plugins are Hello Dolly and Akismet. Your hosting provider is most likely adding the other plugins you mentioned as pre-installed plugins for their customers as an extra … Read more
You will need to add the current page object to the timber context using timber_context filter. Something like this add_filter(‘timber_context’, ‘bt_timber_add_to_context’); function bt_timber_add_to_context ($context) { // add current page content $context[‘page’] = Timber::get_post(); return $context; } That’s how I added it in my custom timber theme. Now when you want to get the page content … Read more
$terms = get_terms( array( ‘taxonomy’ => ‘career’, ‘hide_empty’ => false, ) ); Your taxonomy isn’t called career. Your taxonomy is called (confusingly) categories. If you check the docs, you’ll see the second argument passed to register_taxonomy is the object type (eg, post, my_cpt) that the tax is to be used on. So in your registration … Read more
The function add_menu_page return the hook suffix that inform you about the current page. A simple example to get the hook suffix. public function add_menu_page() { $page_hook_suffix = add_menu_page( esc_html__( ‘Admin Page’, ‘translation-slug’ ), esc_html__( ‘Admin Page’, ‘translation-slug’ ), ‘read’, ‘My Name’, array( $this, ‘get_styles’ ) ); add_action( ‘admin_print_scripts-‘ . $page_hook_suffix, array( $this, ‘enqueue_assets’ ) … Read more
What about changing BTC to a string <?php get_coin_price(‘BTC’); ?>
Before loading plugins WP retrieves the list of active and valid plugins with the function wp_get_active_and_valid_plugins. The array of plugins is retrieved in this line: $active_plugins = (array) get_option( ‘active_plugins’, array() ); As you can see, this involves a call to get_option, which has a filter to manipulate the result. So if you could build … Read more
The right place to store the data depends on how you will be using the data. From the context, it sounds like metadata might be the right place. There is usermeta if the data relates to one of your site users, or postmeta if the data relates to a specific post/page/CPT. Options are best reserved … Read more
so you need to make sure you are using the hook “admin_enqueue_scripts”. this only loads the script on the admin side. admin_enqueue_scripts is the proper hook to use when enqueuing scripts and styles that are meant to be used in the administration panel. Despite the name, it is used for enqueuing both scripts and styles. … Read more
XML as in generic XML? I mostly mess with RSS (for which WordPress has SimplePie bundled). Maybe SimpleXML (PHP 5+, not WP specific) will do? Also quick repository search found this: Advanced XML Reader