├── smashing-fields-approach-1 └── smashing-fields.php ├── smashing-fields-approach-2 └── smashing-fields.php └── smashing-fields-approach-3 ├── smashing-fields.php └── vendor └── advanced-custom-fields ├── README.md ├── acf.php ├── core ├── actions │ └── export.php ├── api.php ├── controllers │ ├── addons.php │ ├── everything_fields.php │ ├── export.php │ ├── field_group.php │ ├── field_groups.php │ ├── input.php │ ├── location.php │ ├── post.php │ ├── revisions.php │ ├── third_party.php │ └── upgrade.php ├── fields │ ├── _base.php │ ├── _functions.php │ ├── checkbox.php │ ├── color_picker.php │ ├── date_picker │ │ ├── date_picker.php │ │ ├── images │ │ │ ├── ui-bg_flat_0_aaaaaa_40x100.png │ │ │ ├── ui-bg_flat_55_5bc6f5_40x100.png │ │ │ ├── ui-bg_flat_75_ffffff_40x100.png │ │ │ ├── ui-bg_glass_65_ffffff_1x400.png │ │ │ ├── ui-bg_glass_75_dadada_1x400.png │ │ │ ├── ui-bg_glass_75_e6e6e6_1x400.png │ │ │ ├── ui-bg_glass_95_fef1ec_1x400.png │ │ │ ├── ui-bg_highlight-soft_0_444444_1x100.png │ │ │ ├── ui-icons_222222_256x240.png │ │ │ ├── ui-icons_2e83ff_256x240.png │ │ │ ├── ui-icons_454545_256x240.png │ │ │ ├── ui-icons_888888_256x240.png │ │ │ └── ui-icons_cd0a0a_256x240.png │ │ ├── jquery.ui.datepicker.js │ │ └── style.date_picker.css │ ├── dummy.php │ ├── email.php │ ├── file.php │ ├── google-map.php │ ├── image.php │ ├── message.php │ ├── number.php │ ├── page_link.php │ ├── password.php │ ├── post_object.php │ ├── radio.php │ ├── relationship.php │ ├── select.php │ ├── tab.php │ ├── taxonomy.php │ ├── text.php │ ├── textarea.php │ ├── true_false.php │ ├── user.php │ └── wysiwyg.php └── views │ ├── meta_box_fields.php │ ├── meta_box_location.php │ └── meta_box_options.php ├── css ├── acf.css ├── field-group.css ├── global.css └── input.css ├── images ├── add-ons │ ├── cf7-field-thumb.jpg │ ├── date-time-field-thumb.jpg │ ├── flexible-content-field-thumb.jpg │ ├── gallery-field-thumb.jpg │ ├── google-maps-field-thumb.jpg │ ├── gravity-forms-field-thumb.jpg │ ├── options-page-thumb.jpg │ └── repeater-field-thumb.jpg ├── arrows.png ├── arrows@2x.png ├── sprite.png ├── sprite@2x.png ├── wpspin_light.gif └── wpspin_light@2x.gif ├── js ├── field-group.js ├── field-group.min.js ├── input.js ├── input.min.js ├── input │ ├── _listener.js │ ├── _listener.min.js │ ├── acf.js │ ├── ajax.js │ ├── color-picker.js │ ├── date-picker.js │ ├── file.js │ ├── google-map.js │ ├── image.js │ ├── radio.js │ ├── relationship.js │ ├── tab.js │ ├── validation.js │ └── wysiwyg.js └── tinymce.code.min.js ├── lang ├── acf-cs_CZ.mo ├── acf-cs_CZ.po ├── acf-de_DE.mo ├── acf-de_DE.po ├── acf-es_ES.mo ├── acf-es_ES.po ├── acf-fa_IR.mo ├── acf-fa_IR.po ├── acf-fi_FI.mo ├── acf-fi_FI.po ├── acf-fr_FR.mo ├── acf-fr_FR.po ├── acf-he_IL.mo ├── acf-he_IL.po ├── acf-it_IT.mo ├── acf-it_IT.po ├── acf-ja.mo ├── acf-ja.po ├── acf-nl_NL.mo ├── acf-nl_NL.po ├── acf-pl_PL.mo ├── acf-pl_PL.po ├── acf-pt_BR.mo ├── acf-pt_BR.po ├── acf-pt_PT.mo ├── acf-pt_PT.po ├── acf-ru-RU.mo ├── acf-ru_RU.mo ├── acf-ru_RU.po ├── acf-sk_SK.mo ├── acf-sk_SK.po ├── acf-sr_RS.mo ├── acf-sr_RS.po ├── acf-sv_SE.mo ├── acf-sv_SE.po ├── acf-tr_TR.mo ├── acf-tr_TR.po ├── acf-uk.mo ├── acf-uk.po ├── acf-zh_CN.mo ├── acf-zh_CN.po └── acf.pot ├── readme.txt ├── screenshot-1.png ├── screenshot-2.png ├── screenshot-3.png └── screenshot-4.png /smashing-fields-approach-1/smashing-fields.php: -------------------------------------------------------------------------------- 1 | 33 |
34 |

My Awesome Settings Page

admin_notice(); 37 | } ?> 38 |
39 | 44 |
45 |
49 |
50 |

Your settings have been updated!

