John Huebner
Forum Replies Created
-
Forum: Plugins
In reply to: [RestroPress - Online Food Ordering System] Notification Email AddressNM I found it
I dug through code and answered my own question, so you can consider this a feature request to add a hook to this plugin that allows altering the capability to access settings page. I’m of the opinion that this is something all plugins should have.
Anyway, for anyone else that needs to do this here is a hack that will get it done.
add_action('admin_menu', 'show_editor_smpt_settings_menu', 200); function show_editor_smpt_settings_menu() { // change capability for admin menu global $menu; foreach ($menu as $index => $item) { if ($item[2] == 'wp-mail-smtp') { $menu[$index][1] = 'edit_others_posts'; } } } add_filter('user_has_cap', 'give_editor_smpt_settings_access', 10, 4); function give_editor_smpt_settings_access($allcaps, $caps, $args, $user) { // grant editors access to settings if (!isset($_GET['page']) || $_GET['page'] != 'wp-mail-smtp') { return $allcaps; } if (in_array('editor', $user->roles)) { $allcaps['manage_options'] = true; } return $allcaps; }- This reply was modified 6 years, 4 months ago by John Huebner.
Sorry I didn’t get back to this sooner. Yes, this is resolved here. The session conflict appears to be something else. Still working on trying to figure out what.
Forum: Plugins
In reply to: [ACF Options Page Admin] ACF Options Page Admin and Divi Dynamic ContentSorry, but it is unclear to me what you are doing, I don’t know anything about Divi themes or the things that you mention.
This should be extremely simple for you to test.
The other plugin is a plugin that I have created for a client that manages a shopping cart, so I can adjust it if you tell me how not to conflict with your plugnin.
All you need to test is to put this into the function.php file of any site that’s running this plugin:
add_action('init', 'my_session_start'); function my_start_session() { if (!session_id()) { session_start(); } }This will cause your plugin to produce warnings, and yes, it is the code in this plugin that is producing the errors. I have tried to change the priority of my action and this has had no effect whatsoever. I have tried looking at what the code mentioned above does and tried to figure out “WHEN” it is called, but have been unable to do so.
As far as I know I am starting my session exactly as I should be doing it following WP best practices.
Forum: Plugins
In reply to: [ACF Post-2-Post] Bulk change existing relational posts into bi-directionalYou might be able to do something set the posts per page to 25 and then use the paging parameters in WP_Query() to get 25 at a time.
Forum: Plugins
In reply to: [ACF Post-2-Post] Bulk change existing relational posts into bi-directionalUpdating each post is the safest way.
The following may not work and may time out the loading of your site depending on how many posts you have in the post type that originally had the relationships.
You could create a temporary function that runs on the init hook on your site.
In this action you would:- do a query to get all posts of the post type
- loop over all posts
- use
get_field('field_name', $post->ID, false)to get value of field - use
update_field('field_name', $post->ID, $value)to update the field, this will cause this plugin to update the relationships
But as I said, if there are a lot of posts then it would likely time out the site. You might be able to adjust the query to get some number of posts and do it in phases, but I don’t know how you’d do that.
Forum: Plugins
In reply to: [ACF User Role Field Setting] Super Admins and DISALLOW_FILE_MODSchange has been made and new version pushed to SVN
Forum: Plugins
In reply to: [ACF User Role Field Setting] Super Admins and DISALLOW_FILE_MODSI don’t currently have a multisite running that I can test this on. Have you tried updating the if statement to use “manage_network”. If you have not, can you try altering the if statement and let me know if that works. Otherwise I’m going to need to set up a site just to test it out and that could take me some time. It looks like it should but I don’t want to make a change without testing.
Forum: Plugins
In reply to: [ACF Post-2-Post] Seems like it’s not resaving bidirectionally anymoreI don’t know where the conflict is because I don’t have access to the other plugin. But this plugin will only save values for relationships that are submitted and has no effect on what ACF shows in the field.
Forum: Plugins
In reply to: [ACF User Role Field Setting] It doesn’t work for TAB fieldActually, I have disabled it on tab fields. The reason for this is that people will expect that if a tab field is hidden for a user that all of the fields in the tab would be hidden and that is beyond the abilities of this plugin.
You can make it work on tab fields, there are instructions on doing this in the plugin description. But with the understanding that you will need to manually set each field in the tab along with the tab if you want them all hidden
Forum: Plugins
In reply to: [ACF Post-2-Post] Seems like it’s not resaving bidirectionally anymoreYou’ve lost me. What do you mean by
and call up that same “related_posts” meta
I’m going to need a more detailed explanation of what you are seeing.
Forum: Reviews
In reply to: [ACF Medium Editor Field] Excellent!Thanks for the thumbs up.
To your comment, how the interface appears is a function of some of the settings for medium editor. If you have new lines/returns turned off then it will appear as a single line input. If you allow returns then it will become a multiple line input but add <p> tags to the content.
Forum: Plugins
In reply to: [ACF Post-2-Post] This plugin is not properly prepared for localizationI am still waiting on someone to provide information on why it is failing and what I can do about it. The plugin creates no translatable output. If someone can provide information more information on this or point me to documentation that would be great. I’m not going to add language support for a plugin with no translatable output if that’s what your asking.
Or someone could send me a pull request to correct the translation issues over on github.
Otherwise I’m going to consider this resolved.
Forum: Plugins
In reply to: [ACF Post-2-Post] Links brokenWP altered the way the plugin readme works some time ago and unfortunately I have not had time to correct issues. Everything that link used to go to is now in the main description of the pluign.