get_settings_for_display( 'contact_heading' ); $contact_fields = $this->get_settings_for_display( 'contact_fields' ); $social_heading = $this->get_settings_for_display( 'social_heading' ); $social_profiles = $this->get_settings_for_display( 'social_profiles' ); if ( empty( $contact_fields ) && empty( $social_profiles ) && empty( $contact_heading ) && empty( $social_heading ) ) { return; } ?>
$default, ] ); /** * Group: Contact Information Section */ $this->start_controls_section( 'fields_section', [ 'label' => esc_html__( 'Contact Information', 'copy-the-code' ), ] ); // Contact fields. $this->add_control( 'contact_heading', [ 'label' => esc_html__( 'Heading', 'copy-the-code' ), 'type' => Controls_Manager::TEXT, 'default' => esc_html__( 'Contact Information', 'copy-the-code' ), 'placeholder' => esc_html__( 'Enter your contact fields heading', 'copy-the-code' ), ] ); // Contact fields. $this->add_control( 'contact_fields', [ 'label' => esc_html__( 'Contact Fields', 'copy-the-code' ), 'type' => Controls_Manager::REPEATER, 'fields' => [[ 'name' => 'label', 'label' => esc_html__( 'Label', 'copy-the-code' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, ], [ 'name' => 'value', 'label' => esc_html__( 'Value', 'copy-the-code' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, ]], 'default' => [ [ 'label' => esc_html__( 'Name: ', 'copy-the-code' ), 'value' => 'John Doe', ], [ 'label' => esc_html__( 'Email: ', 'copy-the-code' ), 'value' => 'contact@clipboard.agency', ], [ 'label' => esc_html__( 'Phone: ', 'copy-the-code' ), 'value' => '+1 123 456 7890', ], [ 'label' => esc_html__( 'Address: ', 'copy-the-code' ), 'value' => '123 Street, City, Country', ] ], 'title_field' => '{{{ name }}}', ] ); $this->end_controls_section(); /** * Group: Social Profiles Section */ $this->start_controls_section( 'social_profiles_section', [ 'label' => esc_html__( 'Social Profiles', 'copy-the-code' ), ] ); // Social profiles. $this->add_control( 'social_heading', [ 'label' => esc_html__( 'Heading', 'copy-the-code' ), 'type' => Controls_Manager::TEXT, 'default' => esc_html__( 'Social Profiles', 'copy-the-code' ), 'placeholder' => esc_html__( 'Enter your social profiles heading', 'copy-the-code' ), ] ); // Social profiles. $this->add_control( 'social_profiles', [ 'label' => esc_html__( 'Social Profiles', 'copy-the-code' ), 'type' => Controls_Manager::REPEATER, 'fields' => [[ 'name' => 'link', 'label' => esc_html__( 'Link', 'copy-the-code' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, ]], 'default' => [[ 'link' => 'https://facebook.com', ], [ 'link' => 'https://twitter.com', ], [ 'link' => 'https://linkedin.com', ]], 'title_field' => '{{{ name }}}', ] ); $this->end_controls_section(); Helpers::register_copy_button_section( $this, [ 'button_text' => esc_html__( 'Copy Contact Information', 'copy-the-code' ), ] ); Helpers::register_pro_sections( $this, [ 'Box', 'Contact Heading', 'Contact Fields', 'Contact Field', 'Field Label', 'Field Value', 'Social Heading', 'Social Icon' ] ); Helpers::register_copy_button_style_section( $this ); } }