51 |
'awesome_text_field', 78 | 'label' => 'Sample Text Field', 79 | 'section' => 'our_first_section', 80 | 'type' => 'text', 81 | 'placeholder' => 'Some text', 82 | 'helper' => 'Does this help?', 83 | 'supplimental' => 'I am underneath!', 84 | ), 85 | array( 86 | 'uid' => 'awesome_password_field', 87 | 'label' => 'Sample Password Field', 88 | 'section' => 'our_first_section', 89 | 'type' => 'password', 90 | ), 91 | array( 92 | 'uid' => 'awesome_number_field', 93 | 'label' => 'Sample Number Field', 94 | 'section' => 'our_first_section', 95 | 'type' => 'number', 96 | ), 97 | array( 98 | 'uid' => 'awesome_textarea', 99 | 'label' => 'Sample Text Area', 100 | 'section' => 'our_first_section', 101 | 'type' => 'textarea', 102 | ), 103 | array( 104 | 'uid' => 'awesome_select', 105 | 'label' => 'Sample Select Dropdown', 106 | 'section' => 'our_first_section', 107 | 'type' => 'select', 108 | 'options' => array( 109 | 'option1' => 'Option 1', 110 | 'option2' => 'Option 2', 111 | 'option3' => 'Option 3', 112 | 'option4' => 'Option 4', 113 | 'option5' => 'Option 5', 114 | ), 115 | 'default' => array() 116 | ), 117 | array( 118 | 'uid' => 'awesome_multiselect', 119 | 'label' => 'Sample Multi Select', 120 | 'section' => 'our_first_section', 121 | 'type' => 'multiselect', 122 | 'options' => array( 123 | 'option1' => 'Option 1', 124 | 'option2' => 'Option 2', 125 | 'option3' => 'Option 3', 126 | 'option4' => 'Option 4', 127 | 'option5' => 'Option 5', 128 | ), 129 | 'default' => array() 130 | ), 131 | array( 132 | 'uid' => 'awesome_radio', 133 | 'label' => 'Sample Radio Buttons', 134 | 'section' => 'our_first_section', 135 | 'type' => 'radio', 136 | 'options' => array( 137 | 'option1' => 'Option 1', 138 | 'option2' => 'Option 2', 139 | 'option3' => 'Option 3', 140 | 'option4' => 'Option 4', 141 | 'option5' => 'Option 5', 142 | ), 143 | 'default' => array() 144 | ), 145 | array( 146 | 'uid' => 'awesome_checkboxes', 147 | 'label' => 'Sample Checkboxes', 148 | 'section' => 'our_first_section', 149 | 'type' => 'checkbox', 150 | 'options' => array( 151 | 'option1' => 'Option 1', 152 | 'option2' => 'Option 2', 153 | 'option3' => 'Option 3', 154 | 'option4' => 'Option 4', 155 | 'option5' => 'Option 5', 156 | ), 157 | 'default' => array() 158 | ) 159 | ); 160 | foreach( $fields as $field ){ 161 | 162 | add_settings_field( $field['uid'], $field['label'], array( $this, 'field_callback' ), 'smashing_fields', $field['section'], $field ); 163 | register_setting( 'smashing_fields', $field['uid'] ); 164 | } 165 | } 166 | 167 | public function field_callback( $arguments ) { 168 | 169 | $value = get_option( $arguments['uid'] ); 170 | 171 | if( ! $value ) { 172 | $value = $arguments['default']; 173 | } 174 | 175 | switch( $arguments['type'] ){ 176 | case 'text': 177 | case 'password': 178 | case 'number': 179 | printf( '', $arguments['uid'], $arguments['type'], $arguments['placeholder'], $value ); 180 | break; 181 | case 'textarea': 182 | printf( '', $arguments['uid'], $arguments['placeholder'], $value ); 183 | break; 184 | case 'select': 185 | case 'multiselect': 186 | if( ! empty ( $arguments['options'] ) && is_array( $arguments['options'] ) ){ 187 | $attributes = ''; 188 | $options_markup = ''; 189 | foreach( $arguments['options'] as $key => $label ){ 190 | $options_markup .= sprintf( '', $key, selected( $value[ array_search( $key, $value, true ) ], $key, false ), $label ); 191 | } 192 | if( $arguments['type'] === 'multiselect' ){ 193 | $attributes = ' multiple="multiple" '; 194 | } 195 | printf( '', $arguments['uid'], $attributes, $options_markup ); 196 | } 197 | break; 198 | case 'radio': 199 | case 'checkbox': 200 | if( ! empty ( $arguments['options'] ) && is_array( $arguments['options'] ) ){ 201 | $options_markup = ''; 202 | $iterator = 0; 203 | foreach( $arguments['options'] as $key => $label ){ 204 | $iterator++; 205 | $options_markup .= sprintf( '
', $arguments['uid'], $arguments['type'], $key, checked( $value[ array_search( $key, $value, true ) ], $key, false ), $label, $iterator ); 206 | } 207 | printf( '
%s
', $options_markup ); 208 | } 209 | break; 210 | } 211 | 212 | if( $helper = $arguments['helper'] ){ 213 | printf( ' %s', $helper ); 214 | } 215 | 216 | if( $supplimental = $arguments['supplimental'] ){ 217 | printf( '

%s

', $supplimental ); 218 | } 219 | 220 | } 221 | 222 | } 223 | new Smashing_Fields_Plugin(); 224 | -------------------------------------------------------------------------------- /smashing-fields-approach-2/smashing-fields.php: -------------------------------------------------------------------------------- 1 | handle_form(); 31 | } ?> 32 |
33 |

My Awesome Settings Page

34 |
35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 |
49 |

50 | 51 |

52 |
53 |
58 |
59 |

Sorry, your nonce was not correct. Please try again.

60 |
72 |
73 |

Your fields were saved!

74 |
76 |
77 |

Your username or email were invalid.

78 |
setup_options(); 21 | } 22 | 23 | public function update_acf_settings_path( $path ) { 24 | $path = plugin_dir_path( __FILE__ ) . 'vendor/advanced-custom-fields/'; 25 | return $path; 26 | } 27 | 28 | public function update_acf_settings_dir( $dir ) { 29 | $dir = plugin_dir_url( __FILE__ ) . 'vendor/advanced-custom-fields/'; 30 | return $dir; 31 | } 32 | 33 | public function create_plugin_settings_page() { 34 | // Add the menu item and page 35 | $page_title = 'My Awesome Settings Page'; 36 | $menu_title = 'Awesome Plugin'; 37 | $capability = 'manage_options'; 38 | $slug = 'smashing_fields'; 39 | $callback = array( $this, 'plugin_settings_page_content' ); 40 | $icon = 'dashicons-admin-plugins'; 41 | $position = 100; 42 | 43 | add_menu_page( $page_title, $menu_title, $capability, $slug, $callback, $icon, $position ); 44 | } 45 | 46 | public function plugin_settings_page_content() { 47 | do_action('acf/input/admin_head'); 48 | do_action('acf/input/admin_enqueue_scripts'); 49 | 50 | $options = array( 51 | 'id' => 'acf-form', 52 | 'post_id' => 'options', 53 | 'new_post' => false, 54 | 'field_groups' => array( 'acf_awesome-options' ), 55 | 'return' => admin_url('admin.php?page=smashing_fields'), 56 | 'submit_value' => 'Update', 57 | ); 58 | acf_form( $options ); 59 | } 60 | 61 | public function add_acf_variables() { 62 | acf_form_head(); 63 | } 64 | 65 | public function setup_options() { 66 | 67 | if( function_exists( 'register_field_group' ) ) { 68 | register_field_group(array ( 69 | 'id' => 'acf_awesome-options', 70 | 'title' => 'Awesome Options', 71 | 'fields' => array ( 72 | array ( 73 | 'key' => 'field_562dc35316a0f', 74 | 'label' => 'Awesome Name', 75 | 'name' => 'awesome_name', 76 | 'type' => 'text', 77 | 'default_value' => '', 78 | 'placeholder' => '', 79 | 'prepend' => '', 80 | 'append' => '', 81 | 'formatting' => 'html', 82 | 'maxlength' => '', 83 | ), 84 | array ( 85 | 'key' => 'field_562dc9affedd6', 86 | 'label' => 'Awesome Date', 87 | 'name' => 'awesome_date', 88 | 'type' => 'date_picker', 89 | 'date_format' => 'yymmdd', 90 | 'display_format' => 'dd/mm/yy', 91 | 'first_day' => 1, 92 | ), 93 | array ( 94 | 'key' => 'field_562dc9bffedd7', 95 | 'label' => 'Awesome WYSIWYG', 96 | 'name' => 'awesome_wysiwyg', 97 | 'type' => 'wysiwyg', 98 | 'default_value' => '', 99 | 'toolbar' => 'full', 100 | 'media_upload' => 'yes', 101 | ), 102 | ), 103 | 'location' => array ( 104 | array ( 105 | array ( 106 | 'param' => 'options_page', 107 | 'operator' => '==', 108 | 'value' => 'smashing_fields', 109 | ), 110 | ), 111 | ), 112 | 'menu_order' => 0, 113 | 'position' => 'normal', 114 | 'style' => 'default', 115 | 'label_placement' => 'top', 116 | 'instruction_placement' => 'label', 117 | 'hide_on_screen' => '', 118 | 'active' => 1, 119 | 'description' => '', 120 | )); 121 | } 122 | } 123 | 124 | } 125 | new Smashing_Fields_Plugin(); 126 | -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/README.md: -------------------------------------------------------------------------------- 1 | # Advanced Custom Fields 2 | 3 | Welcome to the official repository for Advanced Custom Fields WordPress plugin. 4 | 5 | ----------------------- 6 | 7 | * Readme : https://github.com/elliotcondon/acf/blob/master/readme.txt 8 | * WordPress repository: https://wordpress.org/plugins/advanced-custom-fields/ 9 | * Website : http://www.advancedcustomfields.com/ 10 | * Documentation: http://www.advancedcustomfields.com/resources/ 11 | * Support: http://support.advancedcustomfields.com/ -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/core/actions/export.php: -------------------------------------------------------------------------------- 1 | array(), 18 | 'nonce' => '' 19 | ); 20 | $my_options = array_merge( $defaults, $_POST ); 21 | 22 | 23 | // validate nonce 24 | if( !wp_verify_nonce($my_options['nonce'], 'export') ) 25 | { 26 | wp_die(__("Error",'acf')); 27 | } 28 | 29 | 30 | // check for posts 31 | if( empty($my_options['acf_posts']) ) 32 | { 33 | wp_die(__("No ACF groups selected",'acf')); 34 | } 35 | 36 | 37 | /** 38 | * Version number for the export format. 39 | * 40 | * Bump this when something changes that might affect compatibility. 41 | * 42 | * @since 2.5.0 43 | */ 44 | define( 'WXR_VERSION', '1.1' ); 45 | 46 | 47 | /* 48 | * fix_line_breaks 49 | * 50 | * This function will loop through all array pieces and correct double line breaks from DB to XML 51 | * 52 | * @type function 53 | * @date 2/12/2013 54 | * @since 5.0.0 55 | * 56 | * @param $v (mixed) 57 | * @return $v (mixed) 58 | */ 59 | 60 | function fix_line_breaks( $v ) 61 | { 62 | if( is_array($v) ) 63 | { 64 | foreach( array_keys($v) as $k ) 65 | { 66 | $v[ $k ] = fix_line_breaks( $v[ $k ] ); 67 | } 68 | } 69 | elseif( is_string($v) ) 70 | { 71 | $v = str_replace("\r\n", "\r", $v); 72 | } 73 | 74 | return $v; 75 | } 76 | 77 | 78 | /** 79 | * Wrap given string in XML CDATA tag. 80 | * 81 | * @since 2.1.0 82 | * 83 | * @param string $str String to wrap in XML CDATA tag. 84 | */ 85 | function wxr_cdata( $str ) { 86 | if ( seems_utf8( $str ) == false ) 87 | $str = utf8_encode( $str ); 88 | 89 | // $str = ent2ncr(esc_html($str)); 90 | $str = "'; 91 | 92 | return $str; 93 | } 94 | 95 | /** 96 | * Return the URL of the site 97 | * 98 | * @since 2.5.0 99 | * 100 | * @return string Site URL. 101 | */ 102 | function wxr_site_url() { 103 | // ms: the base url 104 | if ( is_multisite() ) 105 | return network_home_url(); 106 | // wp: the blog url 107 | else 108 | return get_site_url(); 109 | } 110 | 111 | /** 112 | * Output a tag_description XML tag from a given tag object 113 | * 114 | * @since 2.3.0 115 | * 116 | * @param object $tag Tag Object 117 | */ 118 | function wxr_tag_description( $tag ) { 119 | if ( empty( $tag->description ) ) 120 | return; 121 | 122 | echo '' . wxr_cdata( $tag->description ) . ''; 123 | } 124 | 125 | /** 126 | * Output a term_name XML tag from a given term object 127 | * 128 | * @since 2.9.0 129 | * 130 | * @param object $term Term Object 131 | */ 132 | function wxr_term_name( $term ) { 133 | if ( empty( $term->name ) ) 134 | return; 135 | 136 | echo '' . wxr_cdata( $term->name ) . ''; 137 | } 138 | 139 | /** 140 | * Output a term_description XML tag from a given term object 141 | * 142 | * @since 2.9.0 143 | * 144 | * @param object $term Term Object 145 | */ 146 | function wxr_term_description( $term ) { 147 | if ( empty( $term->description ) ) 148 | return; 149 | 150 | echo '' . wxr_cdata( $term->description ) . ''; 151 | } 152 | 153 | /** 154 | * Output list of authors with posts 155 | * 156 | * @since 3.1.0 157 | */ 158 | function wxr_authors_list() { 159 | global $wpdb; 160 | 161 | $authors = array(); 162 | $results = $wpdb->get_results( "SELECT DISTINCT post_author FROM $wpdb->posts" ); 163 | foreach ( (array) $results as $result ) 164 | $authors[] = get_userdata( $result->post_author ); 165 | 166 | $authors = array_filter( $authors ); 167 | 168 | foreach( $authors as $author ) { 169 | echo "\t"; 170 | echo '' . $author->ID . ''; 171 | echo '' . $author->user_login . ''; 172 | echo '' . $author->user_email . ''; 173 | echo '' . wxr_cdata( $author->display_name ) . ''; 174 | echo '' . wxr_cdata( $author->user_firstname ) . ''; 175 | echo '' . wxr_cdata( $author->user_lastname ) . ''; 176 | echo "\n"; 177 | } 178 | } 179 | 180 | header( 'Content-Description: File Transfer' ); 181 | header( 'Content-Disposition: attachment; filename=advanced-custom-field-export.xml' ); 182 | header( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ), true ); 183 | 184 | 185 | echo '\n"; 186 | 187 | ?> 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 213 | 214 | 215 | <?php bloginfo_rss( 'name' ); ?> 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | in_the_loop = true; // Fake being in the loop. 228 | 229 | // create SQL with %d placeholders 230 | $where = 'WHERE ID IN (' . substr(str_repeat('%d,', count($my_options['acf_posts'])), 0, -1) . ')'; 231 | 232 | // now prepare the SQL based on the %d + $_POST data 233 | $posts = $wpdb->get_results( $wpdb->prepare("SELECT * FROM {$wpdb->posts} $where", $my_options['acf_posts'])); 234 | 235 | // Begin Loop 236 | foreach ( $posts as $post ) { 237 | setup_postdata( $post ); 238 | ?> 239 | 240 | <?php echo apply_filters( 'the_title_rss', $post->post_title ); ?> 241 | 242 | 243 | 244 | 245 | ID; ?> 246 | post_date; ?> 247 | post_date_gmt; ?> 248 | comment_status; ?> 249 | ping_status; ?> 250 | post_name; ?> 251 | post_status; ?> 252 | post_parent; ?> 253 | menu_order; ?> 254 | post_type; ?> 255 | post_password; ?> 256 | get_results( $wpdb->prepare( "SELECT * FROM $wpdb->postmeta WHERE post_id = %d", $post->ID ) ); 257 | foreach( $postmeta as $meta ) : if ( $meta->meta_key != '_edit_lock' ) : 258 | 259 | $meta->meta_value = maybe_unserialize( $meta->meta_value ); 260 | $meta->meta_value = fix_line_breaks( $meta->meta_value ); 261 | $meta->meta_value = maybe_serialize( $meta->meta_value ); 262 | 263 | ?> 264 | 265 | meta_key; ?> 266 | meta_value ); ?> 267 | 268 | 269 | 270 | 274 | 275 | 276 | -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/core/controllers/addons.php: -------------------------------------------------------------------------------- 1 | __("Repeater Field",'acf'), 131 | 'description' => __("Create infinite rows of repeatable data with this versatile interface!",'acf'), 132 | 'thumbnail' => $dir . 'images/add-ons/repeater-field-thumb.jpg', 133 | 'active' => class_exists('acf_field_repeater'), 134 | 'url' => 'http://www.advancedcustomfields.com/add-ons/repeater-field/' 135 | ); 136 | $premium[] = array( 137 | 'title' => __("Gallery Field",'acf'), 138 | 'description' => __("Create image galleries in a simple and intuitive interface!",'acf'), 139 | 'thumbnail' => $dir . 'images/add-ons/gallery-field-thumb.jpg', 140 | 'active' => class_exists('acf_field_gallery'), 141 | 'url' => 'http://www.advancedcustomfields.com/add-ons/gallery-field/' 142 | ); 143 | $premium[] = array( 144 | 'title' => __("Options Page",'acf'), 145 | 'description' => __("Create global data to use throughout your website!",'acf'), 146 | 'thumbnail' => $dir . 'images/add-ons/options-page-thumb.jpg', 147 | 'active' => class_exists('acf_options_page_plugin'), 148 | 'url' => 'http://www.advancedcustomfields.com/add-ons/options-page/' 149 | ); 150 | $premium[] = array( 151 | 'title' => __("Flexible Content Field",'acf'), 152 | 'description' => __("Create unique designs with a flexible content layout manager!",'acf'), 153 | 'thumbnail' => $dir . 'images/add-ons/flexible-content-field-thumb.jpg', 154 | 'active' => class_exists('acf_field_flexible_content'), 155 | 'url' => 'http://www.advancedcustomfields.com/add-ons/flexible-content-field/' 156 | ); 157 | 158 | 159 | $free = array(); 160 | $free[] = array( 161 | 'title' => __("Gravity Forms Field",'acf'), 162 | 'description' => __("Creates a select field populated with Gravity Forms!",'acf'), 163 | 'thumbnail' => $dir . 'images/add-ons/gravity-forms-field-thumb.jpg', 164 | 'active' => class_exists('gravity_forms_field'), 165 | 'url' => 'https://github.com/stormuk/Gravity-Forms-ACF-Field/' 166 | ); 167 | $free[] = array( 168 | 'title' => __("Date & Time Picker",'acf'), 169 | 'description' => __("jQuery date & time picker",'acf'), 170 | 'thumbnail' => $dir . 'images/add-ons/date-time-field-thumb.jpg', 171 | 'active' => class_exists('acf_field_date_time_picker'), 172 | 'url' => 'http://wordpress.org/extend/plugins/acf-field-date-time-picker/' 173 | ); 174 | $free[] = array( 175 | 'title' => __("Location Field",'acf'), 176 | 'description' => __("Find addresses and coordinates of a desired location",'acf'), 177 | 'thumbnail' => $dir . 'images/add-ons/google-maps-field-thumb.jpg', 178 | 'active' => class_exists('acf_field_location'), 179 | 'url' => 'https://github.com/elliotcondon/acf-location-field/' 180 | ); 181 | $free[] = array( 182 | 'title' => __("Contact Form 7 Field",'acf'), 183 | 'description' => __("Assign one or more contact form 7 forms to a post",'acf'), 184 | 'thumbnail' => $dir . 'images/add-ons/cf7-field-thumb.jpg', 185 | 'active' => class_exists('acf_field_cf7'), 186 | 'url' => 'https://github.com/taylormsj/acf-cf7-field/' 187 | ); 188 | 189 | ?> 190 |
191 | 192 |

193 |

194 | 195 |
196 |


197 |

198 |
199 | 201 |

202 |
203 | */ ?> 204 | 205 |
206 | 207 |
208 | 209 |
210 | 211 | 212 | 213 |
214 |

215 |

216 |
217 | 224 |
225 | 226 |
227 | 228 |
229 | 230 |
231 | 232 | 233 | 234 |
235 |

236 |

237 |
238 | 245 |
246 | 247 |
248 | 249 | 250 |
251 | 252 | 253 | 278 | -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/core/controllers/input.php: -------------------------------------------------------------------------------- 1 | ID ); 57 | } 58 | 59 | 60 | // l10n 61 | $l10n = apply_filters( 'acf/input/admin_l10n', array( 62 | 'core' => array( 63 | 'expand_details' => __("Expand Details",'acf'), 64 | 'collapse_details' => __("Collapse Details",'acf') 65 | ), 66 | 'validation' => array( 67 | 'error' => __("Validation Failed. One or more fields below are required.",'acf') 68 | ) 69 | )); 70 | 71 | 72 | // options 73 | $o = array( 74 | 'post_id' => $post_id, 75 | 'nonce' => wp_create_nonce( 'acf_nonce' ), 76 | 'admin_url' => admin_url(), 77 | 'ajaxurl' => admin_url( 'admin-ajax.php' ), 78 | 'wp_version' => $wp_version 79 | ); 80 | 81 | 82 | // toolbars 83 | $t = array(); 84 | 85 | if( is_array($toolbars) ){ foreach( $toolbars as $label => $rows ){ 86 | 87 | $label = sanitize_title( $label ); 88 | $label = str_replace('-', '_', $label); 89 | 90 | $t[ $label ] = array(); 91 | 92 | if( is_array($rows) ){ foreach( $rows as $k => $v ){ 93 | 94 | $t[ $label ][ 'theme_advanced_buttons' . $k ] = implode(',', $v); 95 | 96 | }} 97 | }} 98 | 99 | 100 | ?> 101 | 119 | -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/core/controllers/revisions.php: -------------------------------------------------------------------------------- 1 | ID) ) 124 | { 125 | $post_id = $post->ID; 126 | } 127 | else 128 | { 129 | return $return; 130 | } 131 | 132 | 133 | // get field objects 134 | $fields = get_field_objects( $post_id, array('format_value' => false ) ); 135 | 136 | 137 | if( $fields ) 138 | { 139 | foreach( $fields as $field ) 140 | { 141 | // dud field? 142 | if( !$field || !isset($field['name']) || !$field['name'] ) 143 | { 144 | continue; 145 | } 146 | 147 | 148 | // Add field key / label 149 | $return[ $field['name'] ] = $field['label']; 150 | 151 | 152 | // load value 153 | add_filter('_wp_post_revision_field_' . $field['name'], array($this, 'wp_post_revision_field'), 10, 4); 154 | 155 | 156 | // WP 3.5: left vs right 157 | // Add a value of the revision ID (as there is no way to determin this within the '_wp_post_revision_field_' filter!) 158 | if( isset($_GET['action'], $_GET['left'], $_GET['right']) && $_GET['action'] == 'diff' ) 159 | { 160 | global $left_revision, $right_revision; 161 | 162 | $left_revision->$field['name'] = 'revision_id=' . $_GET['left']; 163 | $right_revision->$field['name'] = 'revision_id=' . $_GET['right']; 164 | } 165 | 166 | } 167 | } 168 | 169 | 170 | return $return; 171 | 172 | } 173 | 174 | 175 | /* 176 | * wp_post_revision_field 177 | * 178 | * This filter will load the value for the given field and return it for rendering 179 | * 180 | * @type filter 181 | * @date 11/08/13 182 | * 183 | * @param $value (mixed) should be false as it has not yet been loaded 184 | * @param $field_name (string) The name of the field 185 | * @param $post (mixed) Holds the $post object to load from - in WP 3.5, this is not passed! 186 | * @param $direction (string) to / from - not used 187 | * @return $value (string) 188 | */ 189 | 190 | function wp_post_revision_field( $value, $field_name, $post = null, $direction = false) 191 | { 192 | // vars 193 | $post_id = 0; 194 | 195 | 196 | // determin $post_id 197 | if( isset($post->ID) ) 198 | { 199 | // WP 3.6 200 | $post_id = $post->ID; 201 | } 202 | elseif( isset($_GET['revision']) ) 203 | { 204 | // WP 3.5 205 | $post_id = (int) $_GET['revision']; 206 | } 207 | elseif( strpos($value, 'revision_id=') !== false ) 208 | { 209 | // WP 3.5 (left vs right) 210 | $post_id = (int) str_replace('revision_id=', '', $value); 211 | } 212 | 213 | 214 | // load field 215 | $field = get_field_object($field_name, $post_id, array('format_value' => false )); 216 | $value = $field['value']; 217 | 218 | 219 | // default formatting 220 | if( is_array($value) ) 221 | { 222 | $value = implode(', ', $value); 223 | } 224 | 225 | 226 | // format 227 | if( $value ) 228 | { 229 | // image? 230 | if( $field['type'] == 'image' || $field['type'] == 'file' ) 231 | { 232 | $url = wp_get_attachment_url($value); 233 | $value = $value . ' (' . $url . ')'; 234 | } 235 | } 236 | 237 | 238 | // return 239 | return $value; 240 | } 241 | 242 | 243 | /* 244 | * wp_restore_post_revision 245 | * 246 | * This action will copy and paste the metadata from a revision to the post 247 | * 248 | * @type action 249 | * @date 11/08/13 250 | * 251 | * @param $parent_id (int) the destination post 252 | * @return $revision_id (int) the source post 253 | */ 254 | 255 | function wp_restore_post_revision( $post_id, $revision_id ) { 256 | 257 | // global 258 | global $wpdb; 259 | 260 | 261 | // vars 262 | $fields = array(); 263 | 264 | 265 | // get field from postmeta 266 | $rows = $wpdb->get_results( $wpdb->prepare( 267 | "SELECT * FROM $wpdb->postmeta WHERE post_id=%d", 268 | $revision_id 269 | ), ARRAY_A); 270 | 271 | 272 | // populate $fields 273 | if( $rows ) 274 | { 275 | foreach( $rows as $row ) 276 | { 277 | // meta_key must start with '_' 278 | if( substr($row['meta_key'], 0, 1) !== '_' ) 279 | { 280 | continue; 281 | } 282 | 283 | 284 | // meta_value must start with 'field_' 285 | if( substr($row['meta_value'], 0, 6) !== 'field_' ) 286 | { 287 | continue; 288 | } 289 | 290 | 291 | // this is an ACF field, append to $fields 292 | $fields[] = substr($row['meta_key'], 1); 293 | 294 | } 295 | } 296 | 297 | 298 | // save data 299 | if( $rows ) 300 | { 301 | foreach( $rows as $row ) 302 | { 303 | if( in_array($row['meta_key'], $fields) ) 304 | { 305 | update_post_meta( $post_id, $row['meta_key'], $row['meta_value'] ); 306 | } 307 | } 308 | } 309 | 310 | } 311 | 312 | 313 | } 314 | 315 | new acf_revisions(); 316 | 317 | ?> -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/core/controllers/third_party.php: -------------------------------------------------------------------------------- 1 | false, 55 | 'show_ui' => true 56 | ); 57 | } 58 | 59 | 60 | // return 61 | return $args; 62 | } 63 | 64 | 65 | /* 66 | * admin_head_tabify 67 | * 68 | * @description: 69 | * @since 3.5.1 70 | * @created: 9/10/12 71 | */ 72 | 73 | function admin_head_tabify() 74 | { 75 | // remove ACF from the tabs 76 | add_filter('tabify_posttypes', array($this, 'tabify_posttypes')); 77 | 78 | 79 | // add acf metaboxes to list 80 | add_action('tabify_add_meta_boxes' , array($this,'tabify_add_meta_boxes')); 81 | 82 | } 83 | 84 | 85 | /* 86 | * tabify_posttypes 87 | * 88 | * @description: 89 | * @since 3.5.1 90 | * @created: 9/10/12 91 | */ 92 | 93 | function tabify_posttypes( $posttypes ) 94 | { 95 | if( isset($posttypes['acf']) ) 96 | { 97 | unset( $posttypes['acf'] ); 98 | } 99 | 100 | return $posttypes; 101 | } 102 | 103 | 104 | /* 105 | * tabify_add_meta_boxes 106 | * 107 | * @description: 108 | * @since 3.5.1 109 | * @created: 9/10/12 110 | */ 111 | 112 | function tabify_add_meta_boxes( $post_type ) 113 | { 114 | // get acf's 115 | $acfs = apply_filters('acf/get_field_groups', array()); 116 | 117 | if($acfs) 118 | { 119 | foreach($acfs as $acf) 120 | { 121 | // add meta box 122 | add_meta_box( 123 | 'acf_' . $acf['id'], 124 | $acf['title'], 125 | array($this, 'dummy'), 126 | $post_type 127 | ); 128 | 129 | } 130 | // foreach($acfs as $acf) 131 | } 132 | // if($acfs) 133 | } 134 | 135 | function dummy(){ /* Do Nothing */ } 136 | 137 | 138 | 139 | /* 140 | * dp_duplicate_page 141 | * 142 | * @description: 143 | * @since 3.5.1 144 | * @created: 9/10/12 145 | */ 146 | 147 | function dp_duplicate_page( $new_post_id, $old_post_object ) 148 | { 149 | // only for acf 150 | if( $old_post_object->post_type != "acf" ) 151 | { 152 | return; 153 | } 154 | 155 | 156 | // update keys 157 | $metas = get_post_custom( $new_post_id ); 158 | 159 | 160 | if( $metas ) 161 | { 162 | foreach( $metas as $field_key => $field ) 163 | { 164 | if( strpos($field_key, 'field_') !== false ) 165 | { 166 | $field = $field[0]; 167 | $field = maybe_unserialize( $field ); 168 | $field = maybe_unserialize( $field ); // just to be sure! 169 | 170 | // delete old field 171 | delete_post_meta($new_post_id, $field_key); 172 | 173 | 174 | // set new keys (recursive for sub fields) 175 | $this->create_new_field_keys( $field ); 176 | 177 | 178 | // save it! 179 | update_post_meta($new_post_id, $field['key'], $field); 180 | 181 | } 182 | // if( strpos($field_key, 'field_') !== false ) 183 | } 184 | // foreach( $metas as $field_key => $field ) 185 | } 186 | // if( $metas ) 187 | 188 | } 189 | 190 | 191 | /* 192 | * create_new_field_keys 193 | * 194 | * @description: 195 | * @since 3.5.1 196 | * @created: 9/10/12 197 | */ 198 | 199 | function create_new_field_keys( &$field ) 200 | { 201 | // update key 202 | $field['key'] = 'field_' . uniqid(); 203 | 204 | 205 | if( isset($field['sub_fields']) && is_array($field['sub_fields']) ) 206 | { 207 | foreach( $field['sub_fields'] as $f ) 208 | { 209 | $this->create_new_field_keys( $f ); 210 | } 211 | } 212 | elseif( isset($field['layouts']) && is_array($field['layouts']) ) 213 | { 214 | foreach( $field['layouts'] as $layout ) 215 | { 216 | if( isset($layout['sub_fields']) && is_array($layout['sub_fields']) ) 217 | { 218 | foreach( $layout['sub_fields'] as $f ) 219 | { 220 | $this->create_new_field_keys( $f ); 221 | } 222 | } 223 | 224 | } 225 | } 226 | } 227 | 228 | 229 | 230 | } 231 | 232 | new acf_third_party(); 233 | 234 | ?> -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/core/fields/_base.php: -------------------------------------------------------------------------------- 1 | name, array($this, 'load_field_defaults'), 10, 1); 42 | 43 | 44 | // value 45 | $this->add_filter('acf/load_value/type=' . $this->name, array($this, 'load_value'), 10, 3); 46 | $this->add_filter('acf/update_value/type=' . $this->name, array($this, 'update_value'), 10, 3); 47 | $this->add_filter('acf/format_value/type=' . $this->name, array($this, 'format_value'), 10, 3); 48 | $this->add_filter('acf/format_value_for_api/type=' . $this->name, array($this, 'format_value_for_api'), 10, 3); 49 | 50 | 51 | // field 52 | $this->add_filter('acf/load_field/type=' . $this->name, array($this, 'load_field'), 10, 3); 53 | $this->add_filter('acf/update_field/type=' . $this->name, array($this, 'update_field'), 10, 2); 54 | $this->add_action('acf/create_field/type=' . $this->name, array($this, 'create_field'), 10, 1); 55 | $this->add_action('acf/create_field_options/type=' . $this->name, array($this, 'create_options'), 10, 1); 56 | 57 | 58 | // input actions 59 | $this->add_action('acf/input/admin_enqueue_scripts', array($this, 'input_admin_enqueue_scripts'), 10, 0); 60 | $this->add_action('acf/input/admin_head', array($this, 'input_admin_head'), 10, 0); 61 | $this->add_filter('acf/input/admin_l10n', array($this, 'input_admin_l10n'), 10, 1); 62 | 63 | 64 | // field group actions 65 | $this->add_action('acf/field_group/admin_enqueue_scripts', array($this, 'field_group_admin_enqueue_scripts'), 10, 0); 66 | $this->add_action('acf/field_group/admin_head', array($this, 'field_group_admin_head'), 10, 0); 67 | 68 | } 69 | 70 | 71 | /* 72 | * add_filter 73 | * 74 | * @description: checks if the function is_callable before adding the filter 75 | * @since: 3.6 76 | * @created: 30/01/13 77 | */ 78 | 79 | function add_filter($tag, $function_to_add, $priority = 10, $accepted_args = 1) 80 | { 81 | if( is_callable($function_to_add) ) 82 | { 83 | add_filter($tag, $function_to_add, $priority, $accepted_args); 84 | } 85 | } 86 | 87 | 88 | /* 89 | * add_action 90 | * 91 | * @description: checks if the function is_callable before adding the action 92 | * @since: 3.6 93 | * @created: 30/01/13 94 | */ 95 | 96 | function add_action($tag, $function_to_add, $priority = 10, $accepted_args = 1) 97 | { 98 | if( is_callable($function_to_add) ) 99 | { 100 | add_action($tag, $function_to_add, $priority, $accepted_args); 101 | } 102 | } 103 | 104 | 105 | /* 106 | * registered_fields() 107 | * 108 | * Adds this field to the select list when creating a new field 109 | * 110 | * @type filter 111 | * @since 3.6 112 | * @date 23/01/13 113 | * 114 | * @param $fields - the array of all registered fields 115 | * 116 | * @return $fields - the array of all registered fields 117 | */ 118 | 119 | function registered_fields( $fields ) 120 | { 121 | // defaults 122 | if( !$this->category ) 123 | { 124 | $this->category = __('Basic', 'acf'); 125 | } 126 | 127 | 128 | // add to array 129 | $fields[ $this->category ][ $this->name ] = $this->label; 130 | 131 | 132 | // return array 133 | return $fields; 134 | } 135 | 136 | 137 | /* 138 | * load_field_defaults 139 | * 140 | * action called when rendering the head of an admin screen. Used primarily for passing PHP to JS 141 | * 142 | * @type filer 143 | * @date 1/06/13 144 | * 145 | * @param $field {array} 146 | * @return $field {array} 147 | */ 148 | 149 | function load_field_defaults( $field ) 150 | { 151 | if( !empty($this->defaults) ) 152 | { 153 | foreach( $this->defaults as $k => $v ) 154 | { 155 | if( !isset($field[ $k ]) ) 156 | { 157 | $field[ $k ] = $v; 158 | } 159 | } 160 | } 161 | 162 | return $field; 163 | } 164 | 165 | 166 | /* 167 | * admin_l10n 168 | * 169 | * filter is called to load all l10n text translations into the admin head script tag 170 | * 171 | * @type filer 172 | * @date 1/06/13 173 | * 174 | * @param $field {array} 175 | * @return $field {array} 176 | */ 177 | 178 | function input_admin_l10n( $l10n ) 179 | { 180 | if( !empty($this->l10n) ) 181 | { 182 | $l10n[ $this->name ] = $this->l10n; 183 | } 184 | 185 | return $l10n; 186 | } 187 | 188 | 189 | } 190 | 191 | ?> -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/core/fields/checkbox.php: -------------------------------------------------------------------------------- 1 | name = 'checkbox'; 19 | $this->label = __("Checkbox",'acf'); 20 | $this->category = __("Choice",'acf'); 21 | $this->defaults = array( 22 | 'layout' => 'vertical', 23 | 'choices' => array(), 24 | 'default_value' => '', 25 | ); 26 | 27 | 28 | // do not delete! 29 | parent::__construct(); 30 | } 31 | 32 | 33 | /* 34 | * create_field() 35 | * 36 | * Create the HTML interface for your field 37 | * 38 | * @param $field - an array holding all the field's data 39 | * 40 | * @type action 41 | * @since 3.6 42 | * @date 23/01/13 43 | */ 44 | 45 | function create_field( $field ) 46 | { 47 | // value must be array 48 | if( !is_array($field['value']) ) 49 | { 50 | // perhaps this is a default value with new lines in it? 51 | if( strpos($field['value'], "\n") !== false ) 52 | { 53 | // found multiple lines, explode it 54 | $field['value'] = explode("\n", $field['value']); 55 | } 56 | else 57 | { 58 | $field['value'] = array( $field['value'] ); 59 | } 60 | } 61 | 62 | 63 | // trim value 64 | $field['value'] = array_map('trim', $field['value']); 65 | 66 | 67 | // vars 68 | $i = 0; 69 | $e = ''; 70 | $e .= ''; 107 | 108 | 109 | // return 110 | echo $e; 111 | } 112 | 113 | 114 | /* 115 | * create_options() 116 | * 117 | * Create extra options for your field. This is rendered when editing a field. 118 | * The value of $field['name'] can be used (like bellow) to save extra data to the $field 119 | * 120 | * @type action 121 | * @since 3.6 122 | * @date 23/01/13 123 | * 124 | * @param $field - an array holding all the field's data 125 | */ 126 | 127 | function create_options( $field ) 128 | { 129 | // vars 130 | $key = $field['name']; 131 | 132 | 133 | // implode checkboxes so they work in a textarea 134 | if( is_array($field['choices']) ) 135 | { 136 | foreach( $field['choices'] as $k => $v ) 137 | { 138 | $field['choices'][ $k ] = $k . ' : ' . $v; 139 | } 140 | $field['choices'] = implode("\n", $field['choices']); 141 | } 142 | 143 | ?> 144 | 145 | 146 | 147 |

148 |

149 |


150 | 151 | 152 | 'textarea', 156 | 'class' => 'textarea field_option-choices', 157 | 'name' => 'fields['.$key.'][choices]', 158 | 'value' => $field['choices'], 159 | )); 160 | 161 | ?> 162 | 163 | 164 | 165 | 166 | 167 |

168 | 169 | 170 | 'textarea', 174 | 'name' => 'fields['.$key.'][default_value]', 175 | 'value' => $field['default_value'], 176 | )); 177 | 178 | ?> 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 'radio', 190 | 'name' => 'fields['.$key.'][layout]', 191 | 'value' => $field['layout'], 192 | 'layout' => 'horizontal', 193 | 'choices' => array( 194 | 'vertical' => __("Vertical",'acf'), 195 | 'horizontal' => __("Horizontal",'acf') 196 | ) 197 | )); 198 | 199 | ?> 200 | 201 | 202 | -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/core/fields/color_picker.php: -------------------------------------------------------------------------------- 1 | name = 'color_picker'; 19 | $this->label = __("Color Picker",'acf'); 20 | $this->category = __("jQuery",'acf'); 21 | $this->defaults = array( 22 | 'default_value' => '', 23 | ); 24 | 25 | 26 | // do not delete! 27 | parent::__construct(); 28 | 29 | } 30 | 31 | 32 | /* 33 | * create_field() 34 | * 35 | * Create the HTML interface for your field 36 | * 37 | * @param $field - an array holding all the field's data 38 | * 39 | * @type action 40 | * @since 3.6 41 | * @date 23/01/13 42 | */ 43 | 44 | function create_field( $field ) 45 | { 46 | // vars 47 | $o = array( 'id', 'class', 'name', 'value' ); 48 | $e = ''; 49 | 50 | 51 | $e .= '
'; 52 | $e .= ' 87 | 88 | 89 | 90 | 91 | 92 | 'text', 95 | 'name' => 'fields[' .$key.'][default_value]', 96 | 'value' => $field['default_value'], 97 | 'placeholder' => '#ffffff' 98 | )); 99 | ?> 100 | 101 | 102 | -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/core/fields/date_picker/date_picker.php: -------------------------------------------------------------------------------- 1 | name = 'date_picker'; 19 | $this->label = __("Date Picker",'acf'); 20 | $this->category = __("jQuery",'acf'); 21 | $this->defaults = array( 22 | 'date_format' => 'yymmdd', 23 | 'display_format' => 'dd/mm/yy', 24 | 'first_day' => 1, // monday 25 | ); 26 | 27 | 28 | // actions 29 | add_action('init', array($this, 'init')); 30 | 31 | 32 | // do not delete! 33 | parent::__construct(); 34 | } 35 | 36 | 37 | /* 38 | * init 39 | * 40 | * This function is run on the 'init' action to set the field's $l10n data. Before the init action, 41 | * access to the $wp_locale variable is not possible. 42 | * 43 | * @type action (init) 44 | * @date 3/09/13 45 | * 46 | * @param N/A 47 | * @return N/A 48 | */ 49 | 50 | function init() 51 | { 52 | global $wp_locale; 53 | 54 | $this->l10n = array( 55 | 'closeText' => __( 'Done', 'acf' ), 56 | 'currentText' => __( 'Today', 'acf' ), 57 | 'monthNames' => array_values( $wp_locale->month ), 58 | 'monthNamesShort' => array_values( $wp_locale->month_abbrev ), 59 | 'monthStatus' => __( 'Show a different month', 'acf' ), 60 | 'dayNames' => array_values( $wp_locale->weekday ), 61 | 'dayNamesShort' => array_values( $wp_locale->weekday_abbrev ), 62 | 'dayNamesMin' => array_values( $wp_locale->weekday_initial ), 63 | 'isRTL' => isset($wp_locale->is_rtl) ? $wp_locale->is_rtl : false, 64 | ); 65 | } 66 | 67 | 68 | /* 69 | * create_field() 70 | * 71 | * Create the HTML interface for your field 72 | * 73 | * @param $field - an array holding all the field's data 74 | * 75 | * @type action 76 | * @since 3.6 77 | * @date 23/01/13 78 | */ 79 | 80 | function create_field( $field ) 81 | { 82 | // make sure it's not blank 83 | if( !$field['date_format'] ) 84 | { 85 | $field['date_format'] = 'yymmdd'; 86 | } 87 | if( !$field['display_format'] ) 88 | { 89 | $field['display_format'] = 'dd/mm/yy'; 90 | } 91 | 92 | 93 | // html 94 | echo '
'; 95 | echo ''; 96 | echo ''; 97 | echo '
'; 98 | } 99 | 100 | 101 | /* 102 | * create_options() 103 | * 104 | * Create extra options for your field. This is rendered when editing a field. 105 | * The value of $field['name'] can be used (like bellow) to save extra data to the $field 106 | * 107 | * @type action 108 | * @since 3.6 109 | * @date 23/01/13 110 | * 111 | * @param $field - an array holding all the field's data 112 | */ 113 | 114 | function create_options( $field ) 115 | { 116 | // global 117 | global $wp_locale; 118 | 119 | 120 | // vars 121 | $key = $field['name']; 122 | 123 | ?> 124 | 125 | 126 | 127 |

128 |

129 | 130 | 131 | 'text', 134 | 'name' => 'fields[' .$key.'][date_format]', 135 | 'value' => $field['date_format'], 136 | )); 137 | ?> 138 | 139 | 140 | 141 | 142 | 143 |

