• Resolved cvladan

    (@cvladan)


    Just a small but necessary improvement for this otherwise wonderful plugin!

    The plugin completely takes over and deletes the content of the columns in the “Reusable Blocks” list view. This view has already been heavily modified due to some other plugins that I really like and use, but Greenshift deletes everything and sets its own columns.

    A more flexible approach would be to only add its own columns while leaving the previous ones untouched. Additionally, for users who want more control, it would be better to introduce a hook so they can fully customize it to their liking.

    Since I couldn’t find the plugin’s GitHub URL where I could do a PR, I’m putting this request here for the next update. The change is in just 2 lines, and I ask that you make these changes in your code, if possible.

    The file is settings.php, and the function is gspb_template_screen_add_column():

    //Columns in Reusable section
    function gspb_template_screen_add_column($columns)
    {
      $newcols = array(
        'cb' => '<input type="checkbox" />',
        'title' => esc_html__('Block title', 'greenshift-animation-and-page-builder-blocks'),
        'gs-reusable-preview' => esc_html__('Usage', 'greenshift-animation-and-page-builder-blocks'),
      );
    
      return apply_filters('greenshift_reusable_blocks_list', array_merge($columns, $newcols));
    }

    Thank you in advance, and congratulations on an excellent plugin.

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘An important improvement’ is closed to new replies.