Plugin Directory

Changeset 1265559


Ignore:
Timestamp:
10/14/2015 07:11:47 AM (10 years ago)
Author:
uiux
Message:

fixing issue with timeline language && added ability to add media for initial timeline slide

Location:
timelinejs/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • timelinejs/trunk/readme.txt

    r1264734 r1265559  
    5252
    5353= 1.03 =
    54 *fixed issue with display date not overriding date
     54*fixing issue with display date not overriding date object
     55
     56= 1.04 =
     57*added ability to set media for the timelines intial slide
     58*added ability to choose language for timeline
  • timelinejs/trunk/timeline-acf-fields.php

    r1263453 r1265559  
    4141                'multiple' => 0,
    4242            ),
     43            array (
     44                'key' => 'field_561dfa779e0e9',
     45                'label' => 'Timeline Language',
     46                'name' => 'tl_timeline_language',
     47                'type' => 'select',
     48                'choices' => array (
     49                    'en' => 'en',
     50                    'be' => 'be',
     51                    'de' => 'de',
     52                    'es' => 'es',
     53                    'fr' => 'fr',
     54                    'he' => 'he',
     55                    'it' => 'it',
     56                    'jp' => 'jp',
     57                    'nl' => 'nl',
     58                    'no' => 'no',
     59                    'pl' => 'pl',
     60                    'sr' => 'sr',
     61                    'sv' => 'sv',
     62                    'zh-cn' => 'zh-cn',
     63                    'zh-tw' => 'zh-tw',
     64                ),
     65                'default_value' => 'en',
     66                'allow_null' => 0,
     67                'multiple' => 0,
     68            ),
     69            array (
     70                'key' => 'field_561dfd537e7b0',
     71                'label' => 'Timeline External Media',
     72                'name' => 'tl_timeline_external_media_content',
     73                'type' => 'text',
     74                'default_value' => '',
     75                'placeholder' => '',
     76                'prepend' => '',
     77                'append' => '',
     78                'formatting' => 'html',
     79                'maxlength' => '',
     80            ),
     81            array (
     82                'key' => 'field_561dfd737e7b1',
     83                'label' => 'Timeline Media',
     84                'name' => 'tl_timeline_media',
     85                'type' => 'image',
     86                'save_format' => 'url',
     87                'preview_size' => 'thumbnail',
     88                'library' => 'all',
     89            ),
     90            array (
     91                'key' => 'field_561dfd8a7e7b2',
     92                'label' => 'Timeline Media Credit',
     93                'name' => 'tl_timeline_media_credit',
     94                'type' => 'text',
     95                'default_value' => '',
     96                'placeholder' => '',
     97                'prepend' => '',
     98                'append' => '',
     99                'formatting' => 'html',
     100                'maxlength' => '',
     101            ),
     102            array (
     103                'key' => 'field_561dfd947e7b3',
     104                'label' => 'Timeline Media Caption',
     105                'name' => 'tl_timeline_media_caption',
     106                'type' => 'text',
     107                'default_value' => '',
     108                'placeholder' => '',
     109                'prepend' => '',
     110                'append' => '',
     111                'formatting' => 'html',
     112                'maxlength' => '',
     113            ),
    43114        ),
    44115        'location' => array (
     
    610681
    611682
     683
    612684?>
  • timelinejs/trunk/timeline-acf-pro-fields.php

    r1248986 r1265559  
    6161            'disabled' => 0,
    6262            'readonly' => 0,
     63        ),
     64        array (
     65            'key' => 'field_561dfca9e84d9',
     66            'label' => 'Timeline External Media',
     67            'name' => 'tl_timeline_external_media_content',
     68            'type' => 'url',
     69            'instructions' => '',
     70            'required' => 0,
     71            'conditional_logic' => 0,
     72            'wrapper' => array (
     73                'width' => '',
     74                'class' => '',
     75                'id' => '',
     76            ),
     77            'default_value' => '',
     78            'placeholder' => '',
     79        ),
     80        array (
     81            'key' => 'field_561dfcdfe84da',
     82            'label' => 'Timeline Media',
     83            'name' => 'tl_timeline_media_image',
     84            'type' => 'image',
     85            'instructions' => '',
     86            'required' => 0,
     87            'conditional_logic' => 0,
     88            'wrapper' => array (
     89                'width' => '',
     90                'class' => '',
     91                'id' => '',
     92            ),
     93            'return_format' => 'url',
     94            'preview_size' => 'thumbnail',
     95            'library' => 'all',
     96            'min_width' => '',
     97            'min_height' => '',
     98            'min_size' => '',
     99            'max_width' => '',
     100            'max_height' => '',
     101            'max_size' => '',
     102            'mime_types' => '',
     103        ),
     104        array (
     105            'key' => 'field_561dfb1bb5ecd',
     106            'label' => 'Timeline Language',
     107            'name' => 'tl_timeline_language',
     108            'type' => 'select',
     109            'instructions' => '',
     110            'required' => 0,
     111            'conditional_logic' => 0,
     112            'wrapper' => array (
     113                'width' => '',
     114                'class' => '',
     115                'id' => '',
     116            ),
     117            'choices' => array (
     118                'en' => 'en',
     119                'be' => 'be',
     120                'de' => 'de',
     121                'es' => 'es',
     122                'fr' => 'fr',
     123                'he' => 'he',
     124                'it' => 'it',
     125                'jp' => 'jp',
     126                'nl' => 'nl',
     127                'no' => 'no',
     128                'pl' => 'pl',
     129                'sr' => 'sr',
     130                'sv' => 'sv',
     131                'zh-cn' => 'zh-cn',
     132                'zh-tw' => 'zh-tw',
     133            ),
     134            'default_value' => array (
     135                'en' => 'en',
     136            ),
     137            'allow_null' => 0,
     138            'multiple' => 0,
     139            'ui' => 0,
     140            'ajax' => 0,
     141            'placeholder' => '',
     142            'disabled' => 0,
     143            'readonly' => 0,
     144        ),
     145        array (
     146            'key' => 'field_561dfd1ee84db',
     147            'label' => 'Timeline Media Credit',
     148            'name' => 'tl_timeline_media_credit',
     149            'type' => 'text',
     150            'instructions' => '',
     151            'required' => 0,
     152            'conditional_logic' => 0,
     153            'wrapper' => array (
     154                'width' => '',
     155                'class' => '',
     156                'id' => '',
     157            ),
     158            'default_value' => '',
     159            'placeholder' => '',
     160            'prepend' => '',
     161            'append' => '',
     162            'maxlength' => '',
     163            'readonly' => 0,
     164            'disabled' => 0,
     165        ),
     166        array (
     167            'key' => 'field_561dfd38e84dc',
     168            'label' => 'Timeline Media Caption',
     169            'name' => 'tl_timeline_media_caption',
     170            'type' => 'text',
     171            'instructions' => '',
     172            'required' => 0,
     173            'conditional_logic' => 0,
     174            'wrapper' => array (
     175                'width' => '',
     176                'class' => '',
     177                'id' => '',
     178            ),
     179            'default_value' => '',
     180            'placeholder' => '',
     181            'prepend' => '',
     182            'append' => '',
     183            'maxlength' => '',
     184            'readonly' => 0,
     185            'disabled' => 0,
    63186        ),
    64187    ),
  • timelinejs/trunk/timeline.php

    r1264735 r1265559  
    55Plugin URI:
    66Description: TimelineJS is Knight Lab's most widely used product. TimelineJS is an open-source tool that enables anyone to build visually rich, interactive timelines.
    7 Version: 1.03
     7Version: 1.04
    88Author: Ben Parry
    99Author URI: http://uiux.me
     
    6565        }
    6666
     67        $image = get_field('tl_timeline_media', $timeline->ID);
     68        $image = ($image != null) ? $image : false;
     69
     70        $external = get_field('tl_timeline_media_external_content', $timeline->ID);
     71        $external = ($external != null) ? $external : '';
     72
     73        $media_url = ($image != false) ? $image : $external;
     74
     75        $credit = get_field('tl_timeline_media_credit', $timeline->ID);
     76        $credit = ($credit != null) ? $credit : false;
     77
     78        $caption = get_field('tl_timeline_media_caption', $timeline->ID);
     79        $caption = ($caption != null) ? $caption : false;
     80
    6781        $language = get_field('tl_timeline_language', $timeline->ID);
    6882        if($language == null) {
     
    7286        $timeline_object = array(
    7387            'title'     =>  array(
    74                     'headline'  =>  $timeline->post_title,
    75                     'text'      =>  $timeline->post_content,
     88                    'text'      =>  array(
     89                        'headline'  =>  $timeline->post_title,
     90                        'text'      =>  $timeline->post_content
     91                        ),
     92                    'media' =>  array(
     93                            'url'       =>  $media_url,
     94                            'caption'   =>  $caption,
     95                            'credit'    =>  $credit
     96                        )
    7697                ),
    7798            'scale'     =>  $scale,
Note: See TracChangeset for help on using the changeset viewer.