144 |

145 | 146 | 147 | 'text', 150 | 'name' => 'fields[' .$key.'][display_format]', 151 | 'value' => $field['display_format'], 152 | )); 153 | ?> 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | weekday ); 164 | 165 | do_action('acf/create_field', array( 166 | 'type' => 'select', 167 | 'name' => 'fields['.$key.'][first_day]', 168 | 'value' => $field['first_day'], 169 | 'choices' => $choices, 170 | )); 171 | 172 | ?> 173 | 174 | 175 | -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/core/fields/date_picker/images/ui-bg_flat_0_aaaaaa_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/core/fields/date_picker/images/ui-bg_flat_0_aaaaaa_40x100.png -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/core/fields/date_picker/images/ui-bg_flat_55_5bc6f5_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/core/fields/date_picker/images/ui-bg_flat_55_5bc6f5_40x100.png -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/core/fields/date_picker/images/ui-bg_flat_75_ffffff_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/core/fields/date_picker/images/ui-bg_flat_75_ffffff_40x100.png -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/core/fields/date_picker/images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/core/fields/date_picker/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/core/fields/date_picker/images/ui-bg_glass_75_dadada_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/core/fields/date_picker/images/ui-bg_glass_75_dadada_1x400.png -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/core/fields/date_picker/images/ui-bg_glass_75_e6e6e6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/core/fields/date_picker/images/ui-bg_glass_75_e6e6e6_1x400.png -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/core/fields/date_picker/images/ui-bg_glass_95_fef1ec_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/core/fields/date_picker/images/ui-bg_glass_95_fef1ec_1x400.png -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/core/fields/date_picker/images/ui-bg_highlight-soft_0_444444_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/core/fields/date_picker/images/ui-bg_highlight-soft_0_444444_1x100.png -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/core/fields/date_picker/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/core/fields/date_picker/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/core/fields/date_picker/images/ui-icons_2e83ff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/core/fields/date_picker/images/ui-icons_2e83ff_256x240.png -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/core/fields/date_picker/images/ui-icons_454545_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/core/fields/date_picker/images/ui-icons_454545_256x240.png -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/core/fields/date_picker/images/ui-icons_888888_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/core/fields/date_picker/images/ui-icons_888888_256x240.png -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/core/fields/date_picker/images/ui-icons_cd0a0a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/core/fields/date_picker/images/ui-icons_cd0a0a_256x240.png -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/core/fields/dummy.php: -------------------------------------------------------------------------------- 1 | name = 'dummy'; 19 | $this->label = __('Dummy'); 20 | 21 | 22 | // do not delete! 23 | parent::__construct(); 24 | } 25 | 26 | 27 | /* 28 | * load_value() 29 | * 30 | * This filter is appied to the $value after it is loaded from the db 31 | * 32 | * @type filter 33 | * @since 3.6 34 | * @date 23/01/13 35 | * 36 | * @param $value - the value found in the database 37 | * @param $post_id - the $post_id from which the value was loaded from 38 | * @param $field - the field array holding all the field options 39 | * 40 | * @return $value - the value to be saved in te database 41 | */ 42 | 43 | function load_value( $value, $post_id, $field ) 44 | { 45 | return $value; 46 | } 47 | 48 | 49 | /* 50 | * format_value() 51 | * 52 | * This filter is appied to the $value after it is loaded from the db and before it is passed to the create_field action 53 | * 54 | * @type filter 55 | * @since 3.6 56 | * @date 23/01/13 57 | * 58 | * @param $value - the value which was loaded from the database 59 | * @param $post_id - the $post_id from which the value was loaded 60 | * @param $field - the field array holding all the field options 61 | * 62 | * @return $value - the modified value 63 | */ 64 | 65 | function format_value( $value, $post_id, $field ) 66 | { 67 | return $value; 68 | } 69 | 70 | 71 | /* 72 | * format_value_for_api() 73 | * 74 | * This filter is appied to the $value after it is loaded from the db and before it is passed back to the api functions such as the_field 75 | * 76 | * @type filter 77 | * @since 3.6 78 | * @date 23/01/13 79 | * 80 | * @param $value - the value which was loaded from the database 81 | * @param $post_id - the $post_id from which the value was loaded 82 | * @param $field - the field array holding all the field options 83 | * 84 | * @return $value - the modified value 85 | */ 86 | 87 | function format_value_for_api( $value, $post_id, $field ) 88 | { 89 | return $value; 90 | } 91 | 92 | 93 | /* 94 | * update_value() 95 | * 96 | * This filter is appied to the $value before it is updated in the db 97 | * 98 | * @type filter 99 | * @since 3.6 100 | * @date 23/01/13 101 | * 102 | * @param $value - the value which will be saved in the database 103 | * @param $field - the field array holding all the field options 104 | * @param $post_id - the $post_id of which the value will be saved 105 | * 106 | * @return $value - the modified value 107 | */ 108 | 109 | function update_value( $value, $post_id, $field ) 110 | { 111 | return $value; 112 | } 113 | 114 | 115 | /* 116 | * load_field() 117 | * 118 | * This filter is appied to the $field after it is loaded from the database 119 | * 120 | * @type filter 121 | * @since 3.6 122 | * @date 23/01/13 123 | * 124 | * @param $field - the field array holding all the field options 125 | * 126 | * @return $field - the field array holding all the field options 127 | */ 128 | 129 | function load_field( $field ) 130 | { 131 | return $field; 132 | } 133 | 134 | 135 | /* 136 | * update_field() 137 | * 138 | * This filter is appied to the $field before it is saved to the database 139 | * 140 | * @type filter 141 | * @since 3.6 142 | * @date 23/01/13 143 | * 144 | * @param $field - the field array holding all the field options 145 | * @param $post_id - the field group ID (post_type = acf) 146 | * 147 | * @return $field - the modified field 148 | */ 149 | 150 | function update_field( $field, $post_id ) 151 | { 152 | return $field; 153 | } 154 | 155 | 156 | /* 157 | * create_field() 158 | * 159 | * Create the HTML interface for your field 160 | * 161 | * @type action 162 | * @since 3.6 163 | * @date 23/01/13 164 | * 165 | * @param $field - an array holding all the field's data 166 | */ 167 | 168 | function create_field( $field ) 169 | { 170 | 171 | } 172 | 173 | 174 | /* 175 | * create_options() 176 | * 177 | * Create extra options for your field. This is rendered when editing a field. 178 | * The value of $field['name'] can be used (like bellow) to save extra data to the $field 179 | * 180 | * @type action 181 | * @since 3.6 182 | * @date 23/01/13 183 | * 184 | * @param $field - an array holding all the field's data 185 | */ 186 | 187 | function create_options( $field ) 188 | { 189 | 190 | } 191 | 192 | 193 | /* 194 | * input_admin_enqueue_scripts() 195 | * 196 | * This action is called in the admin_enqueue_scripts action on the edit screen where your field is created. 197 | * Use this action to add css + javascript to assist your create_field() action. 198 | * 199 | * $info http://codex.wordpress.org/Plugin_API/Action_Reference/admin_enqueue_scripts 200 | * @type action 201 | * @since 3.6 202 | * @date 23/01/13 203 | */ 204 | 205 | function input_admin_enqueue_scripts() 206 | { 207 | 208 | } 209 | 210 | 211 | /* 212 | * input_admin_head() 213 | * 214 | * This action is called in the admin_head action on the edit screen where your field is created. 215 | * Use this action to add css and javascript to assist your create_field() action. 216 | * 217 | * @info http://codex.wordpress.org/Plugin_API/Action_Reference/admin_head 218 | * @type action 219 | * @since 3.6 220 | * @date 23/01/13 221 | */ 222 | 223 | function input_admin_head() 224 | { 225 | 226 | } 227 | 228 | 229 | /* 230 | * field_group_admin_enqueue_scripts() 231 | * 232 | * This action is called in the admin_enqueue_scripts action on the edit screen where your field is edited. 233 | * Use this action to add css + javascript to assist your create_field_options() action. 234 | * 235 | * $info http://codex.wordpress.org/Plugin_API/Action_Reference/admin_enqueue_scripts 236 | * @type action 237 | * @since 3.6 238 | * @date 23/01/13 239 | */ 240 | 241 | function field_group_admin_enqueue_scripts() 242 | { 243 | 244 | } 245 | 246 | 247 | /* 248 | * field_group_admin_head() 249 | * 250 | * This action is called in the admin_head action on the edit screen where your field is edited. 251 | * Use this action to add css and javascript to assist your create_field_options() action. 252 | * 253 | * @info http://codex.wordpress.org/Plugin_API/Action_Reference/admin_head 254 | * @type action 255 | * @since 3.6 256 | * @date 23/01/13 257 | */ 258 | 259 | function field_group_admin_head() 260 | { 261 | 262 | } 263 | } 264 | 265 | 266 | // create field 267 | new acf_field_dummy(); 268 | 269 | 270 | /*--------------------------------------- fuctions.php ----------------------------------------------------*/ 271 | 272 | add_action('acf/register_fields', 'my_register_fields'); 273 | 274 | function my_register_fields() 275 | { 276 | include_once('fields/dummy.php'); 277 | } 278 | 279 | ?> -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/core/fields/email.php: -------------------------------------------------------------------------------- 1 | name = 'email'; 19 | $this->label = __("Email",'acf'); 20 | $this->defaults = array( 21 | 'default_value' => '', 22 | 'placeholder' => '', 23 | 'prepend' => '', 24 | 'append' => '' 25 | ); 26 | 27 | 28 | // do not delete! 29 | parent::__construct(); 30 | } 31 | 32 | 33 | /* 34 | * create_field() 35 | * 36 | * Create the HTML interface for your field 37 | * 38 | * @param $field - an array holding all the field's data 39 | * 40 | * @type action 41 | * @since 3.6 42 | * @date 23/01/13 43 | */ 44 | 45 | function create_field( $field ) 46 | { 47 | // vars 48 | $o = array( 'id', 'class', 'name', 'value', 'placeholder' ); 49 | $e = ''; 50 | 51 | 52 | // prepend 53 | if( $field['prepend'] !== "" ) 54 | { 55 | $field['class'] .= ' acf-is-prepended'; 56 | $e .= '
' . $field['prepend'] . '
'; 57 | } 58 | 59 | 60 | // append 61 | if( $field['append'] !== "" ) 62 | { 63 | $field['class'] .= ' acf-is-appended'; 64 | $e .= '
' . $field['append'] . '
'; 65 | } 66 | 67 | 68 | $e .= '
'; 69 | $e .= ' 104 | 105 | 106 | 107 |

108 | 109 | 110 | 'text', 114 | 'name' => 'fields['.$key.'][default_value]', 115 | 'value' => $field['default_value'], 116 | )); 117 | 118 | ?> 119 | 120 | 121 | 122 | 123 | 124 |

125 | 126 | 127 | 'text', 130 | 'name' => 'fields[' .$key.'][placeholder]', 131 | 'value' => $field['placeholder'], 132 | )); 133 | ?> 134 | 135 | 136 | 137 | 138 | 139 |

