New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ac_register_columns doesn’t work with free version of plugin #742

Open
gchtr opened this Issue Apr 13, 2017 · 2 comments

Comments

Projects
None yet
4 participants
@gchtr

gchtr commented Apr 13, 2017

I tried out if I can register columns with ac_register_columns when I only have the free version of the plugin. Although the function was introduced in version 3, it doesn’t work.

I saw that the ac/ready hook was changed to after_setup_theme in codepress/admin-columns@a8edc1e#diff-4ef053ebb2a0cf21e9e4a1316a0f0104 after I reported that this wasn’t working yet for the beta version. Now the ac_register_columns function runs, but still nothing happens in the backend.

Steps to reproduce

  1. Activate Admin Columns 3.0 (the free version)
  2. Add the following code snippet to functions.php of your active theme:
/**
 * Column settings exported with Admin Columns Pro 4.0.2
 */

function ac_custom_column_settings_ce38f031() {

    ac_register_columns( 'page', array(
        array(
            'columns' => array(
                'title' => array(
                    'type' => 'title',
                    'label' => 'Title',
                    'width' => '',
                    'width_unit' => '%',
                    'edit' => 'off',
                    'sort' => 'on',
                    'name' => 'title'
                ),
                '58ef61a238303' => array(
                    'type' => 'column-excerpt',
                    'label' => 'Test Column',
                    'width' => '',
                    'width_unit' => '%',
                    'excerpt_length' => '20',
                    'edit' => 'off',
                    'sort' => 'off',
                    'filter' => 'off',
                    'filter_label' => '',
                    'name' => '58ef61a238303'
                )
            ),
            
        )
    ) );
}
add_action( 'ac/ready', 'ac_custom_column_settings_ce38f031' );
  1. Check if the column settings are applied in /wp-admin/edit.php?post_type=page. If they are not applied, the standard fields should show, and no column called Test Column.

Expected Behaviour

  • Column settings should show, including the registered Test Column

  • Column settings for post type page should be locked, like they are when using Admin Columns Pro 4.0.2.

@tobiasschutter tobiasschutter added this to the 4.1 milestone May 3, 2017

@davidmosterd

This comment has been minimized.

Show comment
Hide comment
@davidmosterd

davidmosterd Oct 16, 2017

Member

Hi @gchtr,

Sorry for the late reply. We have many features to work on, but we are catching up. I would love to know what you are trying to achieve here. Am I correct in my assumption you are using a pro-version to export to the free?

As import/export is a pro feature, we don't keep it compatible with the free version. It seemed to have been working for a long time, but that was not really intentional I suppose. The ac_register_columns is bound to become deprecated in the free version as with new pro columns and the introduction of layouts it has become too complex to keep it working in the free.

Let me know, would love to help you out further and work on this with you to get this solved in another way maybe?

Member

davidmosterd commented Oct 16, 2017

Hi @gchtr,

Sorry for the late reply. We have many features to work on, but we are catching up. I would love to know what you are trying to achieve here. Am I correct in my assumption you are using a pro-version to export to the free?

As import/export is a pro feature, we don't keep it compatible with the free version. It seemed to have been working for a long time, but that was not really intentional I suppose. The ac_register_columns is bound to become deprecated in the free version as with new pro columns and the introduction of layouts it has become too complex to keep it working in the free.

Let me know, would love to help you out further and work on this with you to get this solved in another way maybe?

@gchtr

This comment has been minimized.

Show comment
Hide comment
@gchtr

gchtr Oct 18, 2017

Hey @davidmosterd

Thanks for taking the time to look into this. Yes, I am using the pro version to export the settings.

I’m currently developing a very specific theme that comes with a set of custom post types, e.g. different types of events that can even have the same titles. For these different post types, additional columns (like event dates, event status) added through Admin Columns would add a great benefit for the user to discern the posts, because without the columns, he would just see a list of post with same titles. My goal was that when a user installs the theme and also installs the free version of the Admin Columns plugin, the theme would register the default settings I exported with the Pro version, so that the user doesn’t have to set up all columns himself. Kind of «plug and play».

The settings that I’d register would only show columns data that is also available in the free version, without any sorting or inline editing or multiple column sets.

In fact, this was the reason I initially bought the Pro version, because I asked if something like that would be possible and Stefan replied to me that this use case would work. Unfortunately, it never did.

I can very well understand that you won’t support this in the future. If the only solution is for the user to also install the Pro Version (while not using any of its additional features, except for having default settings registered 😊), then I guess I’ll have to adapt to that.

gchtr commented Oct 18, 2017

Hey @davidmosterd

Thanks for taking the time to look into this. Yes, I am using the pro version to export the settings.

I’m currently developing a very specific theme that comes with a set of custom post types, e.g. different types of events that can even have the same titles. For these different post types, additional columns (like event dates, event status) added through Admin Columns would add a great benefit for the user to discern the posts, because without the columns, he would just see a list of post with same titles. My goal was that when a user installs the theme and also installs the free version of the Admin Columns plugin, the theme would register the default settings I exported with the Pro version, so that the user doesn’t have to set up all columns himself. Kind of «plug and play».

The settings that I’d register would only show columns data that is also available in the free version, without any sorting or inline editing or multiple column sets.

In fact, this was the reason I initially bought the Pro version, because I asked if something like that would be possible and Stefan replied to me that this use case would work. Unfortunately, it never did.

I can very well understand that you won’t support this in the future. If the only solution is for the user to also install the Pro Version (while not using any of its additional features, except for having default settings registered 😊), then I guess I’ll have to adapt to that.

@tobiasschutter tobiasschutter modified the milestones: Approved, 4.1.2 Nov 24, 2017

@DGStefan DGStefan modified the milestones: 4.1.2, 4.1.3 Jan 8, 2018

@tobiasschutter tobiasschutter modified the milestones: 4.3, 4.4 Apr 16, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment