Welcome to the Treehouse Community
Looking to learn something new?
Jojo Ind2,260 Points
What is this PHP/Wordpress Array means ?
Hi, I'm currently learning to integrate Redux framework to my wp theme.
In Redux sample-config file, there's a line like this :
Redux::setSection( $opt_name, array( 'title' => __( 'Basic Fields', 'redux-framework-demo' ), 'subtitle' => __( 'Subtitle', 'redux-framework-demo' ), 'desc' => __( 'Field Description', 'redux-framework-demo' ), 'id' => 'basic', 'icon' => 'el el-home' ) );
On the title, subtitle, and desc, What are those 2 parameters means ? why the second one is always 'redux-framework-demo' ?
and what are their role ?
What will happen if I change the 'redux-framework-demo' to something else ?
I've been digging to Redux doc but I couldn't find any information about this.
Thank you Jojo
Chris Shaw26,650 Points
Hi Jojo Ind,
If you look carefully you will see the two strings are encapsulated within a function that is called
__, it looks like a very long underscore but it's two separate characters. This function is part of the l10n translation base that allows text in your code to be easily translated for many different languages.
See the following link for more information: _2
Hope that helps.