如何分割WordPress元数据

时间:2018-08-14 08:04:23

标签: wordpress

//如何在此值中获取“ bigimg_link”和“ section_content”

<Field name="AcceptTAndC" component={(props) => {
      return (
              <View>
                  <ListItem>
                     <CheckBox {...props.input} checked={props.input.value ? true : false} onPress={() => {
                                    const val = !props.input.value;
                                    props.input.onChange(val);
                                    this.setState({ acceptTAndC: val });
                                }} />

                                <Text> I accept <Text onPress={() => this.refs.termsModal.open()}>this terms and conditions</Text></Text>
                            </ListItem>
                        </View>
                    )
 }} validate={[acceptTerms]}/> // "acceptTerms" is validation rules that imported from other file, but you may not need it for this

有人请帮助我。.谢谢您

1 个答案:

答案 0 :(得分:2)

如果要访问此数据,则需要取消序列化该数组。

$data['section2_grey_section'];
$result = unserialize($data['section2_grey_section']['0']);

使用反序列化,数据以数组形式转换。 然后,您可以使用字段。

$result['bigimg_link']