Skip to content
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

Allow for custom prefix to be set via admin page #4

Open
harryfinn opened this issue Sep 7, 2016 · 4 comments
Open

Allow for custom prefix to be set via admin page #4

harryfinn opened this issue Sep 7, 2016 · 4 comments
Assignees

Comments

@harryfinn
Copy link
Owner

harryfinn commented Sep 7, 2016

User should be able to specify a custom cmb2 field prefix (defaulting back to _cmb2_ if not specified) within the WP admin

my theme manages CMB2 meta boxes with a custom prefix, so I had to edit yoast-cmb2-field-analysis.js in order to include those custom prefixes as the input names, e.g using prefix named wptheme and then changed it to input[type=text][name_=wptheme], textarea[name_=wptheme]

Although I've successfully managed to make those changes, I've just noticed the plugin does not enqueues yoast-cmb2-field-analysis.js while editing a post, so it sadly means the plugin does not seem to work for me.

I'll keep inspecting in order to see if I can get it to work.

Regards,

Adriano.

@monecchi
Copy link

Hi there. Any progress regarding this feature so far?

@harryfinn
Copy link
Owner Author

Hi @monecchi, yes I started putting in an admin page for this plugin - just need to finish it off, will hopefully get a chance this weekend to put something together fully!

@monecchi
Copy link

monecchi commented Nov 25, 2016

Thanks for replying back! I've tried to put it together with a wp plugin boilerplate but I'm a mess with programming. I got it to save the field prefix and retrieve the saved data, but I couldn't pass it to the js. I hope you get it done eventually. That's an awesome plugin by the way!

captura de tela 2016-11-25 as 17 33 20

@ajuliano
Copy link
Contributor

ajuliano commented Dec 8, 2016

Using add_filter would be better!

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

No branches or pull requests

3 participants