Support has been upgraded!
The Support Forum is closed. Not to worry! Providing the top quality support you expect and we're known for will continue! We're not ending support, just changing where you submit requests. This will provide you with the best experience possible.
Premium Support
Have you purchased an addon for Connections such as one of our premium templates or extensions with a valid license and you need help?
Please open a Support Ticket in your user account.
Free Support
Are you using the free Connections plugin? Don't worry, you are still very important to us! We are still providing you with the same high quality support that we're known for.
Please open a new support topic in the WordPress support forums for Connections.
Tagged: 8.5.19, cn_metabox_publish_atts, filter
- This topic has 7 replies, 3 voices, and was last updated 6 years, 6 months ago by
Steven Zahm.
-
AuthorPosts
-
07/07/2016 at 10:30 pm #381916
wemmons53
ParticipantOn the Connections : Add Entry page, in the Publish panel.
Currently you can set the default entry type, ie individual, family, etc.
Would it be possible to set a default visibility, ie public,private or unlisted?
Currently defaults to public. Where in code could I change the default if I wanted to?
-
This topic was modified 6 years, 7 months ago by
wemmons53.
07/08/2016 at 2:08 pm #382046Steven Zahm
Keymaster@ William
This can be done by using a filter.
Install the Code Snippets plugin and add a new snippet with the following code.
function cn_default_entry_type( $atts ) { $atts['default']['type'] = 'organization'; $atts['default']['visibility'] = 'private'; return $atts; } add_filter( 'cn_metabox_publish_atts', 'cn_default_entry_type', 11 );
This snippet would change the default entry type to an Organization with a visibility default of Private. To default to a family, you would change
organization
tofamily
in the code. The valid options for Visibility arepublic
,private
orunlisted
. This will only affect the entry level visibility, not the data level (ie. address, phone and such).Hope that helps!
07/08/2016 at 4:01 pm #382074wemmons53
ParticipantAlready have plugin that does same, added code and works great. Thanks!
Since the “type” can already be changed, I assume I can just remove that line?
Also have question about data level visibility.
Does the entry level override the data levels when it comes to displaying the info?
I have a church directory and have all entry levels setup to private so as to require someone to log into the website to access the directory. When someone not logged in, ie public access, they cannot see any directory data even if they managed to display the directory page.
Do you have documentation that explains that in more detail?
-
This reply was modified 6 years, 7 months ago by
wemmons53.
07/08/2016 at 6:15 pm #382114Steven Zahm
Keymaster@ William
re: Since the “type” can already be changed, I assume I can just remove that line?
Yes.
re: Does the entry level override the data levels when it comes to displaying the info?
Yep.
re: Do you have documentation that explains that in more detail?
http://connections-pro.com/documentation/adding-an-entry/
Here’s the documentation on adding an entry. If you have any feedback, please feel free to let me know. I am alway looking to improve it.
07/08/2016 at 6:24 pm #382117wemmons53
ParticipantThanks Steven for everything. I enjoy working with the plugin.
07/27/2016 at 1:21 pm #384348Brian Wold
ParticipantHi Steven. Per your comment, “This will only affect the entry level visibility, not the data level (ie. address, phone and such).” — can those be changed as well?
Ideally, I’d want all data options on the entry screen to default to Work Address, Work Phone, Work Email, etc.
Fingers crossed…
p.s. Thanks for the great product!
07/27/2016 at 1:29 pm #384349Brian Wold
ParticipantNVM: found your snippet in the middle of this post: http://connections-pro.com/support/topic/changing-defaults-in-manage-and-add-entry/
07/27/2016 at 2:10 pm #384412Steven Zahm
Keymaster@ Brian
great to hear!
-
This topic was modified 6 years, 7 months ago by
-
AuthorPosts
You must be logged in to reply to this topic.