140 | 141 | 142 | 'text', 145 | 'name' => 'fields[' .$key.'][prepend]', 146 | 'value' => $field['prepend'], 147 | )); 148 | ?> 149 | 150 | 151 | 152 | 153 | 154 |

155 | 156 | 157 | 'text', 160 | 'name' => 'fields[' .$key.'][append]', 161 | 'value' => $field['append'], 162 | )); 163 | ?> 164 | 165 | 166 | -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/core/fields/google-map.php: -------------------------------------------------------------------------------- 1 | name = 'google_map'; 18 | $this->label = __("Google Map",'acf'); 19 | $this->category = __("jQuery",'acf'); 20 | $this->defaults = array( 21 | 'height' => '', 22 | 'center_lat' => '', 23 | 'center_lng' => '', 24 | 'zoom' => '' 25 | ); 26 | $this->default_values = array( 27 | 'height' => '400', 28 | 'center_lat' => '-37.81411', 29 | 'center_lng' => '144.96328', 30 | 'zoom' => '14' 31 | ); 32 | $this->l10n = array( 33 | 'locating' => __("Locating",'acf'), 34 | 'browser_support' => __("Sorry, this browser does not support geolocation",'acf'), 35 | ); 36 | 37 | 38 | // do not delete! 39 | parent::__construct(); 40 | } 41 | 42 | 43 | /* 44 | * create_field() 45 | * 46 | * Create the HTML interface for your field 47 | * 48 | * @param $field - an array holding all the field's data 49 | * 50 | * @type action 51 | * @since 3.6 52 | * @date 23/01/13 53 | */ 54 | 55 | function create_field( $field ) 56 | { 57 | // require the googlemaps JS ( this script is now lazy loaded via JS ) 58 | //wp_enqueue_script('acf-googlemaps'); 59 | 60 | 61 | // default value 62 | if( !is_array($field['value']) ) 63 | { 64 | $field['value'] = array(); 65 | } 66 | 67 | $field['value'] = wp_parse_args($field['value'], array( 68 | 'address' => '', 69 | 'lat' => '', 70 | 'lng' => '' 71 | )); 72 | 73 | 74 | // default options 75 | foreach( $this->default_values as $k => $v ) 76 | { 77 | if( ! $field[ $k ] ) 78 | { 79 | $field[ $k ] = $v; 80 | } 81 | } 82 | 83 | 84 | // vars 85 | $o = array( 86 | 'class' => '', 87 | ); 88 | 89 | if( $field['value']['address'] ) 90 | { 91 | $o['class'] = 'active'; 92 | } 93 | 94 | 95 | $atts = ''; 96 | $keys = array( 97 | 'data-id' => 'id', 98 | 'data-lat' => 'center_lat', 99 | 'data-lng' => 'center_lng', 100 | 'data-zoom' => 'zoom' 101 | ); 102 | 103 | foreach( $keys as $k => $v ) 104 | { 105 | $atts .= ' ' . $k . '="' . esc_attr( $field[ $v ] ) . '"'; 106 | } 107 | 108 | ?> 109 |
> 110 | 111 |
112 | $v ): ?> 113 | 114 | 115 |
116 | 117 |
118 | 119 |
120 | ">Remove 121 |

122 |
123 | 124 |
125 | ">Locate 126 | " class="search" /> 127 |
128 | 129 |
130 | 131 |
132 | 133 |
134 | 135 |
136 | 160 | 161 | 162 | 163 |

164 | 165 | 166 | 194 | 195 | 196 | 197 | 198 | 199 | 200 |

201 | 202 | 203 | 'number', 207 | 'name' => 'fields['.$key.'][zoom]', 208 | 'value' => $field['zoom'], 209 | 'placeholder' => $this->default_values['zoom'] 210 | )); 211 | 212 | ?> 213 | 214 | 215 | 216 | 217 | 218 |

219 | 220 | 221 | 'number', 225 | 'name' => 'fields['.$key.'][height]', 226 | 'value' => $field['height'], 227 | 'append' => 'px', 228 | 'placeholder' => $this->default_values['height'] 229 | )); 230 | 231 | ?> 232 | 233 | 234 | -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/core/fields/message.php: -------------------------------------------------------------------------------- 1 | name = 'message'; 19 | $this->label = __("Message",'acf'); 20 | $this->category = __("Layout",'acf'); 21 | $this->defaults = array( 22 | 'message' => '', 23 | ); 24 | 25 | 26 | // do not delete! 27 | parent::__construct(); 28 | } 29 | 30 | 31 | /* 32 | * create_field() 33 | * 34 | * Create the HTML interface for your field 35 | * 36 | * @param $field - an array holding all the field's data 37 | * 38 | * @type action 39 | * @since 3.6 40 | * @date 23/01/13 41 | */ 42 | 43 | function create_field( $field ) 44 | { 45 | echo wpautop( $field['message'] ); 46 | } 47 | 48 | 49 | /* 50 | * create_options() 51 | * 52 | * Create extra options for your field. This is rendered when editing a field. 53 | * The value of $field['name'] can be used (like bellow) to save extra data to the $field 54 | * 55 | * @param $field - an array holding all the field's data 56 | * 57 | * @type action 58 | * @since 3.6 59 | * @date 23/01/13 60 | */ 61 | 62 | function create_options( $field ) 63 | { 64 | // vars 65 | $key = $field['name']; 66 | 67 | ?> 68 | 69 | 70 | 71 |



72 | wpautop

73 | 74 | 75 | 'textarea', 78 | 'class' => 'textarea', 79 | 'name' => 'fields['.$key.'][message]', 80 | 'value' => $field['message'], 81 | )); 82 | ?> 83 | 84 | 85 | -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/core/fields/number.php: -------------------------------------------------------------------------------- 1 | name = 'number'; 19 | $this->label = __("Number",'acf'); 20 | $this->defaults = array( 21 | 'default_value' => '', 22 | 'min' => '', 23 | 'max' => '', 24 | 'step' => '', 25 | 'placeholder' => '', 26 | 'prepend' => '', 27 | 'append' => '' 28 | ); 29 | 30 | 31 | // do not delete! 32 | parent::__construct(); 33 | } 34 | 35 | 36 | /* 37 | * create_field() 38 | * 39 | * Create the HTML interface for your field 40 | * 41 | * @param $field - an array holding all the field's data 42 | * 43 | * @type action 44 | * @since 3.6 45 | * @date 23/01/13 46 | */ 47 | 48 | function create_field( $field ) 49 | { 50 | // vars 51 | $o = array( 'id', 'class', 'min', 'max', 'step', 'name', 'value', 'placeholder' ); 52 | $e = ''; 53 | 54 | 55 | // step 56 | if( !$field['step'] ) 57 | { 58 | $field['step'] = 'any'; 59 | } 60 | 61 | // prepend 62 | if( $field['prepend'] !== "" ) 63 | { 64 | $field['class'] .= ' acf-is-prepended'; 65 | $e .= '
' . $field['prepend'] . '
'; 66 | } 67 | 68 | 69 | // append 70 | if( $field['append'] !== "" ) 71 | { 72 | $field['class'] .= ' acf-is-appended'; 73 | $e .= '
' . $field['append'] . '
'; 74 | } 75 | 76 | 77 | $e .= '
'; 78 | $e .= ' 114 | 115 | 116 | 117 |

118 | 119 | 120 | 'number', 124 | 'name' => 'fields['.$key.'][default_value]', 125 | 'value' => $field['default_value'], 126 | )); 127 | 128 | ?> 129 | 130 | 131 | 132 | 133 | 134 |

135 | 136 | 137 | 'text', 140 | 'name' => 'fields[' .$key.'][placeholder]', 141 | 'value' => $field['placeholder'], 142 | )); 143 | ?> 144 | 145 | 146 | 147 | 148 | 149 |

150 | 151 | 152 | 'text', 155 | 'name' => 'fields[' .$key.'][prepend]', 156 | 'value' => $field['prepend'], 157 | )); 158 | ?> 159 | 160 | 161 | 162 | 163 | 164 |

165 | 166 | 167 | 'text', 170 | 'name' => 'fields[' .$key.'][append]', 171 | 'value' => $field['append'], 172 | )); 173 | ?> 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 'number', 185 | 'name' => 'fields['.$key.'][min]', 186 | 'value' => $field['min'], 187 | )); 188 | 189 | ?> 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 'number', 201 | 'name' => 'fields['.$key.'][max]', 202 | 'value' => $field['max'], 203 | )); 204 | 205 | ?> 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 'number', 217 | 'name' => 'fields['.$key.'][step]', 218 | 'value' => $field['step'], 219 | )); 220 | 221 | ?> 222 | 223 | 224 | -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/core/fields/page_link.php: -------------------------------------------------------------------------------- 1 | name = 'page_link'; 18 | $this->label = __("Page Link",'acf'); 19 | $this->category = __("Relational",'acf'); 20 | $this->defaults = array( 21 | 'post_type' => array('all'), 22 | 'multiple' => 0, 23 | 'allow_null' => 0, 24 | ); 25 | 26 | 27 | // do not delete! 28 | parent::__construct(); 29 | 30 | } 31 | 32 | 33 | /* 34 | * load_field() 35 | * 36 | * This filter is appied to the $field after it is loaded from the database 37 | * 38 | * @type filter 39 | * @since 3.6 40 | * @date 23/01/13 41 | * 42 | * @param $field - the field array holding all the field options 43 | * 44 | * @return $field - the field array holding all the field options 45 | */ 46 | 47 | function load_field( $field ) 48 | { 49 | 50 | // validate post_type 51 | if( !$field['post_type'] || !is_array($field['post_type']) || in_array('', $field['post_type']) ) 52 | { 53 | $field['post_type'] = array( 'all' ); 54 | } 55 | 56 | 57 | // return 58 | return $field; 59 | } 60 | 61 | 62 | /* 63 | * create_field() 64 | * 65 | * Create the HTML interface for your field 66 | * 67 | * @param $field - an array holding all the field's data 68 | * 69 | * @type action 70 | * @since 3.6 71 | * @date 23/01/13 72 | */ 73 | 74 | function create_field( $field ) 75 | { 76 | // let post_object create the field 77 | $field['type'] = 'post_object'; 78 | 79 | do_action('acf/create_field', $field ); 80 | } 81 | 82 | 83 | /* 84 | * create_options() 85 | * 86 | * Create extra options for your field. This is rendered when editing a field. 87 | * The value of $field['name'] can be used (like bellow) to save extra data to the $field 88 | * 89 | * @type action 90 | * @since 3.6 91 | * @date 23/01/13 92 | * 93 | * @param $field - an array holding all the field's data 94 | */ 95 | 96 | function create_options( $field ) 97 | { 98 | $key = $field['name']; 99 | 100 | ?> 101 | 102 | 103 | 104 | 105 | 106 | __("All",'acf') 110 | ); 111 | $choices = apply_filters('acf/get_post_types', $choices); 112 | 113 | 114 | do_action('acf/create_field', array( 115 | 'type' => 'select', 116 | 'name' => 'fields['.$key.'][post_type]', 117 | 'value' => $field['post_type'], 118 | 'choices' => $choices, 119 | 'multiple' => 1, 120 | )); 121 | 122 | ?> 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 'radio', 134 | 'name' => 'fields['.$key.'][allow_null]', 135 | 'value' => $field['allow_null'], 136 | 'choices' => array( 137 | 1 => __("Yes",'acf'), 138 | 0 => __("No",'acf'), 139 | ), 140 | 'layout' => 'horizontal', 141 | )); 142 | 143 | ?> 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 'radio', 155 | 'name' => 'fields['.$key.'][multiple]', 156 | 'value' => $field['multiple'], 157 | 'choices' => array( 158 | 1 => __("Yes",'acf'), 159 | 0 => __("No",'acf'), 160 | ), 161 | 'layout' => 'horizontal', 162 | )); 163 | 164 | ?> 165 | 166 | 167 | $v ) 203 | { 204 | $value[ $k ] = get_permalink($v); 205 | } 206 | } 207 | else 208 | { 209 | $value = get_permalink($value); 210 | } 211 | 212 | return $value; 213 | } 214 | 215 | } 216 | 217 | new acf_field_page_link(); 218 | 219 | ?> -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/core/fields/password.php: -------------------------------------------------------------------------------- 1 | name = 'password'; 19 | $this->label = __("Password",'acf'); 20 | $this->defaults = array( 21 | 'placeholder' => '', 22 | 'prepend' => '', 23 | 'append' => '' 24 | ); 25 | 26 | 27 | // do not delete! 28 | parent::__construct(); 29 | } 30 | 31 | 32 | /* 33 | * create_field() 34 | * 35 | * Create the HTML interface for your field 36 | * 37 | * @param $field - an array holding all the field's data 38 | * 39 | * @type action 40 | * @since 3.6 41 | * @date 23/01/13 42 | */ 43 | 44 | function create_field( $field ) 45 | { 46 | // vars 47 | $o = array( 'id', 'class', 'name', 'value', 'placeholder' ); 48 | $e = ''; 49 | 50 | 51 | // prepend 52 | if( $field['prepend'] !== "" ) 53 | { 54 | $field['class'] .= ' acf-is-prepended'; 55 | $e .= '
' . $field['prepend'] . '
'; 56 | } 57 | 58 | 59 | // append 60 | if( $field['append'] !== "" ) 61 | { 62 | $field['class'] .= ' acf-is-appended'; 63 | $e .= '
' . $field['append'] . '
'; 64 | } 65 | 66 | 67 | $e .= '
'; 68 | $e .= ' 103 | 104 | 105 | 106 |

107 | 108 | 109 | 'text', 112 | 'name' => 'fields[' .$key.'][placeholder]', 113 | 'value' => $field['placeholder'], 114 | )); 115 | ?> 116 | 117 | 118 | 119 | 120 | 121 |

122 | 123 | 124 | 'text', 127 | 'name' => 'fields[' .$key.'][prepend]', 128 | 'value' => $field['prepend'], 129 | )); 130 | ?> 131 | 132 | 133 | 134 | 135 | 136 |

137 | 138 | 139 | 'text', 142 | 'name' => 'fields[' .$key.'][append]', 143 | 'value' => $field['append'], 144 | )); 145 | ?> 146 | 147 | 148 | -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/core/fields/radio.php: -------------------------------------------------------------------------------- 1 | name = 'radio'; 18 | $this->label = __("Radio Button",'acf'); 19 | $this->category = __("Choice",'acf'); 20 | $this->defaults = array( 21 | 'layout' => 'vertical', 22 | 'choices' => array(), 23 | 'default_value' => '', 24 | 'other_choice' => 0, 25 | 'save_other_choice' => 0, 26 | ); 27 | 28 | 29 | // do not delete! 30 | parent::__construct(); 31 | 32 | } 33 | 34 | 35 | /* 36 | * create_field() 37 | * 38 | * Create the HTML interface for your field 39 | * 40 | * @param $field - an array holding all the field's data 41 | * 42 | * @type action 43 | * @since 3.6 44 | * @date 23/01/13 45 | */ 46 | 47 | function create_field( $field ) 48 | { 49 | // vars 50 | $i = 0; 51 | $e = '
    '; 52 | 53 | 54 | // add choices 55 | if( is_array($field['choices']) ) 56 | { 57 | foreach( $field['choices'] as $key => $value ) 58 | { 59 | // vars 60 | $i++; 61 | $atts = ''; 62 | 63 | 64 | // if there is no value and this is the first of the choices, select this on by default 65 | if( $field['value'] === false ) 66 | { 67 | if( $i === 1 ) 68 | { 69 | $atts = 'checked="checked" data-checked="checked"'; 70 | } 71 | } 72 | else 73 | { 74 | if( strval($key) === strval($field['value']) ) 75 | { 76 | $atts = 'checked="checked" data-checked="checked"'; 77 | } 78 | } 79 | 80 | 81 | // HTML 82 | $e .= '
  • '; 83 | } 84 | } 85 | 86 | 87 | // other choice 88 | if( $field['other_choice'] ) 89 | { 90 | // vars 91 | $atts = ''; 92 | $atts2 = 'name="" value="" style="display:none"'; 93 | 94 | 95 | if( $field['value'] !== false ) 96 | { 97 | if( !isset($field['choices'][ $field['value'] ]) ) 98 | { 99 | $atts = 'checked="checked" data-checked="checked"'; 100 | $atts2 = 'name="' . esc_attr($field['name']) . '" value="' . esc_attr($field['value']) . '"' ; 101 | } 102 | } 103 | 104 | 105 | $e .= '
  • '; 106 | } 107 | 108 | 109 | $e .= '
'; 110 | 111 | echo $e; 112 | 113 | } 114 | 115 | 116 | /* 117 | * create_options() 118 | * 119 | * Create extra options for your field. This is rendered when editing a field. 120 | * The value of $field['name'] can be used (like bellow) to save extra data to the $field 121 | * 122 | * @type action 123 | * @since 3.6 124 | * @date 23/01/13 125 | * 126 | * @param $field - an array holding all the field's data 127 | */ 128 | 129 | function create_options( $field ) 130 | { 131 | // vars 132 | $key = $field['name']; 133 | 134 | // implode checkboxes so they work in a textarea 135 | if( is_array($field['choices']) ) 136 | { 137 | foreach( $field['choices'] as $k => $v ) 138 | { 139 | $field['choices'][ $k ] = $k . ' : ' . $v; 140 | } 141 | $field['choices'] = implode("\n", $field['choices']); 142 | } 143 | 144 | ?> 145 | 146 | 147 | 148 |


149 |
150 |
151 |
152 |
153 |
154 |
155 |

156 | 157 | 158 | 'textarea', 162 | 'class' => 'textarea field_option-choices', 163 | 'name' => 'fields['.$key.'][choices]', 164 | 'value' => $field['choices'], 165 | )); 166 | 167 | ?> 168 |
169 | 'true_false', 173 | 'name' => 'fields['.$key.'][other_choice]', 174 | 'value' => $field['other_choice'], 175 | 'message' => __("Add 'other' choice to allow for custom values", 'acf') 176 | )); 177 | 178 | ?> 179 |
180 |
style="display:none"> 181 | 'true_false', 185 | 'name' => 'fields['.$key.'][save_other_choice]', 186 | 'value' => $field['save_other_choice'], 187 | 'message' => __("Save 'other' values to the field's choices", 'acf') 188 | )); 189 | 190 | ?> 191 |
192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 'text', 203 | 'name' => 'fields['.$key.'][default_value]', 204 | 'value' => $field['default_value'], 205 | )); 206 | 207 | ?> 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 'radio', 219 | 'name' => 'fields['.$key.'][layout]', 220 | 'value' => $field['layout'], 221 | 'layout' => 'horizontal', 222 | 'choices' => array( 223 | 'vertical' => __("Vertical",'acf'), 224 | 'horizontal' => __("Horizontal",'acf') 225 | ) 226 | )); 227 | 228 | ?> 229 | 230 | 231 | -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/core/fields/select.php: -------------------------------------------------------------------------------- 1 | name = 'select'; 18 | $this->label = __("Select",'acf'); 19 | $this->category = __("Choice",'acf'); 20 | $this->defaults = array( 21 | 'multiple' => 0, 22 | 'allow_null' => 0, 23 | 'choices' => array(), 24 | 'default_value' => '' 25 | ); 26 | 27 | 28 | // do not delete! 29 | parent::__construct(); 30 | 31 | 32 | // extra 33 | //add_filter('acf/update_field/type=select', array($this, 'update_field'), 5, 2); 34 | add_filter('acf/update_field/type=checkbox', array($this, 'update_field'), 5, 2); 35 | add_filter('acf/update_field/type=radio', array($this, 'update_field'), 5, 2); 36 | } 37 | 38 | 39 | /* 40 | * create_field() 41 | * 42 | * Create the HTML interface for your field 43 | * 44 | * @param $field - an array holding all the field's data 45 | * 46 | * @type action 47 | * @since 3.6 48 | * @date 23/01/13 49 | */ 50 | 51 | function create_field( $field ) 52 | { 53 | // vars 54 | $optgroup = false; 55 | 56 | 57 | // determin if choices are grouped (2 levels of array) 58 | if( is_array($field['choices']) ) 59 | { 60 | foreach( $field['choices'] as $k => $v ) 61 | { 62 | if( is_array($v) ) 63 | { 64 | $optgroup = true; 65 | } 66 | } 67 | } 68 | 69 | 70 | // value must be array 71 | if( !is_array($field['value']) ) 72 | { 73 | // perhaps this is a default value with new lines in it? 74 | if( strpos($field['value'], "\n") !== false ) 75 | { 76 | // found multiple lines, explode it 77 | $field['value'] = explode("\n", $field['value']); 78 | } 79 | else 80 | { 81 | $field['value'] = array( $field['value'] ); 82 | } 83 | } 84 | 85 | 86 | // trim value 87 | $field['value'] = array_map('trim', $field['value']); 88 | 89 | 90 | // multiple select 91 | $multiple = ''; 92 | if( $field['multiple'] ) 93 | { 94 | // create a hidden field to allow for no selections 95 | echo ''; 96 | 97 | $multiple = ' multiple="multiple" size="5" '; 98 | $field['name'] .= '[]'; 99 | } 100 | 101 | 102 | // html 103 | echo ''; 143 | } 144 | 145 | 146 | /* 147 | * create_options() 148 | * 149 | * Create extra options for your field. This is rendered when editing a field. 150 | * The value of $field['name'] can be used (like bellow) to save extra data to the $field 151 | * 152 | * @type action 153 | * @since 3.6 154 | * @date 23/01/13 155 | * 156 | * @param $field - an array holding all the field's data 157 | */ 158 | 159 | function create_options( $field ) 160 | { 161 | $key = $field['name']; 162 | 163 | 164 | // implode choices so they work in a textarea 165 | if( is_array($field['choices']) ) 166 | { 167 | foreach( $field['choices'] as $k => $v ) 168 | { 169 | $field['choices'][ $k ] = $k . ' : ' . $v; 170 | } 171 | $field['choices'] = implode("\n", $field['choices']); 172 | } 173 | 174 | ?> 175 | 176 | 177 | 178 |

