Remove text from confirmation message

Personally, I would keep that link (despite the page has other links/ways for accessing the post). But if you must, you can remove that “View post” link, or change the entire message, using the post_updated_messages hook. E.g. add_filter( ‘post_updated_messages’, ‘my_post_updated_messages’ ); function my_post_updated_messages( $messages ) { // Note the array index, which is 6 for … Read more

Fixing plugin for wpdb::prepare

The error you’re facing definitely isn’t coming from your code shown above. This is an error notice that was raised with WP 3.5 (IIRC) that should note that stand alone $wpdb->prepare( STATEMENT ); calls help nothing. Missing argument 2 for wpdb::prepare() tells you that you haven’t added any argument to the call. The prepare() method … Read more

How To Remove The Filter That Adds JetPack Related Content To Dom [closed]

$jprp = Jetpack_RelatedPosts::init(); remove_filter( ‘the_content’, array( $jprp, ‘filter_add_target_to_dom’ ) ); Should work fine. The Jetpack_RelatedPosts init function implements the singleton pattern, so calling it will return the already instantiated instance, which you can use to remove the filter. Just make sure you call your code late enough. The main module is hooking the add_action to … Read more

isset($_POST[‘submit’]) ignored on comment submission

This might not directly answer your question (because I haven’t even thought about why the $_POST[‘submit’] would be ignored or if it is even correct), but you should use filters/actions whenever possible. The correct filter for filtering comment text is pre_comment_content, and you should use it like this: function my_filter_comment_for_swear_words( $comment_content ) { // Verify … Read more

How to Pass ID through Short Code

Your short code function receives the attributes as the first argument: function shortcode_function( $attributes ) { Here $attributes is an array, and the attributes/values are inside that variable, e.g. for [my-shortcode abc=”123″ xyz=”789″]: echo $attributes[‘abc’]; // prints 123 echo $attributes[‘xyz’]; // prints 789 You should also provide defaults and an opportunity to filter: $attributes = … Read more

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