Skip to content

Commit

Permalink
Merge pull request #221 from grueneschweiz/tiktok_bluesky_icons
Browse files Browse the repository at this point in the history
Tiktok and Bluesky icons for Person Molecules
  • Loading branch information
Michael-Schaer authored Apr 9, 2024
2 parents 69089b6 + 518cc8e commit fe83474
Show file tree
Hide file tree
Showing 17 changed files with 496 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,64 @@
"min": "",
"max": "1"
},
"layout_bluesky_editor": {
"key": "layout_bluesky_editor",
"name": "bluesky",
"label": "Bluesky",
"display": "block",
"sub_fields": [
{
"key": "field_bluesky_editor",
"label": "Bluesky Name",
"name": "bluesky",
"type": "text",
"instructions": "Use @name",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": "",
"prepend": "",
"append": "",
"maxlength": ""
}
],
"min": "",
"max": "1"
},
"layout_tiktok_editor": {
"key": "layout_tiktok_editor",
"name": "tiktok",
"label": "Tiktok",
"display": "block",
"sub_fields": [
{
"key": "field_tiktok_editor",
"label": "Tiktok",
"name": "tiktok",
"type": "text",
"instructions": "Use @name",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": "",
"prepend": "",
"append": "",
"maxlength": ""
}
],
"min": "",
"max": "1"
},
"layout_5b6c0a909418a": {
"key": "layout_5b6c0a909418a",
"name": "instagram",
Expand Down Expand Up @@ -225,6 +283,35 @@
],
"min": "",
"max": "1"
},
"layout_threads_editor": {
"key": "layout_threads_editor",
"name": "threads",
"label": "Threads",
"display": "block",
"sub_fields": [
{
"key": "field_threads_editor",
"label": "Threads Name",
"name": "threads",
"type": "text",
"instructions": "Use @name",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": "",
"prepend": "",
"append": "",
"maxlength": ""
}
],
"min": "",
"max": "1"
}
},
"button_label": "Add Contact",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,33 @@
"min": "",
"max": "1"
},
"layout_bluesky_frontend": {
"key": "layout_bluesky_frontend",
"name": "bluesky",
"label": "Bluesky",
"display": "block",
"sub_fields": [
{
"key": "field_bluesky_frontend",
"label": "Link to the bluesky profile",
"name": "link",
"aria-label": "",
"type": "url",
"instructions": "",
"required": 1,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": ""
}
],
"min": "",
"max": "1"
},
"layout_63d42064033f8": {
"key": "layout_63d42064033f8",
"name": "mastodon",
Expand Down Expand Up @@ -147,6 +174,33 @@
"min": "",
"max": "1"
},
"layout_tiktok_frontend": {
"key": "layout_tiktok_frontend",
"name": "tiktok",
"label": "Tiktok",
"display": "block",
"sub_fields": [
{
"key": "field_tiktok_frontend",
"label": "Link to the tiktok profile",
"name": "link",
"aria-label": "",
"type": "url",
"instructions": "",
"required": 1,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": ""
}
],
"min": "",
"max": "1"
},
"layout_5b6d680d1c8e1": {
"key": "layout_5b6d680d1c8e1",
"name": "instagram",
Expand Down Expand Up @@ -174,15 +228,15 @@
"min": "",
"max": "1"
},
"layout_626bcd7fbb4b2": {
"key": "layout_626bcd7fbb4b2",
"name": "tiktok",
"label": "Tiktok",
"layout_threads_frontend": {
"key": "layout_threads_frontend",
"name": "threads",
"label": "Threads",
"display": "block",
"sub_fields": [
{
"key": "field_626bcd7fbb4b3",
"label": "Link to the tiktok profile",
"key": "field_threads_frontend",
"label": "Link to the Threads profile",
"name": "link",
"aria-label": "",
"type": "url",
Expand Down
150 changes: 147 additions & 3 deletions wordpress/wp-content/themes/les-verts/acf-translate.php
Original file line number Diff line number Diff line change
Expand Up @@ -728,14 +728,41 @@
'min' => '',
'max' => '1',
),
'layout_626bcd7fbb4b2' => array(
'key' => 'layout_626bcd7fbb4b2',
'layout_threads_frontend' => array(
'key' => 'layout_threads_frontend',
'name' => 'threads',
'label' => __( 'Threads', 'lesverts' ),
'display' => 'block',
'sub_fields' => array(
array(
'key' => 'field_threads_frontend',
'label' => __( 'Link to the threads profile', 'lesverts' ),
'name' => 'link',
'aria-label' => '',
'type' => 'url',
'instructions' => '',
'required' => 1,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'default_value' => '',
'placeholder' => '',
),
),
'min' => '',
'max' => '1',
),
'layout_tiktok_frontend' => array(
'key' => 'layout_tiktok_frontend',
'name' => 'tiktok',
'label' => __( 'Tiktok', 'lesverts' ),
'display' => 'block',
'sub_fields' => array(
array(
'key' => 'field_626bcd7fbb4b3',
'key' => 'field_tiktok_frontend',
'label' => __( 'Link to the tiktok profile', 'lesverts' ),
'name' => 'link',
'aria-label' => '',
Expand All @@ -755,6 +782,33 @@
'min' => '',
'max' => '1',
),
'layout_bluesky_frontend' => array(
'key' => 'layout_bluesky_frontend',
'name' => 'bluesky',
'label' => __( 'Bluesky', 'lesverts' ),
'display' => 'block',
'sub_fields' => array(
array(
'key' => 'field_bluesky_frontend',
'label' => __( 'Link to the Bluesky profile', 'lesverts' ),
'name' => 'link',
'aria-label' => '',
'type' => 'url',
'instructions' => '',
'required' => 1,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'default_value' => '',
'placeholder' => '',
),
),
'min' => '',
'max' => '1',
),
'layout_626bcda0bb4b4' => array(
'key' => 'layout_626bcda0bb4b4',
'name' => 'linkedin',
Expand Down Expand Up @@ -6251,6 +6305,66 @@
'min' => '',
'max' => '1',
),
'layout_bluesky_editor' => array(
'key' => 'layout_bluesky_editor',
'name' => 'bluesky',
'label' => __( 'Bluesky', 'lesverts' ),
'display' => 'block',
'sub_fields' => array(
array(
'key' => 'field_bluesky_editor',
'label' => __( 'Bluesky Name', 'lesverts' ),
'name' => 'bluesky',
'aria-label' => '',
'type' => 'text',
'instructions' => __( 'Use @name', 'lesverts' ),
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'default_value' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
'maxlength' => '',
),
),
'min' => '',
'max' => '1',
),
'layout_tiktok_editor' => array(
'key' => 'layout_tiktok_editor',
'name' => 'tiktok',
'label' => __( 'Tiktok', 'lesverts' ),
'display' => 'block',
'sub_fields' => array(
array(
'key' => 'field_tiktok_editor',
'label' => __( 'Tiktok Name', 'lesverts' ),
'name' => 'tiktok',
'aria-label' => '',
'type' => 'text',
'instructions' => __( 'Use @name', 'lesverts' ),
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'default_value' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
'maxlength' => '',
),
),
'min' => '',
'max' => '1',
),
'layout_5b6c0a909418a' => array(
'key' => 'layout_5b6c0a909418a',
'name' => 'instagram',
Expand Down Expand Up @@ -6281,6 +6395,36 @@
'min' => '',
'max' => '1',
),
'layout_threads_editor' => array(
'key' => 'layout_threads_editor',
'name' => 'threads',
'label' => __( 'Threads', 'lesverts' ),
'display' => 'block',
'sub_fields' => array(
array(
'key' => 'field_threads_editor',
'label' => __( 'Threads Name', 'lesverts' ),
'name' => 'threads',
'aria-label' => '',
'type' => 'text',
'instructions' => __( 'Use @name', 'lesverts' ),
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'default_value' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
'maxlength' => '',
),
),
'min' => '',
'max' => '1',
),
),
'button_label' => __( 'Add Contact', 'lesverts' ),
'min' => '',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,25 @@
$base = 'https://twitter.com/';
$string = preg_replace( '/^(www)?\.twitter\.com\/?/', '', $string );
$string = str_replace( '@', '', $string );
} elseif ( 'tiktok' === $type ) {
$base = 'https://tiktok.com/';
$string = preg_replace( '/^(www)?\.tiktok\.com\/?/', '', $string );
$string = str_replace( '@', '', $string );
$string = "@" . $string;
} elseif ( 'bluesky' === $type ) {
$base = 'https://bsky.app/profile/';
$string = preg_replace( '/^(www)?\.bsky\.app\/?/', '', $string );
$string = str_replace( '@', '', $string );
$string = $string . ".bsky.social";
} elseif ( 'instagram' === $type ) {
$base = 'https://www.instagram.com/';
$string = preg_replace( '/^(www)?\.instagram\.com\/?/', '', $string );
$string = str_replace( '@', '', $string );
} elseif ( 'threads' === $type ) {
$base = 'https://threads.net/';
$string = preg_replace( '/^(www)?\.threads\.net\/?/', '', $string );
$string = str_replace( '@', '', $string );
$string = "@" . $string;
} elseif ( 'mastodon' === $type ) {
if ( preg_match( '/^@(\S+)@(\S+)$/', $string, $matches ) ) {
$base = 'https://' . $matches[2];
Expand Down
Loading

0 comments on commit fe83474

Please sign in to comment.