179 |

180 |


181 | 182 | 183 | 'textarea', 187 | 'class' => 'textarea field_option-choices', 188 | 'name' => 'fields['.$key.'][choices]', 189 | 'value' => $field['choices'], 190 | )); 191 | 192 | ?> 193 | 194 | 195 | 196 | 197 | 198 |

199 | 200 | 201 | 'textarea', 205 | 'name' => 'fields['.$key.'][default_value]', 206 | 'value' => $field['default_value'], 207 | )); 208 | 209 | ?> 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 'radio', 220 | 'name' => 'fields['.$key.'][allow_null]', 221 | 'value' => $field['allow_null'], 222 | 'choices' => array( 223 | 1 => __("Yes",'acf'), 224 | 0 => __("No",'acf'), 225 | ), 226 | 'layout' => 'horizontal', 227 | )); 228 | ?> 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 'radio', 239 | 'name' => 'fields['.$key.'][multiple]', 240 | 'value' => $field['multiple'], 241 | 'choices' => array( 242 | 1 => __("Yes",'acf'), 243 | 0 => __("No",'acf'), 244 | ), 245 | 'layout' => 'horizontal', 246 | )); 247 | ?> 248 | 249 | 250 | value 331 | foreach($field['choices'] as $choice) 332 | { 333 | if(strpos($choice, ' : ') !== false) 334 | { 335 | $choice = explode(' : ', $choice); 336 | $new_choices[ trim($choice[0]) ] = trim($choice[1]); 337 | } 338 | else 339 | { 340 | $new_choices[ trim($choice) ] = trim($choice); 341 | } 342 | } 343 | } 344 | 345 | 346 | // update choices 347 | $field['choices'] = $new_choices; 348 | 349 | 350 | return $field; 351 | } 352 | 353 | } 354 | 355 | new acf_field_select(); 356 | 357 | ?> 358 | -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/core/fields/tab.php: -------------------------------------------------------------------------------- 1 | name = 'tab'; 19 | $this->label = __("Tab",'acf'); 20 | $this->category = __("Layout",'acf'); 21 | 22 | 23 | // do not delete! 24 | parent::__construct(); 25 | } 26 | 27 | 28 | /* 29 | * create_field() 30 | * 31 | * Create the HTML interface for your field 32 | * 33 | * @param $field - an array holding all the field's data 34 | * 35 | * @type action 36 | * @since 3.6 37 | * @date 23/01/13 38 | */ 39 | 40 | function create_field( $field ) 41 | { 42 | echo '
' . $field['label'] . '
'; 43 | } 44 | 45 | 46 | 47 | /* 48 | * create_options() 49 | * 50 | * Create extra options for your field. This is rendered when editing a field. 51 | * The value of $field['name'] can be used (like bellow) to save extra data to the $field 52 | * 53 | * @param $field - an array holding all the field's data 54 | * 55 | * @type action 56 | * @since 3.6 57 | * @date 23/01/13 58 | */ 59 | 60 | function create_options( $field ) 61 | { 62 | ?> 63 | 64 | 65 | 66 | 67 | 68 |

69 |

70 |

71 | 72 | 73 | -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/core/fields/text.php: -------------------------------------------------------------------------------- 1 | name = 'text'; 19 | $this->label = __("Text",'acf'); 20 | $this->defaults = array( 21 | 'default_value' => '', 22 | 'formatting' => 'html', 23 | 'maxlength' => '', 24 | 'placeholder' => '', 25 | 'prepend' => '', 26 | 'append' => '' 27 | ); 28 | 29 | 30 | // do not delete! 31 | parent::__construct(); 32 | } 33 | 34 | 35 | 36 | /* 37 | * create_field() 38 | * 39 | * Create the HTML interface for your field 40 | * 41 | * @param $field - an array holding all the field's data 42 | * 43 | * @type action 44 | * @since 3.6 45 | * @date 23/01/13 46 | */ 47 | 48 | function create_field( $field ) 49 | { 50 | // vars 51 | $o = array( 'id', 'class', 'name', 'value', 'placeholder' ); 52 | $e = ''; 53 | 54 | 55 | // maxlength 56 | if( $field['maxlength'] !== "" ) 57 | { 58 | $o[] = 'maxlength'; 59 | } 60 | 61 | 62 | // prepend 63 | if( $field['prepend'] !== "" ) 64 | { 65 | $field['class'] .= ' acf-is-prepended'; 66 | $e .= '
' . $field['prepend'] . '
'; 67 | } 68 | 69 | 70 | // append 71 | if( $field['append'] !== "" ) 72 | { 73 | $field['class'] .= ' acf-is-appended'; 74 | $e .= '
' . $field['append'] . '
'; 75 | } 76 | 77 | 78 | $e .= '
'; 79 | $e .= ' 114 | 115 | 116 | 117 |

118 | 119 | 120 | 'text', 123 | 'name' => 'fields[' .$key.'][default_value]', 124 | 'value' => $field['default_value'], 125 | )); 126 | ?> 127 | 128 | 129 | 130 | 131 | 132 |

133 | 134 | 135 | 'text', 138 | 'name' => 'fields[' .$key.'][placeholder]', 139 | 'value' => $field['placeholder'], 140 | )); 141 | ?> 142 | 143 | 144 | 145 | 146 | 147 |

148 | 149 | 150 | 'text', 153 | 'name' => 'fields[' .$key.'][prepend]', 154 | 'value' => $field['prepend'], 155 | )); 156 | ?> 157 | 158 | 159 | 160 | 161 | 162 |

163 | 164 | 165 | 'text', 168 | 'name' => 'fields[' .$key.'][append]', 169 | 'value' => $field['append'], 170 | )); 171 | ?> 172 | 173 | 174 | 175 | 176 | 177 |

178 | 179 | 180 | 'select', 183 | 'name' => 'fields['.$key.'][formatting]', 184 | 'value' => $field['formatting'], 185 | 'choices' => array( 186 | 'none' => __("No formatting",'acf'), 187 | 'html' => __("Convert HTML into tags",'acf') 188 | ) 189 | )); 190 | ?> 191 | 192 | 193 | 194 | 195 | 196 |

197 | 198 | 199 | 'number', 202 | 'name' => 'fields[' .$key.'][maxlength]', 203 | 'value' => $field['maxlength'], 204 | )); 205 | ?> 206 | 207 | 208 | -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/core/fields/textarea.php: -------------------------------------------------------------------------------- 1 | name = 'textarea'; 19 | $this->label = __("Text Area",'acf'); 20 | $this->defaults = array( 21 | 'default_value' => '', 22 | 'formatting' => 'br', 23 | 'maxlength' => '', 24 | 'placeholder' => '', 25 | 'rows' => '' 26 | ); 27 | 28 | 29 | // do not delete! 30 | parent::__construct(); 31 | } 32 | 33 | 34 | /* 35 | * create_field() 36 | * 37 | * Create the HTML interface for your field 38 | * 39 | * @param $field - an array holding all the field's data 40 | * 41 | * @type action 42 | * @since 3.6 43 | * @date 23/01/13 44 | */ 45 | 46 | function create_field( $field ) 47 | { 48 | // vars 49 | $o = array( 'id', 'class', 'name', 'placeholder', 'rows' ); 50 | $e = ''; 51 | 52 | 53 | // maxlength 54 | if( $field['maxlength'] !== "" ) 55 | { 56 | $o[] = 'maxlength'; 57 | } 58 | 59 | 60 | // rows 61 | if( empty($field['rows']) ) 62 | { 63 | $field['rows'] = 8; 64 | } 65 | 66 | $e .= ' 101 | 102 | 103 | 104 |

105 | 106 | 107 | 'textarea', 110 | 'name' => 'fields['.$key.'][default_value]', 111 | 'value' => $field['default_value'], 112 | )); 113 | ?> 114 | 115 | 116 | 117 | 118 | 119 |

120 | 121 | 122 | 'text', 125 | 'name' => 'fields[' .$key.'][placeholder]', 126 | 'value' => $field['placeholder'], 127 | )); 128 | ?> 129 | 130 | 131 | 132 | 133 | 134 |

135 | 136 | 137 | 'number', 140 | 'name' => 'fields[' .$key.'][maxlength]', 141 | 'value' => $field['maxlength'], 142 | )); 143 | ?> 144 | 145 | 146 | 147 | 148 | 149 |

150 | 151 | 152 | 'number', 155 | 'name' => 'fields[' .$key.'][rows]', 156 | 'value' => $field['rows'], 157 | 'placeholder' => 8 158 | )); 159 | ?> 160 | 161 | 162 | 163 | 164 | 165 |

166 | 167 | 168 | 'select', 171 | 'name' => 'fields['.$key.'][formatting]', 172 | 'value' => $field['formatting'], 173 | 'choices' => array( 174 | 'none' => __("No formatting",'acf'), 175 | 'br' => __("Convert new lines into <br /> tags",'acf'), 176 | 'html' => __("Convert HTML into tags",'acf') 177 | ) 178 | )); 179 | ?> 180 | 181 | 182 | -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/core/fields/true_false.php: -------------------------------------------------------------------------------- 1 | name = 'true_false'; 19 | $this->label = __("True / False",'acf'); 20 | $this->category = __("Choice",'acf'); 21 | $this->defaults = array( 22 | 'default_value' => 0, 23 | 'message' => '', 24 | ); 25 | 26 | 27 | // do not delete! 28 | parent::__construct(); 29 | 30 | } 31 | 32 | 33 | /* 34 | * create_field() 35 | * 36 | * Create the HTML interface for your field 37 | * 38 | * @param $field - an array holding all the field's data 39 | * 40 | * @type action 41 | * @since 3.6 42 | * @date 23/01/13 43 | */ 44 | 45 | function create_field( $field ) 46 | { 47 | // html 48 | echo '
    '; 49 | echo ''; 50 | $selected = ($field['value'] == 1) ? 'checked="yes"' : ''; 51 | echo '
  • '; 52 | 53 | echo '
'; 54 | } 55 | 56 | 57 | /* 58 | * create_options() 59 | * 60 | * Create extra options for your field. This is rendered when editing a field. 61 | * The value of $field['name'] can be used (like bellow) to save extra data to the $field 62 | * 63 | * @type action 64 | * @since 3.6 65 | * @date 23/01/13 66 | * 67 | * @param $field - an array holding all the field's data 68 | */ 69 | 70 | function create_options( $field ) 71 | { 72 | // vars 73 | $key = $field['name']; 74 | 75 | 76 | ?> 77 | 78 | 79 | 80 |

81 | 82 | 83 | 'text', 86 | 'name' => 'fields['.$key.'][message]', 87 | 'value' => $field['message'], 88 | )); 89 | ?> 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 'true_false', 101 | 'name' => 'fields['.$key.'][default_value]', 102 | 'value' => $field['default_value'], 103 | )); 104 | 105 | ?> 106 | 107 | 108 | -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/core/fields/user.php: -------------------------------------------------------------------------------- 1 | name = 'user'; 18 | $this->label = __("User",'acf'); 19 | $this->category = __("Relational",'acf'); 20 | $this->defaults = array( 21 | 'role' => 'all', 22 | 'field_type' => 'select', 23 | 'allow_null' => 0, 24 | ); 25 | 26 | 27 | // do not delete! 28 | parent::__construct(); 29 | 30 | } 31 | 32 | 33 | /* 34 | * format_value_for_api() 35 | * 36 | * This filter is appied to the $value after it is loaded from the db and before it is passed back to the api functions such as the_field 37 | * 38 | * @type filter 39 | * @since 3.6 40 | * @date 23/01/13 41 | * 42 | * @param $value - the value which was loaded from the database 43 | * @param $field - the field array holding all the field options 44 | * 45 | * @return $value - the modified value 46 | */ 47 | 48 | function format_value_for_api( $value, $post_id, $field ) 49 | { 50 | 51 | // format value 52 | if( !$value || $value == 'null' ) 53 | { 54 | return false; 55 | } 56 | 57 | 58 | // temp convert to array 59 | $is_array = true; 60 | 61 | if( !is_array($value) ) 62 | { 63 | $is_array = false; 64 | $value = array( $value ); 65 | } 66 | 67 | 68 | foreach( $value as $k => $v ) 69 | { 70 | $user_data = get_userdata( $v ); 71 | 72 | //cope with deleted users by @adampope 73 | if( !is_object($user_data) ) 74 | { 75 | unset( $value[$k] ); 76 | continue; 77 | } 78 | 79 | 80 | $value[ $k ] = array(); 81 | $value[ $k ]['ID'] = $v; 82 | $value[ $k ]['user_firstname'] = $user_data->user_firstname; 83 | $value[ $k ]['user_lastname'] = $user_data->user_lastname; 84 | $value[ $k ]['nickname'] = $user_data->nickname; 85 | $value[ $k ]['user_nicename'] = $user_data->user_nicename; 86 | $value[ $k ]['display_name'] = $user_data->display_name; 87 | $value[ $k ]['user_email'] = $user_data->user_email; 88 | $value[ $k ]['user_url'] = $user_data->user_url; 89 | $value[ $k ]['user_registered'] = $user_data->user_registered; 90 | $value[ $k ]['user_description'] = $user_data->user_description; 91 | $value[ $k ]['user_avatar'] = get_avatar( $v ); 92 | 93 | } 94 | 95 | 96 | // de-convert from array 97 | if( !$is_array && isset($value[0]) ) 98 | { 99 | $value = $value[0]; 100 | } 101 | 102 | 103 | // return value 104 | return $value; 105 | 106 | } 107 | 108 | 109 | /* 110 | * input_admin_head() 111 | * 112 | * This action is called in the admin_head action on the edit screen where your field is created. 113 | * Use this action to add css and javascript to assist your create_field() action. 114 | * 115 | * @info http://codex.wordpress.org/Plugin_API/Action_Reference/admin_head 116 | * @type action 117 | * @since 3.6 118 | * @date 23/01/13 119 | */ 120 | 121 | function input_admin_head() 122 | { 123 | if( ! function_exists( 'get_editable_roles' ) ) 124 | { 125 | // if using front-end forms then we need to add this core file 126 | require_once( ABSPATH . '/wp-admin/includes/user.php' ); 127 | } 128 | } 129 | 130 | 131 | /* 132 | * create_field() 133 | * 134 | * Create the HTML interface for your field 135 | * 136 | * @type action 137 | * @since 3.6 138 | * @date 23/01/13 139 | * 140 | * @param $field - an array holding all the field's data 141 | */ 142 | 143 | function create_field( $field ) 144 | { 145 | if( ! function_exists( 'get_editable_roles' ) ) 146 | { 147 | // if using front-end forms then we need to add this core file 148 | require_once( ABSPATH . '/wp-admin/includes/user.php' ); 149 | } 150 | 151 | // options 152 | $options = array( 153 | 'post_id' => get_the_ID(), 154 | ); 155 | 156 | 157 | // vars 158 | $args = array(); 159 | 160 | 161 | // editable roles 162 | $editable_roles = get_editable_roles(); 163 | 164 | if( !empty($field['role']) ) 165 | { 166 | if( ! in_array('all', $field['role']) ) 167 | { 168 | foreach( $editable_roles as $role => $role_info ) 169 | { 170 | if( !in_array($role, $field['role']) ) 171 | { 172 | unset( $editable_roles[ $role ] ); 173 | } 174 | } 175 | } 176 | 177 | } 178 | 179 | // filters 180 | $args = apply_filters('acf/fields/user/query', $args, $field, $options['post_id']); 181 | $args = apply_filters('acf/fields/user/query/name=' . $field['_name'], $args, $field, $options['post_id'] ); 182 | $args = apply_filters('acf/fields/user/query/key=' . $field['key'], $args, $field, $options['post_id'] ); 183 | 184 | 185 | // get users 186 | $users = get_users( $args ); 187 | 188 | 189 | if( !empty($users) && !empty($editable_roles) ) 190 | { 191 | $field['choices'] = array(); 192 | 193 | foreach( $editable_roles as $role => $role_info ) 194 | { 195 | // vars 196 | $this_users = array(); 197 | $this_json = array(); 198 | 199 | 200 | // loop over users 201 | $keys = array_keys($users); 202 | foreach( $keys as $key ) 203 | { 204 | if( in_array($role, $users[ $key ]->roles) ) 205 | { 206 | $this_users[] = $users[ $key ]; 207 | unset( $users[ $key ] ); 208 | } 209 | } 210 | 211 | 212 | // bail early if no users for this role 213 | if( empty($this_users) ) 214 | { 215 | continue; 216 | } 217 | 218 | 219 | // label 220 | $label = translate_user_role( $role_info['name'] ); 221 | 222 | 223 | // append to choices 224 | $field['choices'][ $label ] = array(); 225 | 226 | foreach( $this_users as $user ) 227 | { 228 | $field['choices'][ $label ][ $user->ID ] = ucfirst( $user->display_name ); 229 | } 230 | 231 | } 232 | } 233 | 234 | 235 | // modify field 236 | if( $field['field_type'] == 'multi_select' ) 237 | { 238 | $field['multiple'] = 1; 239 | } 240 | 241 | 242 | $field['type'] = 'select'; 243 | 244 | 245 | do_action('acf/create_field', $field); 246 | 247 | } 248 | 249 | 250 | /* 251 | * create_options() 252 | * 253 | * Create extra options for your field. This is rendered when editing a field. 254 | * The value of $field['name'] can be used (like bellow) to save extra data to the $field 255 | * 256 | * @type action 257 | * @since 3.6 258 | * @date 23/01/13 259 | * 260 | * @param $field - an array holding all the field's data 261 | */ 262 | 263 | function create_options( $field ) 264 | { 265 | // vars 266 | $key = $field['name']; 267 | 268 | ?> 269 | 270 | 271 | 272 | 273 | 274 | __('All', 'acf')); 277 | $editable_roles = get_editable_roles(); 278 | 279 | foreach( $editable_roles as $role => $details ) 280 | { 281 | // only translate the output not the value 282 | $choices[$role] = translate_user_role( $details['name'] ); 283 | } 284 | 285 | do_action('acf/create_field', array( 286 | 'type' => 'select', 287 | 'name' => 'fields[' . $key . '][role]', 288 | 'value' => $field['role'], 289 | 'choices' => $choices, 290 | 'multiple' => '1', 291 | )); 292 | 293 | ?> 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 'select', 304 | 'name' => 'fields['.$key.'][field_type]', 305 | 'value' => $field['field_type'], 306 | 'choices' => array( 307 | __("Multiple Values",'acf') => array( 308 | //'checkbox' => __('Checkbox', 'acf'), 309 | 'multi_select' => __('Multi Select', 'acf') 310 | ), 311 | __("Single Value",'acf') => array( 312 | //'radio' => __('Radio Buttons', 'acf'), 313 | 'select' => __('Select', 'acf') 314 | ) 315 | ) 316 | )); 317 | ?> 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 'radio', 328 | 'name' => 'fields['.$key.'][allow_null]', 329 | 'value' => $field['allow_null'], 330 | 'choices' => array( 331 | 1 => __("Yes",'acf'), 332 | 0 => __("No",'acf'), 333 | ), 334 | 'layout' => 'horizontal', 335 | )); 336 | ?> 337 | 338 | 339 | ID) ) 370 | { 371 | $value = $value->ID; 372 | } 373 | 374 | return $value; 375 | } 376 | 377 | 378 | } 379 | 380 | new acf_field_user(); 381 | 382 | ?> -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/core/views/meta_box_location.php: -------------------------------------------------------------------------------- 1 | ID); 19 | 20 | 21 | // at lease 1 location rule 22 | if( empty($groups) ) 23 | { 24 | $groups = array( 25 | 26 | // group_0 27 | array( 28 | 29 | // rule_0 30 | array( 31 | 'param' => 'post_type', 32 | 'operator' => '==', 33 | 'value' => 'post', 34 | 'order_no' => 0, 35 | 'group_no' => 0 36 | ) 37 | ) 38 | 39 | ); 40 | } 41 | 42 | 43 | ?> 44 | 45 | 46 | 47 | 51 | 167 | 168 | 169 |
48 | 49 |

