How to get WordPress to accept the tag in articles (or other alternatives)

The <style> tag needs to be added to tinyMCE’s extended_valid_elements array to prevent on that tag from being stomped: function wpse211235_add_tiny_mce_before_init( $options ) { if ( ! isset( $options[‘extended_valid_elements’] ) ) { $options[‘extended_valid_elements’] = ‘style’; } else { $options[‘extended_valid_elements’] .= ‘,style’; } return $options; } add_filter( ‘tiny_mce_before_init’, ‘wpse211235_add_tiny_mce_before_init’ );

Is there a filter hook that I can use to change how taxonomy term names are displayed?

The dynamic filter “term_{$field}” is probably what you’re looking for, where the field is “name.” One approach is to have an array of names and their pseudonyms, then do a check-and-return on them so they’ll display the replacement. add_filter( ‘term_name’, function( $value ) { $terms = [ ‘old’ => ‘new’, ]; // basic example check, … Read more

Intercept invalid email during lost_password

Try this: add_action( ‘lost_password’, ‘wpse316932_redirect_wrong_email’ ); function wpse316932_redirect_wrong_email() { global $errors; if ( $error = $errors->get_error_code() ) { wp_safe_redirect( ‘lost-password/?error=” . $error ); } else { wp_safe_redirect( “lost-password/’ ); } } This is utilizing the lost_password action hook that fires right before the lost password form. You were experiencing this because WP will only redirect … Read more

Add a containing DIV to core Gutenberg blocks

I’m sure there are other ways e.g. with CSS only or Add custom class to core blocks in Gutenberg, but regarding: Add a containing DIV to core Gutenberg blocks one way could be with the render_block filter: add_filter( ‘render_block’, function( $block_content, $block ) { // Target core/* and core-embed/* blocks. if ( preg_match( ‘~^core/|core-embed/~’, $block[‘blockName’] … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)