Plugin Directory

Changeset 1408836


Ignore:
Timestamp:
05/02/2016 11:22:07 AM (10 years ago)
Author:
getcopyfight
Message:

version 1.3.11

Location:
copyfight
Files:
36 added
14 edited

Legend:

Unmodified
Added
Removed
  • copyfight/trunk/_inc/copyfight-admin.css

    r1393310 r1408836  
    8585.column-copyfight input {
    8686    border: none;
     87    box-shadow: none;
     88    background: none;
     89    opacity: 1 !important;
     90    cursor: default;
    8791}
    8892
  • copyfight/trunk/_inc/copyfight.css

    r1380393 r1408836  
    3333    background-color: red;
    3434    color: white;
     35    text-align: center;
    3536}
  • copyfight/trunk/class.copyfight-admin.php

    r1408025 r1408836  
    7676        register_setting( 'copyfight_options_group', 'copyfight_newsletter' );
    7777        register_setting( 'copyfight_options_group', 'copyfight_status' );
     78        register_setting( 'copyfight_options_group', 'copyfight_tags' );
    7879        register_setting( 'copyfight_options_group', 'copyfight_typeface' );
    7980        register_setting( 'copyfight_options_group', 'copyfight_excerpt' );
     
    157158    public static function display_posts_copyfight( $column, $post_id ) {
    158159        if ($column == 'copyfight') {
    159             $status = call_user_func(COPYFIGHT_CLASS_ADMIN . '::is_copyfight_enabled', $post_id);
     160            $status = get_post_meta( $post_id, '_copyfight_status', true );
    160161            if ( $status == 'enabled' ) {
    161162                echo '<input type="checkbox" disabled checked/>';
     
    167168
    168169    public static function add_copyfight_column( $columns ) {
    169         return array_merge( $columns,
    170             array( 'copyfight' => __( 'Copyfight', 'copyfight' ) ) );
     170        return array_merge( $columns, array( 'copyfight' => __( 'Copyfight', 'copyfight' ) ) );
    171171    }
    172172
     
    175175        if ( strlen( $status ) ) {
    176176            $status = ( $status == 'disabled' ) ? 'disabled' : 'enabled';
    177         // get default setting
     177        // get default status setting
    178178        } else {
    179179            $status = get_option('copyfight_status');
     
    182182    }
    183183
     184    public static function is_tags_enabled( $post_id ) {
     185        $status = get_post_meta( $post_id, '_copyfight_tags', true );
     186        if ( strlen( $status ) ) {
     187            $status = ( $status == 'disabled' ) ? 'disabled' : 'enabled';
     188        // get default tag setting
     189        } else {
     190            $status = get_option('copyfight_tags');
     191        }
     192        return $status;
     193    }
     194
    184195    public static function copyfight_add_meta_box() {
    185         add_meta_box( 'copyfight_post', __( 'Copyfight', 'copyfight' ), array(COPYFIGHT_CLASS_ADMIN, 'copyfight_meta_box_callback'), 'post' );
    186         add_meta_box( 'copyfight_page', __( 'Copyfight', 'copyfight' ), array(COPYFIGHT_CLASS_ADMIN, 'copyfight_meta_box_callback'), 'page' );
     196        add_meta_box( 'copyfight_post', __( 'Copyfight', 'copyfight' ), array(COPYFIGHT_CLASS_ADMIN, 'copyfight_meta_box_callback'), 'post', 'side', 'high' );
     197        add_meta_box( 'copyfight_page', __( 'Copyfight', 'copyfight' ), array(COPYFIGHT_CLASS_ADMIN, 'copyfight_meta_box_callback'), 'page', 'side', 'high' );
    187198    }
    188199
    189200    public static function copyfight_meta_box_callback( $post ) {
    190201        wp_nonce_field( 'copyfight_save_meta_box_data', 'copyfight_meta_box_nonce' );
     202
     203        //Status
     204        $status = call_user_func(COPYFIGHT_CLASS_ADMIN . '::is_copyfight_enabled', $post->ID);
    191205        $options = array( 'enabled' => __( 'Enabled', 'copyfight' ), 'disabled' => __( 'Disabled', 'copyfight' ) );
    192 
    193         $status = call_user_func(COPYFIGHT_CLASS_ADMIN . '::is_copyfight_enabled', $post->ID);
    194 
     206        echo '<p>';
    195207        echo '<label for="copyfight_status">' . __( 'Status', 'copyfight' ) . ':</label> ';
    196208        echo '<select name="copyfight_status">';
     
    203215        }
    204216        echo '</select>';
     217        echo '</p>';
     218
     219        //Tags
     220        $status = call_user_func(COPYFIGHT_CLASS_ADMIN . '::is_tags_enabled', $post->ID);
     221        $options = array( 'enabled' => __( 'Enabled', 'copyfight' ), 'disabled' => __( 'Disabled', 'copyfight' ) );
     222        echo '<p>';
     223        echo '<label for="copyfight_tags">' . __( 'Tags', 'copyfight' ) . ':</label> ';
     224        echo '<select name="copyfight_tags">';
     225        foreach ( $options as $value => $option ) {
     226            if ( $value == $status ) {
     227                echo '  <option selected value="' . $value . '">' . $option . '</option>';
     228            } else {
     229                echo '  <option value="' . $value . '">' . $option . '</option>';
     230            }
     231        }
     232        echo '</select>';
     233        echo '</p>';
    205234    }
    206235
     
    224253            }
    225254        }
    226         if ( !isset( $_POST['copyfight_status'] ) ) {
    227             return;
    228         }
     255
     256        if ( !isset( $_POST['copyfight_status'] ) || !isset( $_POST['copyfight_tags'] ) ) {
     257            return;
     258        }
     259
    229260        $copyfight_status = sanitize_text_field( $_POST['copyfight_status'] );
    230261        update_post_meta( $post_id, '_copyfight_status', $copyfight_status );
     262
     263        $copyfight_tags = sanitize_text_field( $_POST['copyfight_tags'] );
     264        update_post_meta( $post_id, '_copyfight_tags', $copyfight_tags );
    231265    }
    232266
     
    277311            update_post_meta( $post_id, '_copyfight_keywords', $response->keywords );
    278312
    279             $terms = $terms = wp_get_post_terms( $post_id );
    280             if ( count( $terms ) == 0 ) {
     313            //Tags
     314            $status = get_post_meta( $post_id, '_copyfight_tags', true );
     315            if ( $status == 'enabled') {
     316                $terms = $terms = wp_get_post_terms( $post_id );
    281317                $keywords = array();
    282318                foreach ( (array) $response->keywords as $keyword => $frequency ) {
     
    285321                wp_set_post_terms( $post_id, $keywords );
    286322            }
     323
    287324        } else {
    288325
  • copyfight/trunk/class.copyfight.php

    r1380393 r1408836  
    7676            }
    7777            $tpl .= '<!--googleon: anchor-->';
    78             $tpl .= '<input id="copyfight_notice" type="hidden" value="' . __( 'There is no content copied because this is a Copyfight protected article.', 'copyfight' ) . '">';
     78            $tpl .= '<input id="copyfight_notice" type="hidden" value="' . __( 'Copyfight prevented copying this content.', 'copyfight' ) . '">';
    7979            $content = str_replace('{content}', $content, $tpl);
    8080
  • copyfight/trunk/copyfight.php

    r1405615 r1408836  
    44Plugin URI:         https://getcopyfight.com/
    55Description:        Copyright protection
    6 Version:            1.3.10
     6Version:            1.3.11
    77Author:             Copyfight
    88Author URI:         https://getcopyfight.com/
     
    3535add_action( 'plugins_loaded', 'copyfight_textdomain' );
    3636
    37 define( 'COPYFIGHT_VERSION', '1.3.10' );
     37define( 'COPYFIGHT_VERSION', '1.3.11' );
    3838define( 'COPYFIGHT_MINIMUM_WP_VERSION', '3.2' );
    3939define( 'COPYFIGHT_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
  • copyfight/trunk/languages/copyfight-es_ES.po

    r1405615 r1408836  
    22msgstr ""
    33"Project-Id-Version: Copyfight\n"
    4 "POT-Creation-Date: 2016-04-27 15:43+0200\n"
    5 "PO-Revision-Date: 2016-04-27 15:44+0200\n"
     4"POT-Creation-Date: 2016-05-02 12:08+0200\n"
     5"PO-Revision-Date: 2016-05-02 12:09+0200\n"
    66"Last-Translator: \n"
    77"Language-Team: Copyfight <[email protected]>\n"
     
    2222msgstr "Error: API vacío campo Clave"
    2323
    24 #: class.copyfight-admin.php:84 class.copyfight-admin.php:313
     24#: class.copyfight-admin.php:84 class.copyfight-admin.php:340
    2525msgid "Settings"
    2626msgstr "Ajustes"
    2727
    28 #: class.copyfight-admin.php:90 class.copyfight-admin.php:165
    29 #: class.copyfight-admin.php:180 class.copyfight-admin.php:181
     28#: class.copyfight-admin.php:90 class.copyfight-admin.php:170
     29#: class.copyfight-admin.php:185 class.copyfight-admin.php:186
    3030msgid "Copyfight"
    3131msgstr "Copyfight"
     
    3636"Se ha producido un error de Derecho de Autor, el artículo no está protegido."
    3737
    38 #: class.copyfight-admin.php:190 class.copyfight-admin.php:327
     38#: class.copyfight-admin.php:194 class.copyfight-admin.php:209
     39#: views/config.php:59 views/config.php:78 views/config.php:128
     40#: views/config.php:147
     41msgid "Enabled"
     42msgstr "Enciende"
     43
     44#: class.copyfight-admin.php:194 class.copyfight-admin.php:209
     45#: views/config.php:58 views/config.php:77 views/config.php:127
     46#: views/config.php:146
     47msgid "Disabled"
     48msgstr "Apagar"
     49
     50#: class.copyfight-admin.php:196 class.copyfight-admin.php:354
    3951msgid "Status"
    4052msgstr "Estado"
    4153
    42 #: class.copyfight-admin.php:302
     54#: class.copyfight-admin.php:211
     55msgid "Tags"
     56msgstr "Etiquetas"
     57
     58#: class.copyfight-admin.php:329
    4359msgid "Overview"
    4460msgstr "Visión de conjunto"
    4561
    46 #: class.copyfight-admin.php:304 class.copyfight-admin.php:315
    47 #: class.copyfight-admin.php:325
     62#: class.copyfight-admin.php:331 class.copyfight-admin.php:342
     63#: class.copyfight-admin.php:352
    4864msgid "Copyfight Configuration"
    4965msgstr "Copyfight Configuración"
    5066
    51 #: class.copyfight-admin.php:305
     67#: class.copyfight-admin.php:332
    5268msgid ""
    5369"Copyfight protects your content, so you can focus on more important things."
     
    5672"importantes."
    5773
    58 #: class.copyfight-admin.php:306
     74#: class.copyfight-admin.php:333
    5975msgid ""
    6076"On this page, you are able to enter/remove an API key, view account "
     
    6480"ver la información de la cuenta y ver las estadísticas."
    6581
    66 #: class.copyfight-admin.php:316 views/config.php:22
     82#: class.copyfight-admin.php:343 views/config.php:22
    6783msgid "API Key"
    6884msgstr "API Clave"
    6985
    70 #: class.copyfight-admin.php:316
     86#: class.copyfight-admin.php:343
    7187msgid "Enter/remove an API key."
    7288msgstr "Introducir/eliminar una clave de API."
    7389
    74 #: class.copyfight-admin.php:323
     90#: class.copyfight-admin.php:350
    7591msgid "Account"
    7692msgstr "Cuenta"
    7793
    78 #: class.copyfight-admin.php:326
     94#: class.copyfight-admin.php:353
    7995msgid "Subscription Type"
    8096msgstr "Tipo de suscripción"
    8197
    82 #: class.copyfight-admin.php:326
     98#: class.copyfight-admin.php:353
    8399msgid "The Copyfight subscription plan"
    84100msgstr "El plan de suscripción Copyfight"
    85101
    86 #: class.copyfight-admin.php:327
     102#: class.copyfight-admin.php:354
    87103msgid "The subscription status - active, cancelled or suspended"
    88104msgstr "El estado de suscripción - activo, cancelado o suspendido"
    89105
    90 #: class.copyfight-admin.php:332
     106#: class.copyfight-admin.php:359
    91107msgid "For more information:"
    92108msgstr "Para más información:"
    93109
    94 #: class.copyfight-admin.php:333
     110#: class.copyfight-admin.php:360
    95111msgid "Copyfight FAQ"
    96112msgstr "Copyfight FAQ"
    97113
    98 #: class.copyfight-admin.php:334
     114#: class.copyfight-admin.php:361
    99115msgid "Copyfight Support"
    100116msgstr "Soporte Copyfight"
    101117
    102 #: class.copyfight-admin.php:380 class.copyfight-admin.php:396
     118#: class.copyfight-admin.php:407 class.copyfight-admin.php:423
    103119msgid "A Copyfight error has occurred..."
    104120msgstr "Se ha producido un error de Copyfight..."
    105121
    106122#: class.copyfight.php:78
    107 msgid ""
    108 "There is no content copied because this is a Copyfight protected article."
    109 msgstr ""
    110 "No hay contenido copiado porque se trata de un artículo protegido por "
    111 "Copyfight."
     123msgid "Copyfight prevented copying this content."
     124msgstr "Copyfight impide la copia este contenido."
    112125
    113126#: class.copyfight.php:98 class.copyfight.php:107
     
    160173msgstr "Estado predeterminado"
    161174
    162 #: views/config.php:58 views/config.php:108 views/config.php:127
    163 msgid "Disabled"
    164 msgstr "Apagar"
    165 
    166 #: views/config.php:59 views/config.php:109 views/config.php:128
    167 msgid "Enabled"
    168 msgstr "Enciende"
    169 
    170175#: views/config.php:67
     176msgid "Default tags"
     177msgstr "Estado etiquetas"
     178
     179#: views/config.php:86
    171180msgid "Typeface"
    172181msgstr "Tipo de letra"
    173182
    174 #: views/config.php:98
     183#: views/config.php:117
    175184msgid "Use excerpt"
    176185msgstr "El uso del extracto"
    177186
    178 #: views/config.php:117
     187#: views/config.php:136
    179188msgid "FOUC Protection"
    180189msgstr "FOUC Protección"
    181190
    182 #: views/config.php:117
     191#: views/config.php:136
    183192msgid "(Flash Of Unstyled Content)"
    184193msgstr ""
     
    216225
    217226#~ msgid ""
     227#~ "There is no content copied because this is a Copyfight protected article."
     228#~ msgstr ""
     229#~ "No hay contenido copiado porque se trata de un artículo protegido por "
     230#~ "Copyfight."
     231
     232#~ msgid ""
    218233#~ "There is no content copied because this is a Copyfight protected post."
    219234#~ msgstr "No hay contenido porque este es un Copyfight protegida puesto."
  • copyfight/trunk/languages/copyfight-nl_NL.po

    r1405615 r1408836  
    44msgstr ""
    55"Project-Id-Version: Development (trunk)\n"
    6 "POT-Creation-Date: 2016-04-27 15:40+0200\n"
    7 "PO-Revision-Date: 2016-04-27 15:45+0200\n"
     6"POT-Creation-Date: 2016-05-02 12:07+0200\n"
     7"PO-Revision-Date: 2016-05-02 12:08+0200\n"
    88"Last-Translator: \n"
    99"Language-Team: \n"
     
    2323msgstr "Fout: leeg API sleutel veld"
    2424
    25 #: class.copyfight-admin.php:84 class.copyfight-admin.php:313
     25#: class.copyfight-admin.php:84 class.copyfight-admin.php:340
    2626msgid "Settings"
    2727msgstr "Configuratie"
    2828
    29 #: class.copyfight-admin.php:90 class.copyfight-admin.php:165
    30 #: class.copyfight-admin.php:180 class.copyfight-admin.php:181
     29#: class.copyfight-admin.php:90 class.copyfight-admin.php:170
     30#: class.copyfight-admin.php:185 class.copyfight-admin.php:186
    3131msgid "Copyfight"
    3232msgstr "Copyfight"
     
    3636msgstr "Een Copyright fout is opgetreden, uw artikel is niet beschermd."
    3737
    38 #: class.copyfight-admin.php:190 class.copyfight-admin.php:327
     38#: class.copyfight-admin.php:194 class.copyfight-admin.php:209
     39#: views/config.php:59 views/config.php:78 views/config.php:128
     40#: views/config.php:147
     41msgid "Enabled"
     42msgstr "Aan"
     43
     44#: class.copyfight-admin.php:194 class.copyfight-admin.php:209
     45#: views/config.php:58 views/config.php:77 views/config.php:127
     46#: views/config.php:146
     47msgid "Disabled"
     48msgstr "Uit"
     49
     50#: class.copyfight-admin.php:196 class.copyfight-admin.php:354
    3951msgid "Status"
    4052msgstr "Status"
    4153
    42 #: class.copyfight-admin.php:302
     54#: class.copyfight-admin.php:211
     55msgid "Tags"
     56msgstr "Tags"
     57
     58#: class.copyfight-admin.php:329
    4359msgid "Overview"
    4460msgstr "Overzicht"
    4561
    46 #: class.copyfight-admin.php:304 class.copyfight-admin.php:315
    47 #: class.copyfight-admin.php:325
     62#: class.copyfight-admin.php:331 class.copyfight-admin.php:342
     63#: class.copyfight-admin.php:352
    4864msgid "Copyfight Configuration"
    4965msgstr "Copyfight Configuratie"
    5066
    51 #: class.copyfight-admin.php:305
     67#: class.copyfight-admin.php:332
    5268msgid ""
    5369"Copyfight protects your content, so you can focus on more important things."
     
    5672"belangrijke zaken."
    5773
    58 #: class.copyfight-admin.php:306
     74#: class.copyfight-admin.php:333
    5975msgid ""
    6076"On this page, you are able to enter/remove an API key, view account "
     
    6480"bekijken."
    6581
    66 #: class.copyfight-admin.php:316 views/config.php:22
     82#: class.copyfight-admin.php:343 views/config.php:22
    6783msgid "API Key"
    6884msgstr "API key"
    6985
    70 #: class.copyfight-admin.php:316
     86#: class.copyfight-admin.php:343
    7187msgid "Enter/remove an API key."
    7288msgstr "API-sleutel invoeren of verwijderen."
    7389
    74 #: class.copyfight-admin.php:323
     90#: class.copyfight-admin.php:350
    7591msgid "Account"
    7692msgstr "Account"
    7793
    78 #: class.copyfight-admin.php:326
     94#: class.copyfight-admin.php:353
    7995msgid "Subscription Type"
    8096msgstr "Abonnementstype"
    8197
    82 #: class.copyfight-admin.php:326
     98#: class.copyfight-admin.php:353
    8399msgid "The Copyfight subscription plan"
    84100msgstr "Het Copyfight abonnementen overzicht"
    85101
    86 #: class.copyfight-admin.php:327
     102#: class.copyfight-admin.php:354
    87103msgid "The subscription status - active, cancelled or suspended"
    88104msgstr "Abonnementstatus - actief, geannuleerd of geschorst"
    89105
    90 #: class.copyfight-admin.php:332
     106#: class.copyfight-admin.php:359
    91107msgid "For more information:"
    92108msgstr "Voor meer info:"
    93109
    94 #: class.copyfight-admin.php:333
     110#: class.copyfight-admin.php:360
    95111msgid "Copyfight FAQ"
    96112msgstr "Copyfight Veelgestelde Vragen"
    97113
    98 #: class.copyfight-admin.php:334
     114#: class.copyfight-admin.php:361
    99115msgid "Copyfight Support"
    100116msgstr "Copyfight ondersteuning"
    101117
    102 #: class.copyfight-admin.php:380 class.copyfight-admin.php:396
     118#: class.copyfight-admin.php:407 class.copyfight-admin.php:423
    103119msgid "A Copyfight error has occurred..."
    104120msgstr "Er is een Copyfight fout opgetreden..."
    105121
    106122#: class.copyfight.php:78
    107 msgid ""
    108 "There is no content copied because this is a Copyfight protected article."
    109 msgstr ""
    110 "Er is geen inhoud gekopieerd, want dit is een Copyfight beschermd artikel."
     123msgid "Copyfight prevented copying this content."
     124msgstr "Copyfight voorkwam het kopiëren van deze content."
    111125
    112126#: class.copyfight.php:98 class.copyfight.php:107
     
    158172msgstr "Standaard status"
    159173
    160 #: views/config.php:58 views/config.php:108 views/config.php:127
    161 msgid "Disabled"
    162 msgstr "Uit"
    163 
    164 #: views/config.php:59 views/config.php:109 views/config.php:128
    165 msgid "Enabled"
    166 msgstr "Aan"
    167 
    168174#: views/config.php:67
     175msgid "Default tags"
     176msgstr "Standaard tags"
     177
     178#: views/config.php:86
    169179msgid "Typeface"
    170180msgstr "Lettertype"
    171181
    172 #: views/config.php:98
     182#: views/config.php:117
    173183msgid "Use excerpt"
    174184msgstr "Gebruik samenvatting"
    175185
    176 #: views/config.php:117
     186#: views/config.php:136
    177187msgid "FOUC Protection"
    178188msgstr "FOUC Protectie"
    179189
    180 #: views/config.php:117
     190#: views/config.php:136
    181191msgid "(Flash Of Unstyled Content)"
    182192msgstr ""
     
    207217"Onze <a href=\"https://getcopyfight.com/fair-use-policy/\" target=\"_blank"
    208218"\">Fair Use Policy</a> is van toepassing op alle acties en abonnementen."
     219
     220#~ msgid ""
     221#~ "There is no content copied because this is a Copyfight protected article."
     222#~ msgstr ""
     223#~ "Er is geen inhoud gekopieerd, want dit is een Copyfight beschermd artikel."
    209224
    210225#~ msgid "A Copyfight error has occurred... "
  • copyfight/trunk/readme.txt

    r1405623 r1408836  
    77Requires at least:  3.3.0
    88Tested up to:       4.5.1
    9 Stable tag:         1.3.10
     9Stable tag:         1.3.11
    1010License:            GPLv2 or later
    1111License URI:        http://www.gnu.org/licenses/gpl-2.0.html
     
    6767
    6868== Screenshots ==
    69 1. Configuration screen
    70 2. Posts/Pages listing: Copyfigth column
     691. Copyfight configuration screen
     702. Posts/Pages listing: Copyfight column
    71713. Post/Page screen: Copyfight options
    7272
  • copyfight/trunk/views/config.php

    r1405615 r1408836  
    6565            </tr>
    6666            <tr valign="top">
    67                 <th scope="row"><label for="copyfight_typeface"><?php _e('Typeface', 'copyfight'); ?></label></th>
     67                <th scope="row"><label for="copyfight_tags"><?php _e('Default tags', 'copyfight'); ?></label></th>
    6868                <td style="white-space: nowrap">
    69                     <select id="copyfight_typeface" name="copyfight_typeface">
     69                    <select id="copyfight_tags" name="copyfight_tags">
    7070                        <?php
    71                         $timestamp = false;
    72                         $fontlist = file_get_contents( COPYFIGHT_FONTLIST );
    73                         $fonts = unserialize( $fontlist );
    74                         $copyfight_typeface = get_option('copyfight_typeface');
    75                         if ( strlen( $copyfight_typeface ) == 0 ) {
    76                             update_option('copyfight_typeface', 'opensans/OpenSans-Regular.ttf');
    77                             $copyfight_typeface = get_option('copyfight_typeface');
    78                         }
    79                         asort($fonts);
    80                         foreach ($fonts as $file => $name) {
    81                             if ($copyfight_typeface == $file) {
    82                                 echo '  <option selected value="' . $file . '">' . $name[0] . '</option>';
    83                             } else {
    84                                 echo '  <option value="' . $file . '">' . $name[0] . '</option>';
    85                             }
     71                        $copyfight_tags = get_option('copyfight_tags');
     72                        if ( strlen( $copyfight_tags ) == 0 ) {
     73                            update_option('copyfight_tags', 'enabled');
     74                            $copyfight_tags = get_option('copyfight_tags');
    8675                        }
    8776                        ?>
     77                        <option <?php if ( $copyfight_tags == 'disabled') { echo 'selected '; } ?>value="disabled"><?php _e('Disabled', 'copyfight'); ?></option>';
     78                        <option <?php if ( $copyfight_tags == 'enabled') { echo 'selected '; } ?> value="enabled"><?php _e('Enabled', 'copyfight'); ?></option>';
    8879                    </select>
    89                     <?php add_thickbox(); ?>
    90                     <div id="copyfight_typeface_info_loader"><img src="/wp-admin/images/wpspin_light-2x.gif" /></div>
    91                     <a id="copyfight_typeface_info_link" title="Typeface" href="#TB_inline?width=640&height=320&inlineId=copyfight_typeface_info" class="thickbox">
    92                         <div class="dashicons dashicons-info copyfight_typeface_info"></div>
     80                    <a id="copyfight_tags_info" target="_blank" title="Default tags" href="<?php echo COPYFIGHT_HOME; ?>support/wordpress-default-tags/">
     81                        <div class="dashicons dashicons-info"></div>
    9382                    </a>
    94                     <div id="copyfight_typeface_info" class="cf_modal"></div>
    9583                </td>
    9684            </tr>
     
    133121                </td>
    134122            </tr>
     123            <tr valign="top">
     124                <th scope="row"><label for="copyfight_typeface"><?php _e('Typeface', 'copyfight'); ?></label></th>
     125                <td style="white-space: nowrap">
     126                    <select id="copyfight_typeface" name="copyfight_typeface">
     127                        <?php
     128                        $timestamp = false;
     129                        $fontlist = file_get_contents( COPYFIGHT_FONTLIST );
     130                        $fonts = unserialize( $fontlist );
     131                        $copyfight_typeface = get_option('copyfight_typeface');
     132                        if ( strlen( $copyfight_typeface ) == 0 ) {
     133                            update_option('copyfight_typeface', 'opensans/OpenSans-Regular.ttf');
     134                            $copyfight_typeface = get_option('copyfight_typeface');
     135                        }
     136                        asort($fonts);
     137                        foreach ($fonts as $file => $name) {
     138                            if ($copyfight_typeface == $file) {
     139                                echo '  <option selected value="' . $file . '">' . $name[0] . '</option>';
     140                            } else {
     141                                echo '  <option value="' . $file . '">' . $name[0] . '</option>';
     142                            }
     143                        }
     144                        ?>
     145                    </select>
     146                    <?php add_thickbox(); ?>
     147                    <div id="copyfight_typeface_info_loader"><img src="/wp-admin/images/wpspin_light-2x.gif" /></div>
     148                    <a id="copyfight_typeface_info_link" title="Typeface" href="#TB_inline?width=640&height=320&inlineId=copyfight_typeface_info" class="thickbox">
     149                        <div class="dashicons dashicons-info copyfight_typeface_info"></div>
     150                    </a>
     151                    <div id="copyfight_typeface_info" class="cf_modal"></div>
     152                </td>
     153            </tr>
    135154        </table>
    136155
Note: See TracChangeset for help on using the changeset viewer.