50 |
52 |
53 | 54 | 55 | $group ): 56 | $group_id = 'group_' . $group_id; 57 | ?> 58 |
59 | 60 |

61 | 62 |

63 | 64 | 65 | 66 | 67 | $rule ): 68 | $rule_id = 'rule_' . $rule_id; 69 | ?> 70 | 71 | 114 | 135 | 145 | 148 | 151 | 152 | 153 | 154 |
array( 75 | 'post_type' => __("Post Type",'acf'), 76 | 'user_type' => __("Logged in User Type",'acf'), 77 | ), 78 | __("Post",'acf') => array( 79 | 'post' => __("Post",'acf'), 80 | 'post_category' => __("Post Category",'acf'), 81 | 'post_format' => __("Post Format",'acf'), 82 | 'post_status' => __("Post Status",'acf'), 83 | 'taxonomy' => __("Post Taxonomy",'acf'), 84 | ), 85 | __("Page",'acf') => array( 86 | 'page' => __("Page",'acf'), 87 | 'page_type' => __("Page Type",'acf'), 88 | 'page_parent' => __("Page Parent",'acf'), 89 | 'page_template' => __("Page Template",'acf'), 90 | ), 91 | __("Other",'acf') => array( 92 | 'ef_media' => __("Attachment",'acf'), 93 | 'ef_taxonomy' => __("Taxonomy Term",'acf'), 94 | 'ef_user' => __("User",'acf'), 95 | ) 96 | ); 97 | 98 | 99 | // allow custom location rules 100 | $choices = apply_filters( 'acf/location/rule_types', $choices ); 101 | 102 | 103 | // create field 104 | $args = array( 105 | 'type' => 'select', 106 | 'name' => 'location[' . $group_id . '][' . $rule_id . '][param]', 107 | 'value' => $rule['param'], 108 | 'choices' => $choices, 109 | ); 110 | 111 | do_action('acf/create_field', $args); 112 | 113 | ?> __("is equal to",'acf'), 118 | '!=' => __("is not equal to",'acf'), 119 | ); 120 | 121 | 122 | // allow custom location rules 123 | $choices = apply_filters( 'acf/location/rule_operators', $choices ); 124 | 125 | 126 | // create field 127 | do_action('acf/create_field', array( 128 | 'type' => 'select', 129 | 'name' => 'location[' . $group_id . '][' . $rule_id . '][operator]', 130 | 'value' => $rule['operator'], 131 | 'choices' => $choices 132 | )); 133 | 134 | ?>ajax_render_location(array( 138 | 'group_id' => $group_id, 139 | 'rule_id' => $rule_id, 140 | 'value' => $rule['value'], 141 | 'param' => $rule['param'], 142 | )); 143 | 144 | ?> 146 | 147 | 149 | 150 |
155 | 156 |
157 | 158 | 159 |

160 | 161 | 162 | 163 | 164 | 165 |
166 |
-------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/core/views/meta_box_options.php: -------------------------------------------------------------------------------- 1 | ID); 19 | 20 | 21 | ?> 22 | 23 | 24 | 28 | 39 | 40 | 41 | 44 | 61 | 62 | 63 | 66 | 81 | 82 | 83 | 88 | 115 | 116 |
25 | 26 |

from lowest to highest",'acf'); ?>

27 |
29 | 'number', 33 | 'name' => 'menu_order', 34 | 'value' => $post->menu_order, 35 | )); 36 | 37 | ?> 38 |
42 | 43 | 45 | 'select', 49 | 'name' => 'options[position]', 50 | 'value' => $options['position'], 51 | 'choices' => array( 52 | 'acf_after_title' => __("High (after title)",'acf'), 53 | 'normal' => __("Normal (after content)",'acf'), 54 | 'side' => __("Side",'acf'), 55 | ), 56 | 'default_value' => 'normal' 57 | )); 58 | 59 | ?> 60 |
64 | 65 | 67 | 'select', 71 | 'name' => 'options[layout]', 72 | 'value' => $options['layout'], 73 | 'choices' => array( 74 | 'no_box' => __("Seamless (no metabox)",'acf'), 75 | 'default' => __("Standard (WP metabox)",'acf'), 76 | ) 77 | )); 78 | 79 | ?> 80 |
84 | 85 |

Select items to hide them from the edit screen",'acf'); ?>

86 |

