Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
donaldG committed Dec 15, 2014
1 parent 5dd1dc8 commit 3f21daf
Show file tree
Hide file tree
Showing 11 changed files with 681 additions and 0 deletions.
88 changes: 88 additions & 0 deletions acf-exports/acf-media-credit-fields.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
[
{
"key": "group_548e1e149b239",
"title": "Media Credit",
"fields": [
{
"key": "field_548e1e18a4b85",
"label": "Media Credit",
"name": "media_credit",
"prefix": "",
"type": "repeater",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": "acf_media_credit_admin"
},
"min": "",
"max": "",
"layout": "row",
"button_label": "Add Row",
"sub_fields": [
{
"key": "field_548e1e21a4b86",
"label": "Credit",
"name": "credit",
"prefix": "",
"type": "text",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": "",
"prepend": "",
"append": "",
"maxlength": "",
"readonly": 0,
"disabled": 0
},
{
"key": "field_548e1e28a4b87",
"label": "Credit Link",
"name": "credit_link",
"prefix": "",
"type": "text",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": "",
"prepend": "",
"append": "",
"maxlength": "",
"readonly": 0,
"disabled": 0
}
]
}
],
"location": [
[
{
"param": "attachment",
"operator": "==",
"value": "all"
}
]
],
"menu_order": 0,
"position": "normal",
"style": "default",
"label_placement": "top",
"instruction_placement": "label",
"hide_on_screen": ""
}
]
5 changes: 5 additions & 0 deletions acf-exports/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php

// Silence is golden.

?>
17 changes: 17 additions & 0 deletions css/media-credit-admin-style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.media-modal #acf_media_credit_admin .acf-input{
float:none;
width:100%;
}
.media-modal #acf_media_credit_admin .acf-repeater .acf-input{
float:right;
width:63%;
margin-left:2%;
background:none;
}
.media-modal #acf_media_credit_admin .acf-repeater .acf-label{
width:33%;
background:none;
}
.media-modal #acf_media_credit_admin .acf-repeater .acf-row .acf-table-wrap{
padding-bottom:2%;
}
1 change: 1 addition & 0 deletions css/media-credit-admin-style.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions css/media-credit.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.media-credit {
font-size: 0.9em;
line-height: 1.2em; /*11px*/
text-align: right;
margin: 3px 5px;
display: block;
color: #909090;
}
.media-credit a {
font-weight: normal;
}
.media-credit-container {
text-align: center;
max-width: 100%;
}
.acf-media-credit {
font-size: .55em;
padding: 4px 0;
color: #666;
display: block;
}

1 change: 1 addition & 0 deletions css/media-credit.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

66 changes: 66 additions & 0 deletions inc/acf-media-credit-fields.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?php
if(function_exists("register_field_group"))
{
register_field_group(array (
'id' => 'acf_media-credit',
'title' => 'Media Credit',
'fields' => array (
array (
'key' => 'field_548e1e18a4b85',
'label' => 'Media Credit',
'name' => 'media_credit',
'type' => 'repeater',
'sub_fields' => array (
array (
'key' => 'field_548e1e21a4b86',
'label' => 'Credit',
'name' => 'credit',
'type' => 'text',
'column_width' => '',
'default_value' => '',
'placeholder' => '© iStockPhoto',
'prepend' => '',
'append' => '',
'formatting' => 'none',
'maxlength' => '',
),
array (
'key' => 'field_548e1e28a4b87',
'label' => 'Credit Link',
'name' => 'credit_link',
'type' => 'text',
'column_width' => '',
'default_value' => '',
'placeholder' => 'http://www.istockphoto.com/user/',
'prepend' => '',
'append' => '',
'formatting' => 'none',
'maxlength' => '',
),
),
'row_min' => '',
'row_limit' => '',
'layout' => 'row',
'button_label' => 'Add Credit',
),
),
'location' => array (
array (
array (
'param' => 'ef_media',
'operator' => '==',
'value' => 'all',
'order_no' => 0,
'group_no' => 0,
),
),
),
'options' => array (
'position' => 'normal',
'layout' => 'no_box',
'hide_on_screen' => array (
),
),
'menu_order' => 0,
));
}
91 changes: 91 additions & 0 deletions inc/acf-pro-media-credit-fields.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<?php
if( function_exists('register_field_group') ):

register_field_group(array (
'key' => 'group_548e1e149b239',
'title' => 'Media Credit',
'fields' => array (
array (
'key' => 'field_548e1e18a4b85',
'label' => 'Media Credit',
'name' => 'media_credit',
'prefix' => '',
'type' => 'repeater',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '',
'class' => '',
'id' => 'acf_media_credit_admin',
),
'min' => '',
'max' => '',
'layout' => 'row',
'button_label' => 'Add Credit',
'sub_fields' => array (
array (
'key' => 'field_548e1e21a4b86',
'label' => 'Credit',
'name' => 'credit',
'prefix' => '',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '',
'class' => '',
'id' => '',
),
'default_value' => '',
'placeholder' => '© iStockPhoto',
'prepend' => '',
'append' => '',
'maxlength' => '',
'readonly' => 0,
'disabled' => 0,
),
array (
'key' => 'field_548e1e28a4b87',
'label' => 'Credit Link',
'name' => 'credit_link',
'prefix' => '',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '',
'class' => '',
'id' => '',
),
'default_value' => '',
'placeholder' => 'http://www.istockphoto.com/user/',
'prepend' => '',
'append' => '',
'maxlength' => '',
'readonly' => 0,
'disabled' => 0,
),
),
),
),
'location' => array (
array (
array (
'param' => 'attachment',
'operator' => '==',
'value' => 'all',
),
),
),
'menu_order' => 0,
'position' => 'normal',
'style' => 'default',
'label_placement' => 'top',
'instruction_placement' => 'label',
'hide_on_screen' => '',
));

endif;
5 changes: 5 additions & 0 deletions index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php

// Silence is golden.

?>
Loading

0 comments on commit 3f21daf

Please sign in to comment.