WordPress.org

Plugin Directory

Changeset 802729


Ignore:
Timestamp:
11/11/13 21:12:07 (5 months ago)
Author:
eskapism
Message:

deploy from git

Location:
simple-fields/trunk
Files:
7 added
1 deleted
11 edited

Legend:

Unmodified
Added
Removed
  • simple-fields/trunk/field_types/field_date_v2.php

    r728801 r802729  
    436436 
    437437            // @todo: what if no value? 
     438            $arr_extended = array(); 
    438439            foreach ($values as $key => $one_value) { 
    439440                 
  • simple-fields/trunk/functions.php

    r728801 r802729  
    549549    $highest_id = 0; 
    550550    $is_new_field_group = TRUE; 
     551    $errors = new WP_Error(); 
    551552 
    552553    // First get the id of the field group we are adding. Existing or highest new. 
     
    14921493 * The first value if field group is repeatable 
    14931494 * 
    1494  * @param string $field_slug 
     1495 * @param string $field_slug. can be in "slashed" format, ie.. fieldgroupslug/fieldgroup, to avoid wrong value being fetched when multiple fields have the same slug. 
    14951496 * @param int $post_id ID of post or null to use current post in loop 
    14961497 * @param array $options Array or query string of options to send to field type 
     
    15081509/** 
    15091510 * Gets all values as array 
    1510  * @param string $field_slug or comman separated list of several slugs 
     1511 * @param string $field_slug or comma separated list of several slugs. can be in "slashed" format, ie.. fieldgroupslug/fieldgroup, to avoid wrong value being fetched when multiple fields have the same slug. 
    15111512 * @param int $post_id ID of post or null to use current post in loop 
    15121513 * @param array $options Array or query string of options to send to field type 
     
    15661567                $loopnum = 0; 
    15671568 
    1568                 if (!isset($arr_comma_slugs_values[$loopnum])) $arr_comma_slugs_values[$loopnum] = array(); 
    1569  
     1569                if (!isset($arr_comma_slugs_values[$loopnum])) 
     1570                    $arr_comma_slugs_values[$loopnum] = array(); 
     1571 
     1572                // If slashed value then fetch slug part 
     1573                $is_slashed_slug = ( strpos($one_of_the_comma_separated_slug, "/") !== false ) ? true : false; 
     1574 
     1575                if ( $is_slashed_slug ) { 
     1576                    list($unslashed_group_slug, $unslashed_field_slug) =  explode("/", $one_of_the_comma_separated_slug); 
     1577                    $slug_for_array = $unslashed_field_slug; 
     1578                } else { 
     1579                    $slug_for_array = $one_of_the_comma_separated_slug; 
     1580                } 
     1581 
     1582                // create array with result 
    15701583                foreach ($one_slug_values as $one_slug_sub_value) { 
    1571                     $arr_comma_slugs_values[$loopnum][$one_of_the_comma_separated_slug] = $one_slug_sub_value; 
     1584 
     1585                    $arr_comma_slugs_values[$loopnum][$slug_for_array] = $one_slug_sub_value; 
    15721586                    $loopnum++; 
     1587 
    15731588                } 
    15741589 
    15751590            } 
    15761591        } 
     1592 
    15771593 
    15781594        $arr_comma_slugs_values = apply_filters( "simple_fields_values", $arr_comma_slugs_values, $field_slug, $post_id, $options); 
     
    15811597    } 
    15821598 
     1599    // here we get a single field 
    15831600    global $sf; 
    15841601 
     
    15931610    $parsed_options = wp_parse_args($options); 
    15941611 
     1612    // if slug contains slash ("/") then this is a field that we want to get by both field groups and field slug (so field slug can be same for multiple fields) 
     1613    // lke this: fieldgroupslug/fieldslug 
     1614    $is_slashed_slug = ( strpos($field_slug, "/") !== false ) ? true : false; 
     1615    if ( $is_slashed_slug ) 
     1616        list($unslashed_group_slug, $unslashed_field_slug) =  explode("/", $field_slug); 
     1617 
    15951618    // Loop through the field groups that this post connector has and locate the field_slug we are looking for 
    15961619    foreach ($post_connector_info["field_groups"] as $one_field_group) { 
    15971620 
     1621        // If slug is slashed then the field group must match 
     1622        if ( $is_slashed_slug && $unslashed_group_slug !== $one_field_group["slug"]) 
     1623            continue; 
     1624 
    15981625        // Loop the fields in this field group 
    15991626        foreach ($one_field_group["fields"] as $one_field_group_field) {  
     
    16021629            if ($one_field_group_field["deleted"]) continue; 
    16031630 
    1604             if ($field_slug === $one_field_group_field["slug"]) { 
     1631            if ($field_slug === $one_field_group_field["slug"] || $is_slashed_slug && $unslashed_field_slug === $one_field_group_field["slug"]) { 
    16051632             
    16061633                // Detect options for the field with this slug 
     
    17121739                $saved_values = apply_filters("simple-fields-return-values-" . $one_field_group_field["type"], $saved_values); 
    17131740                $saved_values = apply_filters( "simple_fields_values", $saved_values, $field_slug, $post_id, $options, $one_field_group_field["type"]); 
     1741 
    17141742                return $saved_values;                    
    17151743 
     
    17741802 
    17751803/** 
    1776  * Returns allt the values in a field group 
     1804 * Returns all the values in a field group 
    17771805 * It's a shortcut to running simple_fields_value(slugs) with all slugs already entered 
    17781806 * Depending if the field group is repeatable or not, simple_field_value or simple_fields_values will be used 
     
    17911819    $cache_key = "simple_fields_".$sf->ns_key."_fieldgroup_" . $field_group_id_or_slug . "_" . $post_id . "_" . md5(json_encode($options)); 
    17921820    $values = wp_cache_get( $cache_key, 'simple_fields'); 
     1821 
    17931822    if (FALSE === $values) { 
    17941823     
    17951824        $field_group = $sf->get_field_group_by_slug($field_group_id_or_slug); 
    1796      
     1825 
    17971826        $arr_fields = array(); 
    17981827        foreach ($field_group["fields"] as $one_field) { 
     1828 
    17991829            if ($one_field["deleted"]) continue; 
    1800             $arr_fields[] = trim($one_field["slug"]); 
     1830 
     1831            // add field group to each field slug 
     1832            $arr_fields[] = trim($one_field["field_group"]["slug"]) . "/" . trim($one_field["slug"]); 
     1833 
    18011834        } 
    18021835         
    18031836        $str_field_slugs = join(",", $arr_fields); 
     1837         
    18041838        if ($field_group["repeatable"]) { 
    18051839            $values = simple_fields_values($str_field_slugs, $post_id); 
     
    18071841            $values = simple_fields_value($str_field_slugs, $post_id); 
    18081842        } 
     1843 
    18091844        wp_cache_set( $cache_key, $values, 'simple_fields' ); 
     1845 
    18101846    } 
    18111847 
  • simple-fields/trunk/inc-admin-options-export-import.php

    r707596 r802729  
    5050            } 
    5151 
     52            // We have JSON contents from file or textarea 
     53            // @todo: create function of the next part 
    5254            $arr_import = json_decode($import_json, true); 
    5355            if ( is_null( $arr_import ) ) { 
     
    160162                    // Abort prev call 
    161163                    if (ajaxPost && ajaxPost.readyState !== 4) { 
    162                         console.log("aborted"); 
     164//                      console.log("aborted"); 
    163165                        ajaxPost.abort(); 
    164166                    } 
  • simple-fields/trunk/inc-admin-options-manage.php

    r740248 r802729  
    2626                    </th> 
    2727                    <td> 
    28                         <p><?php echo esc_html( $selected_post_type->label ) ?></p> 
     28                        <p><?php echo esc_html( $selected_post_type->labels->name . " (" . $selected_post_type->name . ")" ) ?></p> 
    2929                    </td> 
    3030                </tr> 
     
    235235                    foreach ($wp_post_types as $one_post_type) { 
    236236                        if (!in_array($one_post_type->name, $arr_post_types_to_ignore)) { 
     237                            $input_id = "post_types_" . $one_post_type->name; 
    237238                            ?> 
    238239                            <p> 
    239                                 <input <?php echo (in_array($one_post_type->name, $post_connector_in_edit["post_types"]) ? " checked='checked' " : ""); ?> type="checkbox" name="post_types[]" value="<?php echo $one_post_type->name ?>" /> 
    240                                 <?php echo $one_post_type->name ?> 
    241                             <?php 
    242                             /* 
    243                             <!-- <td> 
    244                                 <input <?php echo (in_array($one_post_type->name, $post_connector_in_edit["post_types_type_default"]) ? " checked='checked' " : "") ?> type="checkbox" name="post_types_type_default[]" value="<?php echo $one_post_type->name ?>" /> 
     240                                <input  
     241                                    <?php echo (in_array($one_post_type->name, $post_connector_in_edit["post_types"]) ? " checked='checked' " : ""); ?>  
     242                                    type="checkbox"  
     243                                    name="post_types[]"  
     244                                    value="<?php echo $one_post_type->name ?>" 
     245                                    id="<?php echo $input_id ?>" 
     246                                /> 
     247                                <?php 
     248                                printf( '<label for="%3$s">%1$s (%2$s)</label>', $one_post_type->labels->name, $one_post_type->name, $input_id); 
     249                                ?> 
     250                                 
     251                                <?php /* <input <?php echo (in_array($one_post_type->name, $post_connector_in_edit["post_types_type_default"]) ? " checked='checked' " : "") ?> type="checkbox" name="post_types_type_default[]" value="<?php echo $one_post_type->name ?>" /> 
    245252                                Default connector for post type <?php echo $one_post_type->name ?> 
    246                             </td> --> 
    247                             */ 
    248                             ?> 
     253                                */ 
     254                                ?> 
    249255                            </p> 
    250256                            <?php 
     
    253259                    ?> 
    254260                </td> 
     261 
    255262            </tr> 
    256263 
     
    482489            </h3> 
    483490            ', 
    484             __('Field groups', 'simple-fields'), 
     491            __('Field Groups', 'simple-fields'), 
    485492            SIMPLE_FIELDS_FILE . "&amp;action=edit-field-group&amp;group-id=0", 
    486493            __('Add new') 
     
    665672    <div class="simple-fields-post-type-defaults"> 
    666673         
    667         <h3><?php _e('Post type defaults', 'simple-fields') ?></h3> 
     674        <h3><?php _e('Post Type Defaults', 'simple-fields') ?></h3> 
    668675         
    669676        <table class="wp-list-table widefat fixed"> 
     
    672679                <tr> 
    673680                    <th><?php _e("Post type", "simple-fields") ?></th> 
    674                     <th><?php _e("Default connector", "simple-fields") ?></th> 
     681                    <th><?php _e("Default Post Connector", "simple-fields") ?></th> 
    675682                    <th></th><!-- two empty to make table widths same as the other tables --> 
    676683                    <th></th> 
     
    692699                        switch ($default_connector) { 
    693700                            case "__none__": 
    694                                 $default_connector_str = __('Default is to use <em>no connector</em>', 'simple-fields'); 
     701                                $default_connector_str = __('No connector', 'simple-fields'); 
    695702                                break; 
    696703                            case "__inherit__": 
    697                                 $default_connector_str = __('Default is to inherit from <em>parent connector</em>', 'simple-fields'); 
     704                                $default_connector_str = __('Inherit parent connector', 'simple-fields'); 
    698705                                break; 
    699706                            default: 
     
    702709                                    $connector = $this->get_connector_by_id($default_connector); 
    703710                                    if ($connector !== FALSE) { 
    704                                         $default_connector_str = sprintf(__('Default is to use connector <em>%s</em>', 'simple-fields'), $connector["name"]); 
     711                                        $default_connector_str = $connector["name"]; 
    705712                                    } 
    706713                                } 
  • simple-fields/trunk/readme.md

    r689943 r802729  
    1111* See http://simple-fields.com for getting started guides and API documentation. 
    1212* Author: [Pär Thernström](https://twitter.com/eskapism "@eskapism") 
     13 
     14## Current build status 
     15 
     16Master branch 
     17[![Build Status](https://travis-ci.org/bonny/WordPress-Simple-Fields.png)](https://travis-ci.org/bonny/WordPress-Simple-Fields) 
     18 
     19Develop branch 
     20[![Build Status](https://travis-ci.org/bonny/WordPress-Simple-Fields.png?branch=develop)](https://travis-ci.org/bonny/WordPress-Simple-Fields?branch=develop) 
    1321 
    1422## Screenshots 
  • simple-fields/trunk/readme.txt

    r749179 r802729  
    33Donate link: http://simple-fields.com/about/donate/ 
    44Tags: admin, fields, custom fields, advanced custom fields, extended custom fields, more fields, repeatable fields, field manager, attachments, text areas, input fields, tinymce, radio button, drop down, files, meta box, edit, post, post_meta, post meta, custom, simple fields, cms, date picker, time picker, repeatable fields, multiple fields 
    5 Requires at least: 3.5.1 
    6 Tested up to: 3.5.1 
    7 Stable tag: 1.4.2 
     5Requires at least: 3.7.1 
     6Tested up to: 3.7.1 
     7Stable tag: 1.4.3 
    88 
    99With Simple Fields you can add any kind of custom fields to your pages, posts and attachments. 
     
    145145== Changelog == 
    146146 
     147#### Version 1.4.3 
     148 
     149- Preview of posts with simple fields works (did it ever not work? I can't remember...) 
     150- Revisions are saved now saved with Simple Fields values too 
     151- Fixed issue with simple_fields_fieldgroup() when fields in different field groups had the same slug. Fixes https://github.com/bonny/WordPress-Simple-Fields/issues/92. 
     152- Fix rare case with missing thumbnail when selecting a file 
     153- Added: when WB_DEBUG is enabled/true then a "Edit Field Group"-link is added to the header of a field group in the edit post screen and a "Edit Post Connector" is added to the Simple Fields box in the right sidebar (where you select what connector to use for the post). Hopefully these links speed up your development a bit (at least when you're working with setting up your fields.) 
     154- Now outputs the full name and slug of a post type in the post connector and post connector default admin. Previously only slug was shown. 
     155- Fixed some notice warnings, for example when getting extended values for a date field or when a slug did not exist 
     156- Removed a console.log() 
     157- All unit tests are now setup the wp-cli-way, horray! 
     158 
    147159#### Version 1.4.2 
    148160- Post Connectors can now be set from within a page template. Just add 
    149 Simple Fields Connector: slugOfPostConnector 
     161`Simple Fields Connector: slugOfPostConnector` 
    150162to your template and that connector will be used for all pages with that template. 
    151163- New filters as a result from above: set_post_connector_from_template, get_post_connector_from_template 
  • simple-fields/trunk/scripts.js

    r690477 r802729  
    7878             
    7979            var file_json = my.media_frame.state().get('selection').first().toJSON(), 
    80                 file_thumb = ""; 
     80                file_thumb = "", 
     81                thumb_url = ""; 
    8182 
    8283            if (file_json.type === "image") { 
    83                 var thumb_url = ""; 
    84                 if (file_json.sizes.thumbnail && file_json.sizes.thumbnail.url) { 
    85                     thumb_url = file_json.sizes.thumbnail.url; 
    86                 } else { 
    87                     thumb_url = file_json.sizes.full.url; 
     84         
     85                if (file_json.sizes) { 
     86 
     87                    // get thumbnail for image. in rare cases thumbs are missing and then fallback to full size 
     88                    if (file_json.sizes.thumbnail && file_json.sizes.thumbnail.url) { 
     89                        thumb_url = file_json.sizes.thumbnail.url; 
     90                    } else if (file_json.sizes.full && file_json.sizes.full.url) { 
     91                        thumb_url = file_json.sizes.full.url; 
     92                    } 
     93                 
     94                } else if (file_json.url) { 
     95 
     96                    thumb_url = file_json.url; 
     97 
    8898                } 
     99            } 
     100 
     101            if ( ! thumb_url && file_json.icon) { 
     102                     
     103                thumb_url = file_json.icon; 
     104 
     105            } 
     106 
     107            if (thumb_url) { 
    89108                file_thumb = "<img src='" + thumb_url + "' alt='' />"; 
    90             } else { 
    91                 file_thumb = "<img src='" + file_json.icon + "' alt='' />"; 
    92109            } 
     110 
    93111            container_div.find(".simple-fields-metabox-field-file-selected-image").html( file_thumb ); 
    94112 
  • simple-fields/trunk/simple_fields.php

    r749179 r802729  
    44Plugin URI: http://simple-fields.com 
    55Description: Add groups of textareas, input-fields, dropdowns, radiobuttons, checkboxes and files to your edit post screen. 
    6 Version: 1.4.2 
     6Version: 1.4.3 
    77Author: Pär Thernström 
    88Author URI: http://eskapism.se/ 
     
    5757    function init() { 
    5858 
    59  
    6059        define( "SIMPLE_FIELDS_VERSION", "1.4.2"); 
    6160        define( "SIMPLE_FIELDS_URL", plugins_url(basename(dirname(__FILE__))). "/"); 
     61 
    6262        define( "SIMPLE_FIELDS_NAME", "Simple Fields"); 
    6363 
     
    367367     * Get maybe translated string 
    368368     * If WPML is installed and activated then icl_t() is used on the string 
    369      * If WPML is not instaled, then it's just returned unmodified 
     369     * If WPML is not installed, then it's just returned unmodified 
    370370     * 
    371371     * @param string $name Name to use in icl_t 
     
    724724        } 
    725725     
     726 
    726727        // verify if this is an auto save routine. If it is our form has not been submitted, so we dont want to do anything 
    727728        if ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) { return $post_id; } 
    728729 
     730        // why dont' we want to save revisions? i'll do that from now on, let's se what happens 
    729731        // dont's save if is revision 
    730         if (wp_is_post_revision($post_id) !== FALSE) return $post_id; 
    731          
     732        // preview is a revison? should save then so preview with fields work 
     733        // if (wp_is_post_revision($post_id) !== FALSE) return $post_id; 
     734 
    732735        // attach post connector 
    733736        // only save if being found in post variable, beacuse it may not exist if meta box is hidden/not outputted on page 
     
    13641367                                        // We need to call _buttonsInit to make quicktags buttons appear/work, but it's private. however calling addButtons calls _buttonsInit 
    13651368                                        // so we fake-add a button, just to fire _buttonsInit again. 
    1366                                         QTags.addButton( 'simple_fields_dummy_button', '...', '<br />', null, null, null, null, "apa" ); 
     1369                                        // @todo: If editor does not exist in post then QTags does not exist at all. 
     1370                                        //        Quick fix: only add if QTags exists. Better fix: always load editor even if it's not t be shown? Hide it with JS/CSS? Load editor scripts? 
     1371                                        if (window.QTags) { 
     1372                                            QTags.addButton( 'simple_fields_dummy_button', '...', '<br />', null, null, null, null, "apa" ); 
     1373                                        } 
    13671374                                    </script> 
    13681375                                    <?php 
     
    17841791        } 
    17851792 
     1793        // Start div that will contain fieldgroup and fields in the edit post screen 
    17861794        echo "<div class='simple-fields-meta-box-field-group-wrapper $num_added_field_groups_css $field_group_slug_css $field_group_wrapper_css'>"; 
    17871795        echo "<input type='hidden' name='simple-fields-meta-box-field-group-id' value='$post_connector_field_id' />"; 
    1788       
     1796         
     1797        // Show edit link if debug is enabled 
     1798        if ( defined("WP_DEBUG") && WP_DEBUG ) { 
     1799            printf( 
     1800                '<div class="sf-meta-box-edit-field-group"><a href="%1$s">%2$s</a></div>', 
     1801                admin_url( "options-general.php?page=simple-fields-options&action=edit-field-group&group-id=" . $current_field_group["id"] ), 
     1802                __('Edit Field Group', 'simple-fields') 
     1803            ); 
     1804        } 
     1805 
    17891806        // show description 
    17901807        if ( ! empty($current_field_group["description"]) ) { 
     
    20412058                    if ( ! $one_field["deleted"] ) $num_active_fields++; 
    20422059 
     2060                    // Make sure all props are set 
     2061                    if ( ! isset( $one_field["slug"] ) ) $one_field["slug"] = ""; 
     2062 
    20432063                    $one_field["meta_key"] = $this->get_meta_key( $field_groups[$i]["id"], $one_field["id"], null, $field_groups[$i]["slug"], $one_field["slug"] ); 
    20442064 
     
    22212241        } 
    22222242 
     2243        // Show link to edit post connector 
     2244        if ( defined("WP_DEBUG") && WP_DEBUG &&  "__none__" !== $connector_selected && "__inherit__" !== $connector_selected ) { 
     2245            printf( 
     2246                '<div class="sf-post-edit-side-field-edit-post-connector"><a href="%2$s">%1$s</a></div>', 
     2247                __('Edit Post Connector', 'simple-fields'), 
     2248                admin_url( "options-general.php?page=simple-fields-options&action=edit-post-connector&connector-id=" . $connector_selected ) 
     2249            ); 
     2250        } 
     2251 
    22232252        ?> 
    2224         <div class="inside"> 
     2253        <!-- <div class="inside"> --> 
    22252254 
    22262255            <?php 
     
    22382267 
    22392268                // dropdown with post connectors ?> 
    2240                 <div> 
     2269                <p> 
    22412270                    <select name="simple_fields_selected_connector" id="simple-fields-post-edit-side-field-settings-select-connector"> 
    22422271                        <option <?php echo ($saved_connector_to_use == "__none__") ? " selected='selected' " : "" ?> value="__none__"><?php _e('None', 'simple-fields') ?></option> 
     
    22512280                        <?php endforeach; ?> 
    22522281                    </select> 
    2253                 </div> 
     2282                </p> 
    22542283                <?php 
    22552284 
     
    22722301                <p><a href="#" id="simple-fields-post-edit-side-field-settings-show-keys"><?php _e('Show custom field keys', 'simple-fields') ?></a></p> 
    22732302            </div> 
    2274         </div> 
     2303         
     2304        <!-- </div> --> 
     2305 
    22752306        <?php 
    22762307    } // function  
     
    38233854        $cache_key = 'simple_fields_'.$this->ns_key.'_get_field_group_by_slug_deleted_' . (int) $include_deleted . "_" . $field_group_slug; 
    38243855        $return_val = wp_cache_get( $cache_key, 'simple_fields' ); 
    3825          
     3856 
    38263857        if (FALSE === $return_val) { 
    38273858 
  • simple-fields/trunk/styles-edit-post.css

    r689943 r802729  
    540540    width: 10%; 
    541541} 
     542 
     543/* edit link for field group shown in edit post screen */ 
     544.sf-meta-box-edit-field-group { 
     545    position: absolute; 
     546    top: -3em; 
     547    right: 2em; 
     548    display: none; 
     549} 
     550.sf-meta-box-edit-field-group a { 
     551    font-size: 11px; 
     552} 
     553.postbox-container:hover .sf-meta-box-edit-field-group { 
     554    display: block; 
     555} 
     556 
     557/* edit link for post connetor shown in edit post screen */ 
     558.sf-post-edit-side-field-edit-post-connector { 
     559    position: absolute; 
     560    top: -2.9em; 
     561    right: 2em; 
     562    display: none; 
     563} 
     564 
     565.sf-post-edit-side-field-edit-post-connector a { 
     566    font-size: 11px; 
     567} 
     568 
     569.postbox:hover .sf-post-edit-side-field-edit-post-connector { 
     570    display: block; 
     571} 
  • simple-fields/trunk/tests/SimpleFieldsTests/SimpleFieldsTest.php

    r740248 r802729  
    5252 
    5353    function testInsertManuallyAddedFields() { 
    54         _insert_manually_added_fields(); 
    5554    }    
    5655 
     
    5857    function testManuallyAddedFields() 
    5958    { 
     59        _insert_manually_added_fields(); 
    6060 
    6161        $post_id = 11; 
  • simple-fields/trunk/tests/bootstrap.php

    r611160 r802729  
    11<?php 
    2 // Load WordPress test environment 
    3 // https://github.com/nb/wordpress-tests 
    4 // 
    5 // The path to wordpress-tests 
    6 $path = '/var/www/unit-test.simple-fields.com/wordpress-tests/bootstrap.php'; 
    72 
    8 if( file_exists( $path ) ) { 
    9     require_once $path; 
    10 } else { 
    11     exit( "Couldn't find path to wordpress-tests/bootstrap.php\n" ); 
     3#echo "WP_TESTS_DIR is: " . getenv( 'WP_TESTS_DIR' ); 
     4#phpinfo();exit; 
     5 
     6require_once getenv( 'WP_TESTS_DIR' ) . '/includes/functions.php'; 
     7 
     8function _manually_load_plugin() { 
     9    require dirname( __FILE__ ) . '/../simple_fields.php'; 
     10} 
     11tests_add_filter( 'muplugins_loaded', '_manually_load_plugin' ); 
     12 
     13require getenv( 'WP_TESTS_DIR' ) . '/includes/bootstrap.php'; 
     14 
     15 
     16class SimpleFields_TestCase extends WP_UnitTestCase { 
     17     
     18    public static $sf = null; 
     19     
     20    public static function setUpBeforeClass() { 
     21 
     22        self::$sf = $GLOBALS['sf']; 
     23 
     24    } 
     25 
     26    /* 
     27    function plugin() { 
     28        return CWS_PageLinksTo::$instance; 
     29    } 
     30    */ 
     31 
    1232} 
    1333 
Note: See TracChangeset for help on using the changeset viewer.