Mystery line break

You could try this see if any different: <p> <?php $label = apply_filters(‘cm_tooltip_parse’, ‘Label: ‘, true); if ( generate_show_title() ) {$title = get_the_title();} else {$title=””;} echo str_replace( array( “\n”, “\r”), array( ”, ”), $label . $title ); ?> </p> If that works, cm_tooltip_parse or generate_show_title are probably outputting a line break somewhere, but at least … Read more

Is it possible to assign a css id to a row in plugins list table?

Updated answer on how to target with JS: since jQuery is included in wp-admin, you can still target the link with the row’s existing data-slug. Example of how to target all the links: jQuery(‘tr[data-slug=”my-plugin-slug”] a’.css(‘color’, ‘green’); (You can inspect the elements to work out a way to target just one specific link, if that’s your … Read more

Setting the page title in a plugin, but not outside my plugin

1) I think I solved it: check if the content contains my shortcode: a) So set up in my top (outer) plugin file with: add_filter( ‘pre_get_document_title’, ‘dwnz_filter_pagetitle’, 20 ); b) plus later on in same file: function dwnz_filter_pagetitle ($title) { // get_post even works in my case when I am expecting a page, not a … Read more

Create different flavours of excerpt

Probably it’s not the best approach because it requires introducing a global variable but here’s the idea: In Posts_in_Page plugin there are 2 filters, one is fired before output of these items posts_in_page_pre_loop, and one after output end posts_in_page_post_loop. So the plan is to create global variable which will be set to true when you … Read more

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