Add “data-” attribute to image links

while googling about the same issue I came upon your question and a similar question from the WordPress forums. You can control the output of the generated code via the image_send_to_editor filter like this: function filter_image_send_to_editor($html, $id, $caption, $title, $align, $url, $size, $alt) { $html = sprintf(‘<a href=”#” data-rel=”lightbox-0″><img alt=”%2$s” src=”%1$s” /></a>’, esc_attr(esc_url($url)), esc_attr($title)); return … Read more

Change size and crop medium_large images

You can call add_image_size() again to update the existing image size. Assuming it is called medium_large (Events Manager Pro is a paid plugin so not very much people have it) you can do something like: <?php function update_medium_large_size_wpse216595() { add_image_size( ‘medium_large’, 600, 255, array( ‘center’, ‘top’ ) ); } add_action( ‘init’, ‘update_medium_large_size_wpse216595’, 11 ); Then … Read more

Which action hook to use for function?

You don’t need an action, but a filter, because you want to do something with the result of a function. The filter is, predictably, called category_description In this way (didn’t test it though): function wpse236947_trim_category_desc ( $desc, $cat_id ) { // do your thing return $desc; } add_filter( ‘category_description’, ‘wpse236947_trim_category_desc’ );