WordPress.org

Plugin Directory

Changeset 719617


Ignore:
Timestamp:
05/28/13 21:57:31 (11 months ago)
Author:
joedolson
Message:

New language (Dutch), new features.

Location:
my-content-management/trunk
Files:
4 added
7 edited

Legend:

Unmodified
Added
Removed
  • my-content-management/trunk/js/jquery.addfields.js

    r657057 r719617  
    1010        // enable the "remove" button 
    1111        $('.del_field').removeAttr('disabled'); 
    12         // business rule: you can only add 10 occurrences 
    13         if (newNum == 10) 
     12        // business rule: you can only add 16 occurrences 
     13        if (newNum == 16) 
    1414            $('.add_field').attr('disabled','disabled'); 
    1515    }); 
     
    2525    }); 
    2626    $('.del_field').attr('disabled','disabled'); 
     27     
     28    $(".up,.down").click(function(e){ 
     29        e.preventDefault(); 
     30        $('#mcm-settings input[type=checkbox]').attr('disabled',true); 
     31        var row = $(this).parents("tr:first"); 
     32        if ($(this).is(".up")) { 
     33            row.insertBefore(row.prev()); 
     34        } else { 
     35            row.insertAfter(row.next()); 
     36        } 
     37    }); 
    2738}); 
  • my-content-management/trunk/mcm-custom-posts.php

    r684626 r719617  
    11<?php 
     2if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly 
     3 
    24global $mcm_types,$mcm_fields,$mcm_extras,$mcm_enabled,$mcm_templates, 
    35$default_mcm_types,$default_mcm_fields,$default_mcm_extras; 
     
    204206    $args[4] = $type; 
    205207    // adjust data 
    206     $args[2] = get_post_meta($post->ID, $args[0], true); 
     208    $args[2] = esc_attr( get_post_meta($post->ID, $args[0], true) ); 
    207209    $args[1] = __($args[1], 'sp' ); 
    208210    $label_format = 
     
    244246    $fields = $mcm_fields; 
    245247 
    246     // verify this came from the our screen and with proper authorization, 
     248    // verify this came from our screen and with proper authorization, 
    247249    // because save_post can be triggered at other times 
    248250    if ( isset( $_POST['mcm_nonce_name'] ) ) { 
     
    275277                        $title      = ($ext !== false) ? substr($title, 0, -strlen($ext)) : $title; 
    276278                        $attachment = array( 
    277                             'post_mime_type'    => $wp_filetype['type'], 
     279                            'post_mime_type'    => $filetype['type'], 
    278280                            'post_title'        => addslashes($title), 
    279281                            'post_content'      => '', 
     
    290292        // Let's cycle through the $my_data array! 
    291293        foreach ($my_data as $key => $value) { 
    292             if ( 'revision' == $post->post_type  ) { 
    293                 // don't store custom data twice 
     294            if ( 'revision' == $post->post_type  ) { // don't store custom data twice 
    294295                return; 
    295296            } 
  • my-content-management/trunk/mcm-styles.css

    r657057 r719617  
    1 .mcm-settings legend { font-weight: 700; font-size: 1.1em;} 
     1.mcm-settings legend { font-weight: 700; f ont-size: 1.1em;} 
    22.wrappers { width: 16em; float: left; padding-top: 1em; } 
    33.wrappers label { display: block; float: left; width: 7em; padding: 5px 0 0;} 
     
    1313.mcm-settings td label { position: absolute; left: -999em; }  
    1414.mcm-settings td input { width: 100%; } 
     15.mcm-settings .up span, .mcm-settings .down span { position: absolute; left: -999em; } 
     16.mcm-settings .up { background: url(/wp-content/plugins/my-content-management/images/up.png); width: 24px; height: 24px; display: inline-block; } 
     17.mcm-settings .down { background: url(/wp-content/plugins/my-content-management/images/down.png); width: 24px; height: 24px; display: inline-block; } 
     18.mcm-settings td a { opacity: .5; } 
     19.mcm-settings td a:hover, .mcm-settings td a:focus { opacity: 1; } 
  • my-content-management/trunk/mcm-view-custom-posts.php

    r684626 r719617  
    1515@operator = IN, NOT IN, or AND 
    1616*/ 
     17if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly 
    1718 
    1819function mcm_get_single_post( $type, $id ) { 
     
    137138            add_filter('the_content','mcm_replace_content'); 
    138139            $p['content_raw'] = get_the_content(); 
    139             $p['thumbnail'] = get_the_post_thumbnail( $id, 'thumbnail', array( 'class'=>'mcm_thumbnail', 'alt'=>trim( strip_tags( get_the_title( $id ) ) ), 'title'=>'' ) ); 
    140             $p['medium'] = get_the_post_thumbnail( $id, 'medium', array( 'class'=>'mcm_medium', 'alt'=>trim( strip_tags( get_the_title( $id ) ) ), 'title'=>'' ) ); 
    141             $p['large'] = get_the_post_thumbnail( $id, 'large', array( 'class'=>'mcm_large', 'alt'=>trim( strip_tags( get_the_title( $id ) ) ), 'title'=>'' ) ); 
     140            $sizes = get_intermediate_image_sizes(); 
     141            foreach ( $sizes as $size ) { 
     142                $p[$size] = get_the_post_thumbnail( get_the_ID(), $size, array( 'class'=>'', 'alt'=>trim( strip_tags( get_the_title() ) ), 'title'=>'' ) ); 
     143            } 
    142144            $p['full'] = get_the_post_thumbnail( $id, 'full', array( 'class'=>'mcm_large', 'alt'=>trim( strip_tags( get_the_title( $id ) ) ), 'title'=>'' ) ); 
    143145            $p['shortlink'] = wp_get_shortlink(); 
     
    191193            add_filter('the_content','mcm_replace_content'); 
    192194            $p['content_raw'] = $the_post->post_content; 
    193             $p['thumbnail'] = get_the_post_thumbnail( $the_post->ID, 'thumbnail', array( 'class'=>'', 'alt'=>trim( strip_tags( get_the_title() ) ), 'title'=>'' ) ); 
    194             $p['medium'] = get_the_post_thumbnail( $the_post->ID, 'medium', array( 'class'=>'', 'alt'=>trim( strip_tags( get_the_title() ) ), 'title'=>'' ) ); 
    195             $p['large'] = get_the_post_thumbnail( $the_post->ID, 'large', array( 'class'=>'', 'alt'=>trim( strip_tags( get_the_title() ) ), 'title'=>'' ) ); 
     195            $sizes = get_intermediate_image_sizes(); 
     196            foreach ( $sizes as $size ) { 
     197                $p[$size] = get_the_post_thumbnail( $the_post->ID, $size, array( 'class'=>'', 'alt'=>trim( strip_tags( get_the_title() ) ), 'title'=>'' ) ); 
     198            } 
    196199            $p['full'] = get_the_post_thumbnail( $the_post->ID, 'full', array( 'class'=>'', 'alt'=>trim( strip_tags( get_the_title() ) ), 'title'=>'' ) ); 
    197200            $p['permalink'] = get_permalink( $the_post->ID ); 
  • my-content-management/trunk/mcm-widgets.php

    r684626 r719617  
    11<?php 
     2if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly 
    23 
    34add_action( 'widgets_init', create_function('', 'return register_widget("mcm_search_widget");') ); 
  • my-content-management/trunk/my-content-management.php

    r684626 r719617  
    66Author: Joseph C Dolson 
    77Author URI: http://www.joedolson.com 
    8 Version: 1.3.3 
     8Version: 1.3.4 
    99*/ 
    1010/*  Copyright 2011-2012  Joe Dolson (email : joe@joedolson.com) 
     
    2424    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA 
    2525*/ 
    26 $mcm_version = '1.3.3'; 
     26if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly 
     27 
     28$mcm_version = '1.3.4'; 
    2729// Enable internationalisation 
    2830load_plugin_textdomain( 'my-content-management',false, dirname( plugin_basename( __FILE__ ) ) . '/lang' );  
     
    8688                'custom' => false 
    8789            ), $atts)); 
     90            if ( isset( $_GET['mcm'] ) && isset( $_GET['mcm_value'] ) ) { 
     91                ${$_GET['mcm']} = sanitize_text_field($_GET['mcm_value']); 
     92            } 
    8893    return mcm_get_show_posts( $type, $display, $taxonomy, $term, $count, $order, $direction, $meta_key, $template, $cache, $offset, $id, $custom_wrapper, $custom, $operator, $year, $month, $week, $day ); 
    8994} 
     
    321326Language: $language 
    322327Charset: $charset 
     328Admin Email: $current_user->user_email 
    323329 
    324330==Extra info:== 
     
    478484            <dd><?php _e('Post content (unmodified)','my-content-management'); ?></dd> 
    479485 
    480             <dt><code>{thumbnail}</code></dt> 
    481             <dd><?php _e('Featured image as thumbnail.','my-content-management'); ?></dd> 
    482  
    483             <dt><code>{medium}</code></dt> 
    484             <dd><?php _e('Featured image at medium size.','my-content-management'); ?></dd> 
    485  
    486             <dt><code>{large}</code></dt> 
    487             <dd><?php _e('Featured image at large size.','my-content-management'); ?></dd> 
    488  
    489486            <dt><code>{full}</code></dt> 
    490487            <dd><?php _e('Featured image at original size.','my-content-management'); ?></dd> 
    491488 
     489            <?php 
     490                $sizes = get_intermediate_image_sizes(); 
     491                foreach ( $sizes as $size ) { 
     492                    echo '  <dt><code>{'.$size.'}</code></dt> 
     493                            <dd>'.sprintf( __('Featured image at %s size','my-content-management'),$size ).'</dd>'; 
     494                } 
     495            ?> 
     496             
    492497            <dt><code>{permalink}</code></dt> 
    493498            <dd><?php _e('Permalink URL for post','my-content-management'); ?></dd> 
     
    868873        <p> 
    869874        <a href="https://twitter.com/intent/tweet?screen_name=joedolson&text=My%20Content%20Management%20is%20awesome!" class="twitter-mention-button" data-size="large" data-related="joedolson">Tweet to @joedolson</a> 
    870         <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> 
     875        <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> 
    871876        </p>         
    872877        <ul> 
     
    10501055    } 
    10511056     
    1052     $form = $fieldset_title.'<table class="widefat"><thead><tr><th scope="col">'.__('Field Label','my-content-management').'</th><th scope="col">'.__('Input Type','my-content-management').'</th><th scope="col">Description/Options</th><th  scope="col">'.__('Delete','my-content-management').'</th></tr></thead><tbody>'; 
     1057    $form = $fieldset_title.'<table class="widefat"><thead><tr><th scope="col">'.__('Move','my-content-management').'</th><th scope="col">'.__('Field Label','my-content-management').'</th><th scope="col">'.__('Input Type','my-content-management').'</th><th scope="col">Description/Options</th><th  scope="col">'.__('Delete','my-content-management').'</th></tr></thead><tbody>'; 
    10531058    $odd = 'odd';  
    10541059    if ( isset( $option['fields'][$fieldset] ) ) { 
     
    10801085            } 
    10811086            if ( $value[3] == 'select' ) { $labeled = __("Options",'my-content-management'); } else { $labeled = __("Additional Text",'my-content-management'); } 
     1087            /* 
    10821088        $form .= " 
    10831089        <tr class='mcm_custom_fields_form $odd'> 
     1090            <td> 
     1091                <a href='#' class='up'><span>Move Up</span></a> / <a href='#' class='down'><span>Move Down</span></a> 
     1092            </td>        
    10841093            <td> 
    10851094                <input type='hidden' name='mcm_field_key[$key]'  value='$value[0]' /> 
     
    10991108            </td> 
    11001109        </tr>"; 
     1110        */ 
     1111        $form .= " 
     1112        <tr class='mcm_custom_fields_form $odd'> 
     1113            <td> 
     1114                <a href='#' class='up'><span>Move Up</span></a> <a href='#' class='down'><span>Move Down</span></a> 
     1115            </td>        
     1116            <td> 
     1117                <input type='hidden' name='mcm_field_key[]'  value='$value[0]' /> 
     1118                <label for='mcm_field_label$key'>".__('Label','my-content-management')."</label> <input type='text' name='mcm_field_label[]' id='mcm_field_label$key' value='".esc_attr(stripslashes($value[1]))."' /><br /><small>{<code>$value[0]</code>}</small> 
     1119            </td> 
     1120            <td> 
     1121                <label for='mcm_field_type$key'>".__('Type','my-content-management')."</label>  
     1122                    <select name='mcm_field_type[]' id='mcm_field_type$key'> 
     1123                    $field_type_select 
     1124                    </select> 
     1125            </td> 
     1126            <td> 
     1127                <label for='mcm_field_options$key'>$labeled</label> <input type='text' name='mcm_field_options[]' id='mcm_field_options$key' value='$choices' /> 
     1128            </td> 
     1129            <td> 
     1130                <label for='mcm_field_delete$key'>".__('Delete','my-content-management')."</label> <input type='checkbox' name='mcm_field_delete[$key]' id='mcm_field_delete$key' value='delete' /> 
     1131            </td> 
     1132        </tr>";      
    11011133        $odd = ( $odd == 'odd' ) ? 'even' : 'odd'; 
    11021134        } 
     
    11101142    $form .= " 
    11111143    <tr class='mcm_custom_fields_form clonedInput' id='field1'> 
     1144        <td></td> 
    11121145        <td> 
    11131146            <input type='hidden' name='mcm_field_key[]'  value='' /> 
     
    11231156            <label for='mcm_field_options'>".__('Options/Additional Text','my-content-management')."</label> <input type='text' name='mcm_field_options[]' id='mcm_field_options' value='' /> 
    11241157        </td> 
    1125         <td> 
    1126         </td> 
     1158        <td></td> 
    11271159    </tr>";  
    11281160    $form .= '</tbody></table>'; 
  • my-content-management/trunk/readme.txt

    r684626 r719617  
    5454 
    5555Available languages (in order of completeness): 
    56 Irish, Spanish 
     56Irish, Spanish, Dutch 
    5757 
    5858Visit the [My Content Management translations site](http://translate.joedolson.com/projects/my-content-management/) to check how complete a translation is. 
     
    6060Translating my plug-ins is always appreciated. Visit <a href="http://translate.joedolson.com">my translations site</a> to start getting your language into shape! 
    6161 
    62 Translator Credits (in no particular order)*: 
    63  
    64 [Ale Gonzalez](http://60rpm.tv/i), [Outshine Solutions](http://outshinesolutions.com), [Jakob Smith](http://www.omkalfatring.dk/),, [globus2008](http://wordpress.org/support/profile/globus2008), Frederic Escallier, Luud Heck, Wim Strijbos, [Daisuke Abe](http://www.alter-ego.jp/), [Alex](http://blog.sotvoril.ru/), Mehmet Ko&ccedil;ali, Uwe Jonas, Florian Edelmann, Efva Nyberg, [Sabir Musta](http://mustaphasabir.altervista.org), Massimo Sgobino, Leonardo Kfoury, Alexandre Carvalho, Amir Khalilnejad, [Aurelio De Rosa](http://www.audero.it/), Bayram Dede, Dani Locasati, Dario Nunez, Dirk Ginader, Evren Erten, Fl&aacute;vio Pereira, Francois-Xavier Benard, [Gianni Diurno](http://www.gidibao.net), Giksi, Heinz Ochsner,  Kazuyuki Kumai, Liam Boogar, Maks, Mano, Massimo Sgobino, Mohsen Aghaei, Oscar, [Rashid Niamat](http://niamatmediagroup.nl/), Stefan Wikstrom, Thomas Meyer, Vedar Ozdemir, [Vikas Arora](http://www.wiznicworld.com), [Miriam de Paula](http://wpmidia.com.br), [HostUCan](http://www.hostucan.com), [Alex Alexandrov](http://www.webhostingrating.com), [Alyona Lompar](http://www.webhostinggeeks.com), [David Gil P&eacute;rez](http://www.sohelet.com), [Burkov Boris](http://chernobog.ru), [Raivo Ratsep](http://raivoratsep.com), [Jibo](http://jibo.ro), [Rasmus Himmelstrup](http://seoanalyst.dk), [kndb](http://blog.layer8.sh/) 
    65  
    66 * Translators may not have contributed to this plug-in; but have contributed to my [translation repository](http://translate.joedolson.com). 
     62<a href="http://www.joedolson.com/articles/translator-credits/">Translator Credits</a> 
    6763 
    6864== Changelog == 
     65 
     66= 1.3.4 = 
     67 
     68* Bug fix: custom field values improperly escaped when editing posts. 
     69* Bug fix: missing mimetype for uploaded files 
     70* New feature: change the display order of custom fields when editing. 
     71* New feature: support for all defined featured image sizes. 
     72* New feature: support for passing GET variables to shortcodes. 
     73* New language: Dutch. 
    6974 
    7075= 1.3.3 = 
Note: See TracChangeset for help on using the changeset viewer.