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.2.3, cn_output_default_atts_address, filter, getAddressBlock
- This topic has 11 replies, 2 voices, and was last updated 10 years, 11 months ago by
Steven Zahm.
-
AuthorPosts
-
04/07/2015 at 6:17 am #330788
anja
ParticipantHello,
after the last update (to 8.2.3) I had manually to redo the following: change the order of getAddressBlock in the file class.entry-output.php (line 1090)because it was set to default.
How can I prevent to have to do this manual change again – looking at the current avialbe update 8.2.4.?
Thank you very much.
Kind regards,
Anja
04/07/2015 at 10:52 am #330826Steven Zahm
Keymaster@ anja
Any time you edit a core file, you’ll have to redo any changes that were made after an update. There might be an update safe way of doing what you want in order for me to tell you, you’ll need to let me know what changes you are making.
(I looked at line 1090 in the last several versions of Connections but I can not figure out what order you are changing…)
04/09/2015 at 7:05 am #331010anja
ParticipantHello Stephen,
sorry, it was on line 1091 – as you see I’ve put %zipcode% before %city%.
$out = ”; $addresses = $this->getAddresses( $atts , $cached ); $search = array( ‘%label%’ , ‘%line1%’ , ‘%line2%’ , ‘%line3%’ , ‘%zipcode%’ , ‘%city%’ , ‘%state%’ , ‘%country%’ , ‘%geo%’ , ‘%separator%’ );
Kind regards,
Anja
04/09/2015 at 9:19 am #331028Steven Zahm
Keymaster@ anja
Well, I’ve got good news for you, you do not need to make that change to the file at all. This change can be done using a filter.
add_filter( 'cn_output_default_atts_address', 'cn_change_address_format'); function cn_change_address_format( $atts ) { $atts['format'] = '%label% %line1% %line2% %line3% %zipcode% %city% %state% %country%'; return $atts; }Hope that helps!
04/09/2015 at 9:51 am #331033anja
Participantlovely, yes.
Though one question, where do I add this filter?
Thank you very much.
Kind regards,
Anja
04/09/2015 at 11:33 am #331056Steven Zahm
Keymaster@ anja
Apologies! I assumed since you were making PHP changes you knew how to use WordPress filters.
I recommend using Code Snippets.
Add a new snippet with the code I can, Save and activate the new snippet.
09/03/2015 at 8:46 am #345407anja
ParticipantHello Steven,
sorry, to open this topic again. After the last update of the plugin, I’m having the same problem with the order of zip code and city. I’ve added the filter you gave my to my functions.php. No luck. Any ideas?
Thank you very much.
Kind regards,
Anja
09/03/2015 at 10:13 am #345414Steven Zahm
Keymaster@ anja
Ahhh… seems there is a bug. Which template are you using?
09/03/2015 at 10:17 am #345416anja
ParticipantEnfoldVersion: 3.3.2 with a child-theme.
Kind regards,
Anja
09/03/2015 at 10:53 am #345420Steven Zahm
Keymaster@ anja
Sorry, I was not more clear… not the theme. Which Connections template?
-
AuthorPosts
You cannot reply to this support topic. Please open your own support topic.