87 |
89 | 'checkbox', 93 | 'name' => 'options[hide_on_screen]', 94 | 'value' => $options['hide_on_screen'], 95 | 'choices' => array( 96 | 'permalink' => __("Permalink", 'acf'), 97 | 'the_content' => __("Content Editor",'acf'), 98 | 'excerpt' => __("Excerpt", 'acf'), 99 | 'custom_fields' => __("Custom Fields", 'acf'), 100 | 'discussion' => __("Discussion", 'acf'), 101 | 'comments' => __("Comments", 'acf'), 102 | 'revisions' => __("Revisions", 'acf'), 103 | 'slug' => __("Slug", 'acf'), 104 | 'author' => __("Author", 'acf'), 105 | 'format' => __("Format", 'acf'), 106 | 'featured_image' => __("Featured Image", 'acf'), 107 | 'categories' => __("Categories", 'acf'), 108 | 'tags' => __("Tags", 'acf'), 109 | 'send-trackbacks' => __("Send Trackbacks", 'acf'), 110 | ) 111 | )); 112 | 113 | ?> 114 |
-------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/css/acf.css: -------------------------------------------------------------------------------- 1 | /*-------------------------------------------------------------------------------------------- 2 | * 3 | * ACF manage field groups 4 | * 5 | *--------------------------------------------------------------------------------------------*/ 6 | 7 | #icon-edit { 8 | background: url(../images/sprite.png) 0 0 no-repeat; 9 | } 10 | 11 | #acf-field-group-wrap .tablenav, 12 | #acf-field-group-wrap p.search-box { 13 | display: none; 14 | } 15 | 16 | #acf-field-group-wrap .wp-list-table .check-column { 17 | padding-left: 5px; 18 | } 19 | 20 | #acf-field-group-wrap .wp-list-table th#fields { 21 | width: 25%; 22 | } 23 | 24 | #acf-field-group-wrap .tablenav.bottom { 25 | display: block; 26 | } 27 | 28 | 29 | /* columns (replicate post edit layout) */ 30 | .acf-columns-2 { 31 | margin-right: 300px; 32 | } 33 | 34 | .acf-columns-2 .acf-column-1 { 35 | float: left; 36 | width: 100%; 37 | } 38 | 39 | .acf-columns-2 .acf-column-2 { 40 | float: right; 41 | margin-right: -300px; 42 | width: 280px; 43 | } 44 | 45 | .acf-clear { 46 | clear: both; 47 | } 48 | 49 | 50 | .acf-form-table { 51 | max-width: 1100px; 52 | } 53 | 54 | .acf-form-table > tbody > tr > th, 55 | .acf-form-table > tbody > tr > td { 56 | padding-bottom: 30px; 57 | } 58 | 59 | .acf-export-form { 60 | display: block; 61 | } 62 | 63 | .acf-export-form select { 64 | width: 100%; 65 | } 66 | 67 | body.custom-fields_page_acf-settings .wp-pointer-arrow { 68 | left: 15px !important; 69 | } 70 | 71 | .wp-pointer-content ol { 72 | padding: 0 15px; 73 | margin-left: 1.5em; 74 | } 75 | 76 | .acf-form-table pre, 77 | .acf-form-table .pre { 78 | padding: 10px; 79 | margin: 0; 80 | font-family: Monaco,"Andale Mono","Courier New",monospace !important; 81 | resize: none; 82 | height: auto; 83 | width: 100%; 84 | padding: 0; 85 | border: 0 none; 86 | border-radius: 0; 87 | } 88 | 89 | .acf-form-table select option { 90 | padding: 3px; 91 | } 92 | 93 | 94 | /*-------------------------------------------------------------------------- 95 | * 96 | * Columns 97 | * 98 | *-------------------------------------------------------------------------*/ 99 | 100 | .row-actions .inline { 101 | display: none; 102 | } 103 | 104 | 105 | /*-------------------------------------------------------------------------- 106 | * 107 | * Add-Ons 108 | * 109 | *-------------------------------------------------------------------------*/ 110 | 111 | #add-ons { 112 | margin-bottom: 20px; 113 | } 114 | 115 | #add-ons .add-on-group { 116 | margin-top: 20px; 117 | padding-top: 20px; 118 | border-top: #F5F5F5 solid 1px; 119 | } 120 | 121 | #add-ons .add-on-group:first-child { 122 | margin-top: 0; 123 | padding-top: 0; 124 | border-top: 0 none; 125 | } 126 | 127 | #add-ons .add-on { 128 | float: left; 129 | width: 220px; 130 | margin: 10px; 131 | } 132 | 133 | #add-ons .add-on h3 { 134 | margin-top: 0.5em; 135 | } 136 | 137 | #add-ons .add-on h3 a { 138 | color: inherit; 139 | text-decoration: none; 140 | } 141 | 142 | #add-ons .add-on .inner { 143 | min-height: 105px; 144 | } 145 | 146 | #add-ons .add-on-active .button { 147 | padding-left: 4px; 148 | } 149 | 150 | .acf-sprite-tick { 151 | width: 14px; 152 | height: 14px; 153 | margin: 4px 5px 0 0; 154 | background-position: 0px -300px; 155 | } 156 | 157 | #add-ons .add-on-title { 158 | float: left; 159 | width: 100%; 160 | margin: 25px 0 25px; 161 | border-top: #F5F5F5 solid 1px; 162 | } 163 | 164 | 165 | /*-------------------------------------------------------------------------- 166 | * 167 | * About (post update information) 168 | * 169 | *-------------------------------------------------------------------------*/ 170 | 171 | .acf-content { 172 | font-size: 15px; 173 | margin: 25px 40px 0 20px; 174 | max-width: 1050px; 175 | position: relative; 176 | } 177 | 178 | 179 | /* 180 | * Title 181 | */ 182 | 183 | .acf-content-title h1 { 184 | color: #333333; 185 | font-size: 2.8em; 186 | font-weight: 200; 187 | line-height: 1.2em; 188 | margin: 0.2em 0 0; 189 | } 190 | 191 | .acf-content-title h2 { 192 | color: #777777; 193 | font-size: 24px; 194 | font-weight: normal; 195 | line-height: 1.6em; 196 | margin: 1em 0 1.4em; 197 | font-family: "HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue",sans-serif; 198 | } 199 | 200 | 201 | /* 202 | * Tabs 203 | */ 204 | 205 | .acf-content .nav-tab-wrapper { 206 | padding-left: 6px; 207 | margin-bottom: 30px; 208 | } 209 | 210 | .acf-content .nav-tab-wrapper .nav-tab { 211 | color: #21759B; 212 | font-size: 18px; 213 | margin: 0 3px -1px 0; 214 | padding: 4px 10px 6px; 215 | vertical-align: top; 216 | } 217 | 218 | .acf-tab-content { 219 | display: none; 220 | } 221 | 222 | .acf-tab-content.active { 223 | display: block; 224 | } 225 | 226 | 227 | 228 | /* 229 | * Body 230 | */ 231 | 232 | .acf-content-body { 233 | margin: 0 0 30px; 234 | } 235 | 236 | .acf-content-body hr { 237 | border: 0 none; 238 | border-top: #DFDFDF solid 1px; 239 | background: transparent; 240 | margin: 30px 0; 241 | clear: both; 242 | } 243 | 244 | .acf-content-body h3 { 245 | font-size: 24px; 246 | margin: 2em 0 1em; 247 | } 248 | 249 | .acf-content-body h4 { 250 | color: #464646; 251 | font-size: 1em; 252 | margin: 2em 0 0.6em; 253 | } 254 | 255 | .acf-content-body h4 + p { 256 | margin-top: 0.6em; 257 | } 258 | 259 | .acf-content-body p { 260 | line-height: 1.6em; 261 | 262 | } 263 | 264 | #acf-add-ons-table { 265 | 266 | } 267 | 268 | #acf-add-ons-table img { 269 | display: block; 270 | width: 120px; 271 | } 272 | 273 | 274 | /* 275 | * Footer 276 | */ 277 | 278 | .acf-content-footer { 279 | margin: 60px 0 30px; 280 | } 281 | 282 | 283 | /* 284 | * Cangelog 285 | */ 286 | 287 | .acf-content-body ul { 288 | list-style: disc outside none; 289 | padding-left: 30px; 290 | } 291 | 292 | .acf-content-body ul li { 293 | margin: 12px 0; 294 | } 295 | 296 | .acf-content-body ul li a { 297 | 298 | } 299 | 300 | 301 | /* 302 | * Download 303 | */ 304 | 305 | 306 | #acf-download-add-ons-table { 307 | width: auto; 308 | min-width: 500px; 309 | } 310 | 311 | #acf-download-add-ons-table img { 312 | width: 50px; 313 | } 314 | 315 | #acf-download-add-ons-table td { 316 | vertical-align: middle; 317 | } 318 | 319 | #acf-download-add-ons-table td.td-image { 320 | width: 50px; 321 | } 322 | 323 | #acf-download-add-ons-table td.td-name { 324 | 325 | } 326 | 327 | #acf-download-add-ons-table td.td-download { 328 | width: 90px; 329 | } 330 | 331 | 332 | /*-------------------------------------------------------------------------- 333 | * 334 | * Retina 335 | * 336 | *-------------------------------------------------------------------------*/ 337 | 338 | @media 339 | only screen and (-webkit-min-device-pixel-ratio: 2), 340 | only screen and ( min--moz-device-pixel-ratio: 2), 341 | only screen and ( -o-min-device-pixel-ratio: 2/1), 342 | only screen and ( min-device-pixel-ratio: 2), 343 | only screen and ( min-resolution: 192dpi), 344 | only screen and ( min-resolution: 2dppx) { 345 | 346 | #icon-edit, 347 | #icon-acf { 348 | background-image: url(../images/sprite@2x.png); 349 | background-size: 100px 600px; 350 | } 351 | 352 | 353 | } -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/images/add-ons/cf7-field-thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/images/add-ons/cf7-field-thumb.jpg -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/images/add-ons/date-time-field-thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/images/add-ons/date-time-field-thumb.jpg -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/images/add-ons/flexible-content-field-thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/images/add-ons/flexible-content-field-thumb.jpg -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/images/add-ons/gallery-field-thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/images/add-ons/gallery-field-thumb.jpg -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/images/add-ons/google-maps-field-thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/images/add-ons/google-maps-field-thumb.jpg -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/images/add-ons/gravity-forms-field-thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/images/add-ons/gravity-forms-field-thumb.jpg -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/images/add-ons/options-page-thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/images/add-ons/options-page-thumb.jpg -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/images/add-ons/repeater-field-thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/images/add-ons/repeater-field-thumb.jpg -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/images/arrows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/images/arrows.png -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/images/arrows@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/images/arrows@2x.png -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/images/sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/images/sprite.png -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/images/sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/images/sprite@2x.png -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/images/wpspin_light.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/images/wpspin_light.gif -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/images/wpspin_light@2x.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/images/wpspin_light@2x.gif -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/js/input/_listener.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/js/input/_listener.min.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/js/input/ajax.js: -------------------------------------------------------------------------------- 1 | (function($){ 2 | 3 | 4 | /* 5 | * acf.screen 6 | * 7 | * Data used by AJAX to hide / show field groups 8 | * 9 | * @type object 10 | * @date 1/03/2011 11 | * 12 | * @param N/A 13 | * @return N/A 14 | */ 15 | 16 | acf.screen = { 17 | action : 'acf/location/match_field_groups_ajax', 18 | post_id : 0, 19 | page_template : 0, 20 | page_parent : 0, 21 | page_type : 0, 22 | post_category : 0, 23 | post_format : 0, 24 | taxonomy : 0, 25 | lang : 0, 26 | nonce : 0 27 | }; 28 | 29 | 30 | /* 31 | * Document Ready 32 | * 33 | * Updates acf.screen with more data 34 | * 35 | * @type function 36 | * @date 1/03/2011 37 | * 38 | * @param N/A 39 | * @return N/A 40 | */ 41 | 42 | $(document).ready(function(){ 43 | 44 | 45 | // update post_id 46 | acf.screen.post_id = acf.o.post_id; 47 | acf.screen.nonce = acf.o.nonce; 48 | 49 | 50 | // MPML 51 | if( $('#icl-als-first').length > 0 ) 52 | { 53 | var href = $('#icl-als-first').children('a').attr('href'), 54 | regex = new RegExp( "lang=([^&#]*)" ), 55 | results = regex.exec( href ); 56 | 57 | // lang 58 | acf.screen.lang = results[1]; 59 | 60 | } 61 | 62 | }); 63 | 64 | 65 | /* 66 | * acf/update_field_groups 67 | * 68 | * finds the new id's for metaboxes and show's hides metaboxes 69 | * 70 | * @type event 71 | * @date 1/03/2011 72 | * 73 | * @param N/A 74 | * @return N/A 75 | */ 76 | 77 | $(document).on('acf/update_field_groups', function(){ 78 | 79 | // Only for a post. 80 | // This is an attempt to stop the action running on the options page add-on. 81 | if( ! acf.screen.post_id || ! $.isNumeric(acf.screen.post_id) ) 82 | { 83 | return false; 84 | } 85 | 86 | 87 | $.ajax({ 88 | url: ajaxurl, 89 | data: acf.screen, 90 | type: 'post', 91 | dataType: 'json', 92 | success: function(result){ 93 | 94 | // validate 95 | if( !result ) 96 | { 97 | return false; 98 | } 99 | 100 | 101 | // hide all metaboxes 102 | $('.acf_postbox').addClass('acf-hidden'); 103 | $('.acf_postbox-toggle').addClass('acf-hidden'); 104 | 105 | 106 | // dont bother loading style or html for inputs 107 | if( result.length == 0 ) 108 | { 109 | return false; 110 | } 111 | 112 | 113 | // show the new postboxes 114 | $.each(result, function(k, v) { 115 | 116 | 117 | // vars 118 | var $el = $('#acf_' + v), 119 | $toggle = $('#adv-settings .acf_postbox-toggle[for="acf_' + v + '-hide"]'); 120 | 121 | 122 | // classes 123 | $el.removeClass('acf-hidden hide-if-js'); 124 | $toggle.removeClass('acf-hidden'); 125 | $toggle.find('input[type="checkbox"]').attr('checked', 'checked'); 126 | 127 | 128 | // load fields if needed 129 | $el.find('.acf-replace-with-fields').each(function(){ 130 | 131 | var $replace = $(this); 132 | 133 | $.ajax({ 134 | url : ajaxurl, 135 | data : { 136 | action : 'acf/post/render_fields', 137 | acf_id : v, 138 | post_id : acf.o.post_id, 139 | nonce : acf.o.nonce 140 | }, 141 | type : 'post', 142 | dataType : 'html', 143 | success : function( html ){ 144 | 145 | $replace.replaceWith( html ); 146 | 147 | $(document).trigger('acf/setup_fields', $el); 148 | 149 | } 150 | }); 151 | 152 | }); 153 | }); 154 | 155 | 156 | // load style 157 | $.ajax({ 158 | url : ajaxurl, 159 | data : { 160 | action : 'acf/post/get_style', 161 | acf_id : result[0], 162 | nonce : acf.o.nonce 163 | }, 164 | type : 'post', 165 | dataType : 'html', 166 | success : function( result ){ 167 | 168 | $('#acf_style').html( result ); 169 | 170 | } 171 | }); 172 | 173 | 174 | 175 | } 176 | }); 177 | }); 178 | 179 | 180 | /* 181 | * Events 182 | * 183 | * Updates acf.screen with more data and triggers the update event 184 | * 185 | * @type function 186 | * @date 1/03/2011 187 | * 188 | * @param N/A 189 | * @return N/A 190 | */ 191 | 192 | $(document).on('change', '#page_template', function(){ 193 | 194 | acf.screen.page_template = $(this).val(); 195 | 196 | $(document).trigger('acf/update_field_groups'); 197 | 198 | }); 199 | 200 | 201 | $(document).on('change', '#parent_id', function(){ 202 | 203 | var val = $(this).val(); 204 | 205 | 206 | // set page_type / page_parent 207 | if( val != "" ) 208 | { 209 | acf.screen.page_type = 'child'; 210 | acf.screen.page_parent = val; 211 | } 212 | else 213 | { 214 | acf.screen.page_type = 'parent'; 215 | acf.screen.page_parent = 0; 216 | } 217 | 218 | 219 | $(document).trigger('acf/update_field_groups'); 220 | 221 | }); 222 | 223 | 224 | $(document).on('change', '#post-formats-select input[type="radio"]', function(){ 225 | 226 | var val = $(this).val(); 227 | 228 | if( val == '0' ) 229 | { 230 | val = 'standard'; 231 | } 232 | 233 | acf.screen.post_format = val; 234 | 235 | $(document).trigger('acf/update_field_groups'); 236 | 237 | }); 238 | 239 | 240 | function _sync_taxonomy_terms() { 241 | 242 | // vars 243 | var values = []; 244 | 245 | 246 | $('.categorychecklist input:checked, .acf-taxonomy-field input:checked, .acf-taxonomy-field option:selected').each(function(){ 247 | 248 | // validate 249 | if( $(this).is(':hidden') || $(this).is(':disabled') ) 250 | { 251 | return; 252 | } 253 | 254 | 255 | // validate media popup 256 | if( $(this).closest('.media-frame').exists() ) 257 | { 258 | return; 259 | } 260 | 261 | 262 | // validate acf 263 | if( $(this).closest('.acf-taxonomy-field').exists() ) 264 | { 265 | if( $(this).closest('.acf-taxonomy-field').attr('data-load_save') == '0' ) 266 | { 267 | return; 268 | } 269 | } 270 | 271 | 272 | // append 273 | if( values.indexOf( $(this).val() ) === -1 ) 274 | { 275 | values.push( $(this).val() ); 276 | } 277 | 278 | }); 279 | 280 | 281 | // update screen 282 | acf.screen.post_category = values; 283 | acf.screen.taxonomy = values; 284 | 285 | 286 | // trigger change 287 | $(document).trigger('acf/update_field_groups'); 288 | 289 | } 290 | 291 | 292 | $(document).on('change', '.categorychecklist input, .acf-taxonomy-field input, .acf-taxonomy-field select', function(){ 293 | 294 | // a taxonomy field may trigger this change event, however, the value selected is not 295 | // actually a term relatinoship, it is meta data 296 | if( $(this).closest('.acf-taxonomy-field').exists() ) 297 | { 298 | if( $(this).closest('.acf-taxonomy-field').attr('data-save') == '0' ) 299 | { 300 | return; 301 | } 302 | } 303 | 304 | 305 | // this may be triggered from editing an imgae in a popup. Popup does not support correct metaboxes so ignore this 306 | if( $(this).closest('.media-frame').exists() ) 307 | { 308 | return; 309 | } 310 | 311 | 312 | // set timeout to fix issue with chrome which does not register the change has yet happened 313 | setTimeout(function(){ 314 | 315 | _sync_taxonomy_terms(); 316 | 317 | }, 1); 318 | 319 | 320 | }); 321 | 322 | 323 | 324 | 325 | })(jQuery); -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/js/input/color-picker.js: -------------------------------------------------------------------------------- 1 | (function($){ 2 | 3 | /* 4 | * Color Picker 5 | * 6 | * jQuery functionality for this field type 7 | * 8 | * @type object 9 | * @date 20/07/13 10 | * 11 | * @param N/A 12 | * @return N/A 13 | */ 14 | 15 | var _cp = acf.fields.color_picker = { 16 | 17 | $el : null, 18 | $input : null, 19 | 20 | set : function( o ){ 21 | 22 | // merge in new option 23 | $.extend( this, o ); 24 | 25 | 26 | // find input 27 | this.$input = this.$el.find('input[type="text"]'); 28 | 29 | 30 | // return this for chaining 31 | return this; 32 | 33 | }, 34 | init : function(){ 35 | 36 | // vars (reference) 37 | var $input = this.$input; 38 | 39 | 40 | // is clone field? 41 | if( acf.helpers.is_clone_field($input) ) 42 | { 43 | return; 44 | } 45 | 46 | 47 | this.$input.wpColorPicker(); 48 | 49 | 50 | 51 | } 52 | }; 53 | 54 | 55 | /* 56 | * acf/setup_fields 57 | * 58 | * run init function on all elements for this field 59 | * 60 | * @type event 61 | * @date 20/07/13 62 | * 63 | * @param {object} e event object 64 | * @param {object} el DOM object which may contain new ACF elements 65 | * @return N/A 66 | */ 67 | 68 | $(document).on('acf/setup_fields', function(e, el){ 69 | 70 | $(el).find('.acf-color_picker').each(function(){ 71 | 72 | _cp.set({ $el : $(this) }).init(); 73 | 74 | }); 75 | 76 | }); 77 | 78 | 79 | })(jQuery); -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/js/input/date-picker.js: -------------------------------------------------------------------------------- 1 | (function($){ 2 | 3 | /* 4 | * Date Picker 5 | * 6 | * static model for this field 7 | * 8 | * @type event 9 | * @date 1/06/13 10 | * 11 | */ 12 | 13 | acf.fields.date_picker = { 14 | 15 | $el : null, 16 | $input : null, 17 | $hidden : null, 18 | 19 | o : {}, 20 | 21 | set : function( o ){ 22 | 23 | // merge in new option 24 | $.extend( this, o ); 25 | 26 | 27 | // find input 28 | this.$input = this.$el.find('input[type="text"]'); 29 | this.$hidden = this.$el.find('input[type="hidden"]'); 30 | 31 | 32 | // get options 33 | this.o = acf.helpers.get_atts( this.$el ); 34 | 35 | 36 | // return this for chaining 37 | return this; 38 | 39 | }, 40 | init : function(){ 41 | 42 | // is clone field? 43 | if( acf.helpers.is_clone_field(this.$hidden) ) 44 | { 45 | return; 46 | } 47 | 48 | 49 | // get and set value from alt field 50 | this.$input.val( this.$hidden.val() ); 51 | 52 | 53 | // create options 54 | var options = $.extend( {}, acf.l10n.date_picker, { 55 | dateFormat : this.o.save_format, 56 | altField : this.$hidden, 57 | altFormat : this.o.save_format, 58 | changeYear : true, 59 | yearRange : "-100:+100", 60 | changeMonth : true, 61 | showButtonPanel : true, 62 | firstDay : this.o.first_day 63 | }); 64 | 65 | 66 | // add date picker 67 | this.$input.addClass('active').datepicker( options ); 68 | 69 | 70 | // now change the format back to how it should be. 71 | this.$input.datepicker( "option", "dateFormat", this.o.display_format ); 72 | 73 | 74 | // wrap the datepicker (only if it hasn't already been wrapped) 75 | if( $('body > #ui-datepicker-div').length > 0 ) 76 | { 77 | $('#ui-datepicker-div').wrap('
'); 78 | } 79 | 80 | }, 81 | blur : function(){ 82 | 83 | if( !this.$input.val() ) 84 | { 85 | this.$hidden.val(''); 86 | } 87 | 88 | } 89 | 90 | }; 91 | 92 | 93 | /* 94 | * acf/setup_fields 95 | * 96 | * run init function on all elements for this field 97 | * 98 | * @type event 99 | * @date 20/07/13 100 | * 101 | * @param {object} e event object 102 | * @param {object} el DOM object which may contain new ACF elements 103 | * @return N/A 104 | */ 105 | 106 | $(document).on('acf/setup_fields', function(e, el){ 107 | 108 | $(el).find('.acf-date_picker').each(function(){ 109 | 110 | acf.fields.date_picker.set({ $el : $(this) }).init(); 111 | 112 | }); 113 | 114 | }); 115 | 116 | 117 | /* 118 | * Events 119 | * 120 | * jQuery events for this field 121 | * 122 | * @type event 123 | * @date 1/06/13 124 | * 125 | */ 126 | 127 | $(document).on('blur', '.acf-date_picker input[type="text"]', function( e ){ 128 | 129 | acf.fields.date_picker.set({ $el : $(this).parent() }).blur(); 130 | 131 | }); 132 | 133 | 134 | })(jQuery); -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/js/input/file.js: -------------------------------------------------------------------------------- 1 | (function($){ 2 | 3 | /* 4 | * File 5 | * 6 | * static model for this field 7 | * 8 | * @type event 9 | * @date 1/06/13 10 | * 11 | */ 12 | 13 | 14 | // reference 15 | var _media = acf.media; 16 | 17 | 18 | acf.fields.file = { 19 | 20 | $el : null, 21 | $input : null, 22 | 23 | o : {}, 24 | 25 | set : function( o ){ 26 | 27 | // merge in new option 28 | $.extend( this, o ); 29 | 30 | 31 | // find input 32 | this.$input = this.$el.find('input[type="hidden"]'); 33 | 34 | 35 | // get options 36 | this.o = acf.helpers.get_atts( this.$el ); 37 | 38 | 39 | // multiple? 40 | this.o.multiple = this.$el.closest('.repeater').exists() ? true : false; 41 | 42 | 43 | // wp library query 44 | this.o.query = {}; 45 | 46 | 47 | // library 48 | if( this.o.library == 'uploadedTo' ) 49 | { 50 | this.o.query.uploadedTo = acf.o.post_id; 51 | } 52 | 53 | 54 | // return this for chaining 55 | return this; 56 | 57 | }, 58 | init : function(){ 59 | 60 | // is clone field? 61 | if( acf.helpers.is_clone_field(this.$input) ) 62 | { 63 | return; 64 | } 65 | 66 | }, 67 | add : function( file ){ 68 | 69 | // this function must reference a global div variable due to the pre WP 3.5 uploader 70 | // vars 71 | var div = _media.div; 72 | 73 | 74 | // set atts 75 | div.find('.acf-file-icon').attr( 'src', file.icon ); 76 | div.find('.acf-file-title').text( file.title ); 77 | div.find('.acf-file-name').text( file.name ).attr( 'href', file.url ); 78 | div.find('.acf-file-size').text( file.size ); 79 | div.find('.acf-file-value').val( file.id ).trigger('change'); 80 | 81 | 82 | // set div class 83 | div.addClass('active'); 84 | 85 | 86 | // validation 87 | div.closest('.field').removeClass('error'); 88 | 89 | }, 90 | edit : function(){ 91 | 92 | // vars 93 | var id = this.$input.val(); 94 | 95 | 96 | // set global var 97 | _media.div = this.$el; 98 | 99 | 100 | // clear the frame 101 | _media.clear_frame(); 102 | 103 | 104 | // create the media frame 105 | _media.frame = wp.media({ 106 | title : acf.l10n.file.edit, 107 | multiple : false, 108 | button : { text : acf.l10n.file.update } 109 | }); 110 | 111 | 112 | // log events 113 | /* 114 | acf.media.frame.on('all', function(e){ 115 | 116 | console.log( e ); 117 | 118 | }); 119 | */ 120 | 121 | 122 | // open 123 | _media.frame.on('open',function() { 124 | 125 | // set to browse 126 | if( _media.frame.content._mode != 'browse' ) 127 | { 128 | _media.frame.content.mode('browse'); 129 | } 130 | 131 | 132 | // add class 133 | _media.frame.$el.closest('.media-modal').addClass('acf-media-modal acf-expanded'); 134 | 135 | 136 | // set selection 137 | var selection = _media.frame.state().get('selection'), 138 | attachment = wp.media.attachment( id ); 139 | 140 | 141 | // to fetch or not to fetch 142 | if( $.isEmptyObject(attachment.changed) ) 143 | { 144 | attachment.fetch(); 145 | } 146 | 147 | 148 | selection.add( attachment ); 149 | 150 | }); 151 | 152 | 153 | // close 154 | _media.frame.on('close',function(){ 155 | 156 | // remove class 157 | _media.frame.$el.closest('.media-modal').removeClass('acf-media-modal'); 158 | 159 | }); 160 | 161 | 162 | // Finally, open the modal 163 | acf.media.frame.open(); 164 | 165 | }, 166 | remove : function() 167 | { 168 | 169 | // set atts 170 | this.$el.find('.acf-file-icon').attr( 'src', '' ); 171 | this.$el.find('.acf-file-title').text( '' ); 172 | this.$el.find('.acf-file-name').text( '' ).attr( 'href', '' ); 173 | this.$el.find('.acf-file-size').text( '' ); 174 | this.$el.find('.acf-file-value').val( '' ).trigger('change'); 175 | 176 | 177 | // remove class 178 | this.$el.removeClass('active'); 179 | 180 | }, 181 | popup : function() 182 | { 183 | // reference 184 | var t = this; 185 | 186 | 187 | // set global var 188 | _media.div = this.$el; 189 | 190 | 191 | // clear the frame 192 | _media.clear_frame(); 193 | 194 | 195 | // Create the media frame 196 | _media.frame = wp.media({ 197 | states : [ 198 | new wp.media.controller.Library({ 199 | library : wp.media.query( t.o.query ), 200 | multiple : t.o.multiple, 201 | title : acf.l10n.file.select, 202 | priority : 20, 203 | filterable : 'all' 204 | }) 205 | ] 206 | }); 207 | 208 | 209 | // customize model / view 210 | acf.media.frame.on('content:activate', function(){ 211 | 212 | // vars 213 | var toolbar = null, 214 | filters = null; 215 | 216 | 217 | // populate above vars making sure to allow for failure 218 | try 219 | { 220 | toolbar = acf.media.frame.content.get().toolbar; 221 | filters = toolbar.get('filters'); 222 | } 223 | catch(e) 224 | { 225 | // one of the objects was 'undefined'... perhaps the frame open is Upload Files 226 | //console.log( e ); 227 | } 228 | 229 | 230 | // validate 231 | if( !filters ) 232 | { 233 | return false; 234 | } 235 | 236 | 237 | // no need for 'uploaded' filter 238 | if( t.o.library == 'uploadedTo' ) 239 | { 240 | filters.$el.find('option[value="uploaded"]').remove(); 241 | filters.$el.after('' + acf.l10n.file.uploadedTo + '') 242 | 243 | $.each( filters.filters, function( k, v ){ 244 | 245 | v.props.uploadedTo = acf.o.post_id; 246 | 247 | }); 248 | } 249 | 250 | }); 251 | 252 | 253 | // When an image is selected, run a callback. 254 | acf.media.frame.on( 'select', function() { 255 | 256 | // get selected images 257 | selection = _media.frame.state().get('selection'); 258 | 259 | if( selection ) 260 | { 261 | var i = 0; 262 | 263 | selection.each(function(attachment){ 264 | 265 | // counter 266 | i++; 267 | 268 | 269 | // select / add another file field? 270 | if( i > 1 ) 271 | { 272 | // vars 273 | var $td = _media.div.closest('td'), 274 | $tr = $td.closest('.row'), 275 | $repeater = $tr.closest('.repeater'), 276 | key = $td.attr('data-field_key'), 277 | selector = 'td .acf-file-uploader:first'; 278 | 279 | 280 | // key only exists for repeater v1.0.1 + 281 | if( key ) 282 | { 283 | selector = 'td[data-field_key="' + key + '"] .acf-file-uploader'; 284 | } 285 | 286 | 287 | // add row? 288 | if( ! $tr.next('.row').exists() ) 289 | { 290 | $repeater.find('.add-row-end').trigger('click'); 291 | 292 | } 293 | 294 | 295 | // update current div 296 | _media.div = $tr.next('.row').find( selector ); 297 | 298 | } 299 | 300 | 301 | // vars 302 | var file = { 303 | id : attachment.id, 304 | title : attachment.attributes.title, 305 | name : attachment.attributes.filename, 306 | url : attachment.attributes.url, 307 | icon : attachment.attributes.icon, 308 | size : attachment.attributes.filesize 309 | }; 310 | 311 | 312 | // add file to field 313 | acf.fields.file.add( file ); 314 | 315 | 316 | }); 317 | // selection.each(function(attachment){ 318 | } 319 | // if( selection ) 320 | 321 | }); 322 | // acf.media.frame.on( 'select', function() { 323 | 324 | 325 | // Finally, open the modal 326 | acf.media.frame.open(); 327 | 328 | 329 | return false; 330 | } 331 | 332 | }; 333 | 334 | 335 | /* 336 | * Events 337 | * 338 | * jQuery events for this field 339 | * 340 | * @type function 341 | * @date 1/03/2011 342 | * 343 | * @param N/A 344 | * @return N/A 345 | */ 346 | 347 | $(document).on('click', '.acf-file-uploader .acf-button-edit', function( e ){ 348 | 349 | e.preventDefault(); 350 | 351 | acf.fields.file.set({ $el : $(this).closest('.acf-file-uploader') }).edit(); 352 | 353 | }); 354 | 355 | $(document).on('click', '.acf-file-uploader .acf-button-delete', function( e ){ 356 | 357 | e.preventDefault(); 358 | 359 | acf.fields.file.set({ $el : $(this).closest('.acf-file-uploader') }).remove(); 360 | 361 | }); 362 | 363 | 364 | $(document).on('click', '.acf-file-uploader .add-file', function( e ){ 365 | 366 | e.preventDefault(); 367 | 368 | acf.fields.file.set({ $el : $(this).closest('.acf-file-uploader') }).popup(); 369 | 370 | }); 371 | 372 | 373 | })(jQuery); -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/js/input/radio.js: -------------------------------------------------------------------------------- 1 | (function($){ 2 | 3 | /* 4 | * Radio 5 | * 6 | * static model and events for this field 7 | * 8 | * @type event 9 | * @date 1/06/13 10 | * 11 | */ 12 | 13 | acf.fields.radio = { 14 | 15 | $el : null, 16 | $input : null, 17 | $other : null, 18 | farbtastic : null, 19 | 20 | set : function( o ){ 21 | 22 | // merge in new option 23 | $.extend( this, o ); 24 | 25 | 26 | // find input 27 | this.$input = this.$el.find('input[type="radio"]:checked'); 28 | this.$other = this.$el.find('input[type="text"]'); 29 | 30 | 31 | // return this for chaining 32 | return this; 33 | 34 | }, 35 | change : function(){ 36 | 37 | if( this.$input.val() == 'other' ) 38 | { 39 | this.$other.attr('name', this.$input.attr('name')); 40 | this.$other.show(); 41 | } 42 | else 43 | { 44 | this.$other.attr('name', ''); 45 | this.$other.hide(); 46 | } 47 | } 48 | }; 49 | 50 | 51 | /* 52 | * Events 53 | * 54 | * jQuery events for this field 55 | * 56 | * @type function 57 | * @date 1/03/2011 58 | * 59 | * @param N/A 60 | * @return N/A 61 | */ 62 | 63 | $(document).on('change', '.acf-radio-list input[type="radio"]', function( e ){ 64 | 65 | acf.fields.radio.set({ $el : $(this).closest('.acf-radio-list') }).change(); 66 | 67 | }); 68 | 69 | 70 | })(jQuery); -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/js/input/relationship.js: -------------------------------------------------------------------------------- 1 | (function($){ 2 | 3 | /* 4 | * Relationship 5 | * 6 | * static model for this field 7 | * 8 | * @type event 9 | * @date 1/06/13 10 | * 11 | */ 12 | 13 | acf.fields.relationship = { 14 | 15 | $el : null, 16 | $input : null, 17 | $left : null, 18 | $right : null, 19 | 20 | o : {}, 21 | 22 | timeout : null, 23 | 24 | set : function( o ){ 25 | 26 | // merge in new option 27 | $.extend( this, o ); 28 | 29 | 30 | // find elements 31 | this.$input = this.$el.children('input[type="hidden"]'); 32 | this.$left = this.$el.find('.relationship_left'), 33 | this.$right = this.$el.find('.relationship_right'); 34 | 35 | 36 | // get options 37 | this.o = acf.helpers.get_atts( this.$el ); 38 | 39 | 40 | // return this for chaining 41 | return this; 42 | 43 | }, 44 | init : function(){ 45 | 46 | // reference 47 | var _this = this; 48 | 49 | 50 | // is clone field? 51 | if( acf.helpers.is_clone_field(this.$input) ) 52 | { 53 | return; 54 | } 55 | 56 | 57 | // set height of right column 58 | this.$right.find('.relationship_list').height( this.$left.height() -2 ); 59 | 60 | 61 | // right sortable 62 | this.$right.find('.relationship_list').sortable({ 63 | axis : 'y', 64 | items : '> li', 65 | forceHelperSize : true, 66 | forcePlaceholderSize : true, 67 | scroll : true, 68 | update : function(){ 69 | 70 | _this.$input.trigger('change'); 71 | 72 | } 73 | }); 74 | 75 | 76 | // load more 77 | var $el = this.$el; 78 | 79 | this.$left.find('.relationship_list').scrollTop( 0 ).on('scroll', function(e){ 80 | 81 | // validate 82 | if( $el.hasClass('loading') || $el.hasClass('no-results') ) 83 | { 84 | return; 85 | } 86 | 87 | 88 | // Scrolled to bottom 89 | if( $(this).scrollTop() + $(this).innerHeight() >= $(this).get(0).scrollHeight ) 90 | { 91 | var paged = parseInt( $el.attr('data-paged') ); 92 | 93 | // update paged 94 | $el.attr('data-paged', (paged + 1) ); 95 | 96 | // fetch 97 | _this.set({ $el : $el }).fetch(); 98 | } 99 | 100 | }); 101 | 102 | 103 | // ajax fetch values for left side 104 | this.fetch(); 105 | 106 | }, 107 | fetch : function(){ 108 | 109 | // reference 110 | var _this = this, 111 | $el = this.$el; 112 | 113 | 114 | // add loading class, stops scroll loading 115 | $el.addClass('loading'); 116 | 117 | 118 | // get results 119 | $.ajax({ 120 | url : acf.o.ajaxurl, 121 | type : 'post', 122 | dataType : 'json', 123 | data : $.extend({ 124 | action : 'acf/fields/relationship/query_posts', 125 | post_id : acf.o.post_id, 126 | nonce : acf.o.nonce 127 | }, this.o ), 128 | success : function( json ){ 129 | 130 | 131 | // render 132 | _this.set({ $el : $el }).render( json ); 133 | 134 | } 135 | }); 136 | 137 | }, 138 | render : function( json ){ 139 | 140 | // reference 141 | var _this = this; 142 | 143 | 144 | // update classes 145 | this.$el.removeClass('no-results').removeClass('loading'); 146 | 147 | 148 | // new search? 149 | if( this.o.paged == 1 ) 150 | { 151 | this.$el.find('.relationship_left li:not(.load-more)').remove(); 152 | } 153 | 154 | 155 | // no results? 156 | if( ! json || ! json.html ) 157 | { 158 | this.$el.addClass('no-results'); 159 | return; 160 | } 161 | 162 | 163 | // append new results 164 | this.$el.find('.relationship_left .load-more').before( json.html ); 165 | 166 | 167 | // next page? 168 | if( ! json.next_page_exists ) 169 | { 170 | this.$el.addClass('no-results'); 171 | } 172 | 173 | 174 | // apply .hide to left li's 175 | this.$left.find('a').each(function(){ 176 | 177 | var id = $(this).attr('data-post_id'); 178 | 179 | if( _this.$right.find('a[data-post_id="' + id + '"]').exists() ) 180 | { 181 | $(this).parent().addClass('hide'); 182 | } 183 | 184 | }); 185 | 186 | }, 187 | add : function( $a ){ 188 | 189 | // vars 190 | var id = $a.attr('data-post_id'), 191 | title = $a.html(); 192 | 193 | 194 | // max posts 195 | if( this.$right.find('a').length >= this.o.max ) 196 | { 197 | alert( acf.l10n.relationship.max.replace('{max}', this.o.max) ); 198 | return false; 199 | } 200 | 201 | 202 | // can be added? 203 | if( $a.parent().hasClass('hide') ) 204 | { 205 | return false; 206 | } 207 | 208 | 209 | // hide 210 | $a.parent().addClass('hide'); 211 | 212 | 213 | // template 214 | var data = { 215 | post_id : $a.attr('data-post_id'), 216 | title : $a.html(), 217 | name : this.$input.attr('name') 218 | }, 219 | tmpl = _.template(acf.l10n.relationship.tmpl_li, data); 220 | 221 | 222 | 223 | // add new li 224 | this.$right.find('.relationship_list').append( tmpl ) 225 | 226 | 227 | // trigger change on new_li 228 | this.$input.trigger('change'); 229 | 230 | 231 | // validation 232 | this.$el.closest('.field').removeClass('error'); 233 | 234 | 235 | }, 236 | remove : function( $a ){ 237 | 238 | // remove 239 | $a.parent().remove(); 240 | 241 | 242 | // show 243 | this.$left.find('a[data-post_id="' + $a.attr('data-post_id') + '"]').parent('li').removeClass('hide'); 244 | 245 | 246 | // trigger change on new_li 247 | this.$input.trigger('change'); 248 | 249 | } 250 | 251 | }; 252 | 253 | 254 | /* 255 | * acf/setup_fields 256 | * 257 | * run init function on all elements for this field 258 | * 259 | * @type event 260 | * @date 20/07/13 261 | * 262 | * @param {object} e event object 263 | * @param {object} el DOM object which may contain new ACF elements 264 | * @return N/A 265 | */ 266 | 267 | $(document).on('acf/setup_fields', function(e, el){ 268 | 269 | $(el).find('.acf_relationship').each(function(){ 270 | 271 | acf.fields.relationship.set({ $el : $(this) }).init(); 272 | 273 | }); 274 | 275 | }); 276 | 277 | 278 | /* 279 | * Events 280 | * 281 | * jQuery events for this field 282 | * 283 | * @type function 284 | * @date 1/03/2011 285 | * 286 | * @param N/A 287 | * @return N/A 288 | */ 289 | 290 | $(document).on('change', '.acf_relationship .select-post_type', function(e){ 291 | 292 | // vars 293 | var val = $(this).val(), 294 | $el = $(this).closest('.acf_relationship'); 295 | 296 | 297 | // update attr 298 | $el.attr('data-post_type', val); 299 | $el.attr('data-paged', 1); 300 | 301 | 302 | // fetch 303 | acf.fields.relationship.set({ $el : $el }).fetch(); 304 | 305 | }); 306 | 307 | 308 | $(document).on('click', '.acf_relationship .relationship_left .relationship_list a', function( e ){ 309 | 310 | e.preventDefault(); 311 | 312 | acf.fields.relationship.set({ $el : $(this).closest('.acf_relationship') }).add( $(this) ); 313 | 314 | $(this).blur(); 315 | 316 | }); 317 | 318 | $(document).on('click', '.acf_relationship .relationship_right .relationship_list a', function( e ){ 319 | 320 | e.preventDefault(); 321 | 322 | acf.fields.relationship.set({ $el : $(this).closest('.acf_relationship') }).remove( $(this) ); 323 | 324 | $(this).blur(); 325 | 326 | }); 327 | 328 | $(document).on('keyup', '.acf_relationship input.relationship_search', function( e ){ 329 | 330 | // vars 331 | var val = $(this).val(), 332 | $el = $(this).closest('.acf_relationship'); 333 | 334 | 335 | // update attr 336 | $el.attr('data-s', val); 337 | $el.attr('data-paged', 1); 338 | 339 | 340 | // fetch 341 | clearTimeout( acf.fields.relationship.timeout ); 342 | acf.fields.relationship.timeout = setTimeout(function(){ 343 | 344 | acf.fields.relationship.set({ $el : $el }).fetch(); 345 | 346 | }, 500); 347 | 348 | }); 349 | 350 | $(document).on('keypress', '.acf_relationship input.relationship_search', function( e ){ 351 | 352 | // don't submit form 353 | if( e.which == 13 ) 354 | { 355 | e.preventDefault(); 356 | } 357 | 358 | }); 359 | 360 | 361 | })(jQuery); -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/js/input/tab.js: -------------------------------------------------------------------------------- 1 | (function($){ 2 | 3 | acf.fields.tab = { 4 | 5 | add_group : function( $wrap ){ 6 | 7 | // vars 8 | var html = ''; 9 | 10 | 11 | // generate html 12 | if( $wrap.is('tbody') ) 13 | { 14 | html = '
    '; 15 | } 16 | else 17 | { 18 | html = '
      '; 19 | } 20 | 21 | 22 | // append html 23 | $wrap.children('.field_type-tab:first').before( html ); 24 | 25 | }, 26 | 27 | add_tab : function( $tab ){ 28 | 29 | // vars 30 | var $field = $tab.closest('.field'), 31 | $wrap = $field.parent(), 32 | 33 | key = $field.attr('data-field_key'), 34 | label = $tab.text(); 35 | 36 | 37 | // create tab group if it doesnt exist 38 | if( ! $wrap.children('.acf-tab-wrap').exists() ) 39 | { 40 | this.add_group( $wrap ); 41 | } 42 | 43 | // add tab 44 | $wrap.children('.acf-tab-wrap').find('.acf-tab-group').append('
    • ' + label + '
    • '); 45 | 46 | }, 47 | 48 | toggle : function( $a ){ 49 | 50 | // reference 51 | var _this = this; 52 | 53 | 54 | //console.log( 'toggle %o ', $a); 55 | // vars 56 | var $wrap = $a.closest('.acf-tab-wrap').parent(), 57 | key = $a.attr('data-key'); 58 | 59 | 60 | // classes 61 | $a.parent('li').addClass('active').siblings('li').removeClass('active'); 62 | 63 | 64 | // hide / show 65 | $wrap.children('.field_type-tab').each(function(){ 66 | 67 | 68 | // vars 69 | var $tab = $(this); 70 | 71 | 72 | if( $tab.attr('data-field_key') == key ) 73 | { 74 | _this.show_tab_fields( $(this) ); 75 | } 76 | else 77 | { 78 | _this.hide_tab_fields( $(this) ); 79 | } 80 | 81 | 82 | }); 83 | 84 | }, 85 | 86 | show_tab_fields : function( $field ) { 87 | 88 | //console.log('show tab fields %o', $field); 89 | $field.nextUntil('.field_type-tab').each(function(){ 90 | 91 | $(this).removeClass('acf-tab_group-hide').addClass('acf-tab_group-show'); 92 | $(document).trigger('acf/fields/tab/show', [ $(this) ]); 93 | 94 | }); 95 | }, 96 | 97 | hide_tab_fields : function( $field ) { 98 | 99 | $field.nextUntil('.field_type-tab').each(function(){ 100 | 101 | $(this).removeClass('acf-tab_group-show').addClass('acf-tab_group-hide'); 102 | $(document).trigger('acf/fields/tab/hide', [ $(this) ]); 103 | 104 | }); 105 | }, 106 | 107 | refresh : function( $el ){ 108 | 109 | // reference 110 | var _this = this; 111 | 112 | 113 | // trigger 114 | $el.find('.acf-tab-group').each(function(){ 115 | 116 | $(this).find('.acf-tab-button:first').each(function(){ 117 | 118 | _this.toggle( $(this) ); 119 | 120 | }); 121 | 122 | }); 123 | 124 | } 125 | 126 | }; 127 | 128 | 129 | /* 130 | * acf/setup_fields 131 | * 132 | * run init function on all elements for this field 133 | * 134 | * @type event 135 | * @date 20/07/13 136 | * 137 | * @param {object} e event object 138 | * @param {object} el DOM object which may contain new ACF elements 139 | * @return N/A 140 | */ 141 | 142 | $(document).on('acf/setup_fields', function(e, el){ 143 | 144 | // add tabs 145 | $(el).find('.acf-tab').each(function(){ 146 | 147 | acf.fields.tab.add_tab( $(this) ); 148 | 149 | }); 150 | 151 | 152 | // activate first tab 153 | acf.fields.tab.refresh( $(el) ); 154 | 155 | 156 | // NOTE: this code is defined BEFORE the acf.conditional_logic action. This is becuase the 'acf/setup_fields' listener is defined INSIDE the conditional_logic.init() function which is run on doc.ready 157 | 158 | // trigger conditional logic 159 | // this code ( acf/setup_fields ) is run after the main acf.conditional_logic.init(); 160 | //console.log('acf/setup_fields (after tab refresh) calling acf.conditional_logic.refresh()'); 161 | //acf.conditional_logic.refresh(); 162 | 163 | }); 164 | 165 | 166 | 167 | 168 | /* 169 | * Events 170 | * 171 | * jQuery events for this field 172 | * 173 | * @type function 174 | * @date 1/03/2011 175 | * 176 | * @param N/A 177 | * @return N/A 178 | */ 179 | 180 | $(document).on('click', '.acf-tab-button', function( e ){ 181 | 182 | e.preventDefault(); 183 | 184 | acf.fields.tab.toggle( $(this) ); 185 | 186 | $(this).trigger('blur'); 187 | 188 | }); 189 | 190 | 191 | $(document).on('acf/conditional_logic/hide', function( e, $target, item ){ 192 | 193 | // validate 194 | if( $target.attr('data-field_type') != 'tab' ) 195 | { 196 | return; 197 | } 198 | 199 | //console.log('conditional_logic/hide tab %o', $target); 200 | 201 | 202 | // vars 203 | var $tab = $target.siblings('.acf-tab-wrap').find('a[data-key="' + $target.attr('data-field_key') + '"]'); 204 | 205 | 206 | // if tab is already hidden, then ignore the following functiolnality 207 | if( $tab.is(':hidden') ) 208 | { 209 | return; 210 | } 211 | 212 | 213 | // visibility 214 | $tab.parent().hide(); 215 | 216 | 217 | // if 218 | if( $tab.parent().siblings(':visible').exists() ) 219 | { 220 | // if the $target to be hidden is a tab button, lets toggle a sibling tab button 221 | $tab.parent().siblings(':visible').first().children('a').trigger('click'); 222 | } 223 | else 224 | { 225 | // no onther tabs 226 | acf.fields.tab.hide_tab_fields( $target ); 227 | } 228 | 229 | }); 230 | 231 | 232 | $(document).on('acf/conditional_logic/show', function( e, $target, item ){ 233 | 234 | // validate 235 | if( $target.attr('data-field_type') != 'tab' ) 236 | { 237 | return; 238 | } 239 | 240 | 241 | //console.log('conditional_logic/show tab %o', $target); 242 | 243 | 244 | // vars 245 | var $tab = $target.siblings('.acf-tab-wrap').find('a[data-key="' + $target.attr('data-field_key') + '"]'); 246 | 247 | 248 | // if tab is already visible, then ignore the following functiolnality 249 | if( $tab.is(':visible') ) 250 | { 251 | return; 252 | } 253 | 254 | 255 | // visibility 256 | $tab.parent().show(); 257 | 258 | 259 | // if this is the active tab 260 | if( $tab.parent().hasClass('active') ) 261 | { 262 | $tab.trigger('click'); 263 | return; 264 | } 265 | 266 | 267 | // if the sibling active tab is actually hidden by conditional logic, take ownership of tabs 268 | if( $tab.parent().siblings('.active').is(':hidden') ) 269 | { 270 | // show this tab group 271 | $tab.trigger('click'); 272 | return; 273 | } 274 | 275 | 276 | }); 277 | 278 | 279 | 280 | })(jQuery); -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/js/tinymce.code.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("code",function(e){function o(){e.windowManager.open({title:"Source code",body:{type:"textbox",name:"code",multiline:!0,minWidth:e.getParam("code_dialog_width",600),minHeight:e.getParam("code_dialog_height",Math.min(tinymce.DOM.getViewPort().h-200,500)),value:e.getContent({source_view:!0}),spellcheck:!1,style:"direction: ltr; text-align: left"},onSubmit:function(o){e.focus(),e.undoManager.transact(function(){e.setContent(o.data.code)}),e.selection.setCursorLocation(),e.nodeChanged()}})}e.addCommand("mceCodeEditor",o),e.addButton("code",{icon:"code",tooltip:"Source code",onclick:o}),e.addMenuItem("code",{icon:"code",text:"Source code",context:"tools",onclick:o})}); -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/lang/acf-cs_CZ.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/lang/acf-cs_CZ.mo -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/lang/acf-de_DE.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/lang/acf-de_DE.mo -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/lang/acf-es_ES.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/lang/acf-es_ES.mo -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/lang/acf-fa_IR.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/lang/acf-fa_IR.mo -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/lang/acf-fi_FI.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/lang/acf-fi_FI.mo -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/lang/acf-fr_FR.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/lang/acf-fr_FR.mo -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/lang/acf-he_IL.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/lang/acf-he_IL.mo -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/lang/acf-it_IT.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/lang/acf-it_IT.mo -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/lang/acf-ja.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/lang/acf-ja.mo -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/lang/acf-nl_NL.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/lang/acf-nl_NL.mo -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/lang/acf-pl_PL.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/lang/acf-pl_PL.mo -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/lang/acf-pt_BR.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/lang/acf-pt_BR.mo -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/lang/acf-pt_PT.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/lang/acf-pt_PT.mo -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/lang/acf-ru-RU.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/lang/acf-ru-RU.mo -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/lang/acf-ru_RU.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/lang/acf-ru_RU.mo -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/lang/acf-sk_SK.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/lang/acf-sk_SK.mo -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/lang/acf-sr_RS.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/lang/acf-sr_RS.mo -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/lang/acf-sv_SE.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/lang/acf-sv_SE.mo -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/lang/acf-tr_TR.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/lang/acf-tr_TR.mo -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/lang/acf-uk.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/lang/acf-uk.mo -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/lang/acf-zh_CN.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/lang/acf-zh_CN.mo -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/screenshot-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/screenshot-1.png -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/screenshot-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/screenshot-2.png -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/screenshot-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/screenshot-3.png -------------------------------------------------------------------------------- /smashing-fields-approach-3/vendor/advanced-custom-fields/screenshot-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rayman813/smashing-custom-fields/HEAD/smashing-fields-approach-3/vendor/advanced-custom-fields/screenshot-4.png --------------------------------------------------------------------------------