shortcode function outputs multiple anchor tags

You are trying to remove the filter before adding the filter and one more thing you are not adding the correct priority. remove_filter( ‘the_content’, ‘wpautop’ ); //removing before adding without priorities. add_filter( ‘the_content’, ‘wpautop’ , 99) ; add_filter( ‘the_content’, ‘shortcode_unautop’, 100 ); Try remove the filter at the end with same priority when you add. … Read more

How to check which submission button was clicked?

The function submit_button() does generate: <input type=”submit” name=”submit” id=”submit” class=”button button-primary” value=”Save Changes” /> As seen on the codex documentation page. Which gives you the possibility to check for a $_POST or, depending on the form, $_GET or generic $_REQUEST variable – to be exact for $_POST[ ‘submit’ ] or $_GET[ ‘submit’ ] or $_REQUEST[ … Read more

wp_editor customization

What you can do is use the get_current_screen() function to get what screen the current user is on ( in the admin panel ) and only add those global values whenever the user is viewing the post page: function my_format_TinyMCE( $in ) { $screen = get_current_screen(); if( is_object( $screen ) && ‘post’ == $screen->post_type ) … Read more

Password protected Page add_filter to change the text doesn’t work

I use the wordpress theme wpcasa and the theme change the standard text of wordpress. So I included a filter hook of the theme: add_filter( ‘the_password_form’, ‘wpsight_password_form_dmd’ ); function wpsight_password_form_dmd($output){ global $post; $output=””; $aktuelleseite = $_SERVER[‘REQUEST_URI’]; $sprache = explode(“https://wordpress.stackexchange.com/”,$aktuelleseite); $label=”pwbox-“.( empty( $post->ID ) ? rand() : $post->ID ); $output=”<form action=”” . get_option( ‘siteurl’ ) . … Read more

Post filter Month dropdown at front-end like wordpress backend

wp_get_archives creates its links with the function get_archives_link. this function returns plain HTML, but it has a filter you can hook into. You can use the get_archives_link filter to manipulate your HTML with some regex. function my_archives_link($link_html) { //TODO: my regex to manipulate the HTML return $link_html; } add_filter(‘get_archives_link’,’my_archives_link’) Further reading wp_get_archives get_archives_link Filter Hook: … Read more

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