Plugin Directory

Changeset 985670


Ignore:
Timestamp:
09/09/2014 07:47:28 PM (12 years ago)
Author:
AlphaGolf_fr
Message:

Update the trunk with 0.31.1

Location:
wp-symposium-toolbar/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • wp-symposium-toolbar/trunk/js/wp-symposium-toolbar_preview.js

    r981850 r985670  
    7070    var wpstIconHoverEmptyColor = "#2ea2cc";
    7171    var wpstIconHoverEmptyColorRgb = "rgb( 46, 162, 204 )";
    72     // var wpstFontShadowHoriz = "0";
    73     // var wpstFontShadowVert = "0";
    7472   
    7573    var wpstMenuShadowVertical = "3px ";
  • wp-symposium-toolbar/trunk/readme.txt

    r981864 r985670  
    99Tested up to: 4.0
    1010Stable tag: 0.31.0
    11 Version: 0.31.0
     11Version: 0.31.1
    1212License: GPLv2 or later
    1313License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    141141
    142142== Changelog ==
     143
     144= 0.32.0. =
     145
     146* Bugfix: Custom Menus no longer picking fonticons
    143147
    144148= 0.31.0. =
  • wp-symposium-toolbar/trunk/wp-symposium-toolbar.php

    r981864 r985670  
    1111Tested up to: 4.0
    1212Stable tag: 0.31.0
    13 Version: 0.31.0
     13Version: 0.31.1
    1414License: GPLv2 or later
    1515License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    2222   
    2323// Increase Build nr at each version
    24 define( "WPST_BUILD_NR", 3100 );
     24define( "WPST_BUILD_NR", 3101 );
    2525
    2626
     
    335335
    336336// Add meta to frontend pages header
    337 add_action( 'wp_head', 'symposium_toolbar_add_meta', 0 );
     337// add_action( 'wp_head', 'symposium_toolbar_add_meta', 0 );
    338338
    339339// Toolbar styles callback
  • wp-symposium-toolbar/trunk/wp-symposium-toolbar_admin.php

    r981850 r985670  
    12141214                    if ( get_option( 'wpst_share_content', 'home' ) == "current" ) echo " CHECKED";
    12151215                    echo $style;
    1216                     echo '> <span class="description wpst-checkbox"> ' . __( 'The current page, whichever it is', 'wp-symposium-toolbar' ) . '</span><br /><br />';
     1216                    echo '> <span class="description wpst-checkbox"> ' . __( 'The current page, whichever it is', 'wp-symposium-toolbar' ) . '</span><br />';
    12171217                   
    12181218                    // Meta
     1219/*                  echo '<br />';
    12191220                    echo '<input type="checkbox" name="shared_content_meta" id="shared_content_meta" class="wpst-admin';
    1220                     if ( get_option( 'wpst_share_content_meta', 'on' ) == "on" )
     1221                    if ( get_option( 'wpst_share_content_meta', '' ) == "on" )
    12211222                        echo '" CHECKED';
    12221223                    else {
     
    12281229                    }
    12291230                    echo '/><span> ' . __( 'Add metadata to site pages header', 'wp-symposium-toolbar' ) . '</span><br />';
    1230                     echo '<span class="description"> ' . __( 'Note: your theme or another plugin might already do that', 'wp-symposium-toolbar' ) . '</span><br />';
     1231                    echo '<span class="description"> ' . __( 'Note: this will add Open Graph and Twitter cards to your site header, helping populate the "sharer" window with page content - your theme or another plugin might already do that', 'wp-symposium-toolbar' ) . '</span><br /><br />';
     1232                   
     1233                    echo '<span>' . __( 'URL of the image to be used as metadata', 'wp-symposium-toolbar' ) . '</span><br />';
     1234                    echo '<input type="text" name="shared_content_image_link" id="shared_content_image_link" value="'.get_option( 'wpst_share_content_image_link', '' ).'" class="wpst-admin" /><br />';
     1235                    echo '<span class="description"> ' . __( 'Note: other data will be gathered from the WordPress General page settings', 'wp-symposium-toolbar' ) . '</span><br />';
     1236 */
    12311237                echo '</td>';
    12321238            echo '</tr>';
     
    12551261                    echo '> <span class="description wpst-checkbox"> ' . __( 'Plain Circles', 'wp-symposium-toolbar' ) . '</span><br />';
    12561262                   
    1257                     echo '<input type="radio" name="icons_set" class="wpst-admin" value="ring"';
    1258                     if ( get_option( 'wpst_share_icons_set', 'lightweight' ) == "ring" ) echo " CHECKED";
    1259                     echo $style;
    1260                     echo '> <span class="description wpst-checkbox"> ' . __( 'Rings', 'wp-symposium-toolbar' ) . '</span><br />';
    1261                    
    1262                     echo '<input type="radio" name="icons_set" class="wpst-admin" value="elegant"';
    1263                     if ( get_option( 'wpst_share_icons_set', 'lightweight' ) == "elegant" ) echo " CHECKED";
    1264                     echo $style;
    1265                     echo '> <span class="description wpst-checkbox"> ' . __( 'Elegant Lines', 'wp-symposium-toolbar' ) . '</span><br /><br />';
     1263                    // echo '<input type="radio" name="icons_set" class="wpst-admin" value="ring"';
     1264                    // if ( get_option( 'wpst_share_icons_set', 'lightweight' ) == "ring" ) echo " CHECKED";
     1265                    // echo $style;
     1266                    // echo '> <span class="description wpst-checkbox"> ' . __( 'Rings', 'wp-symposium-toolbar' ) . '</span><br />';
     1267                   
     1268                    // echo '<input type="radio" name="icons_set" class="wpst-admin" value="elegant"';
     1269                    // if ( get_option( 'wpst_share_icons_set', 'lightweight' ) == "elegant" ) echo " CHECKED";
     1270                    // echo $style;
     1271                    // echo '> <span class="description wpst-checkbox"> ' . __( 'Elegant Lines', 'wp-symposium-toolbar' ) . '</span><br />';
     1272                    echo '<br />';
    12661273           
    12671274                    echo '<span>' . __( 'Where should they be displayed?', 'wp-symposium-toolbar' ) . '</span><br />';
  • wp-symposium-toolbar/trunk/wp-symposium-toolbar_admin_functions.php

    r981850 r985670  
    632632                            if ( strstr( $display_custom_menu_icon, 'content: ' ) ) {
    633633                                $menu_icon = stripslashes( $display_custom_menu_icon );
    634                                 $all_custom_icons .= '#wpadminbar li.wpst-custom-icon-'.$key.' > .ab-item:before { font-family: dashicons !important; '.str_replace( ': "', ': "\\', $menu_icon ).' display: block; } ';
     634                                if ( !empty( $menu_icon ) ) $all_custom_icons .= '#wpadminbar li.wpst-custom-icon-'.$key.' > .ab-item:before { font-family: dashicons !important; '.str_replace( ': "', ': "\\', $menu_icon ).'; display: block; } ';
    635635                            } elseif ( filter_var( $display_custom_menu_icon, FILTER_VALIDATE_URL ) ) {
    636636                                $menu_icon = $display_custom_menu_icon;
     
    662662                    if ( strstr( $display_custom_menu_icon, 'content: ' ) ) {
    663663                        $menu_icon = stripslashes( $display_custom_menu_icon );
    664                         $all_custom_icons .= '#wpadminbar li.wpst-custom-icon-'.$key.' > .ab-item:before { font-family: dashicons !important; '.str_replace( ': "', ': "\\', $menu_icon ).' display: block; } ';
     664                        if ( !empty( $menu_icon ) ) $all_custom_icons .= '#wpadminbar li.wpst-custom-icon-'.$key.' > .ab-item:before { font-family: dashicons !important; '.str_replace( ': "', ': "\\', $menu_icon ).'; display: block; } ';
    665665                    } elseif ( filter_var( $display_custom_menu_icon, FILTER_VALIDATE_URL ) ) {
    666666                        $menu_icon = $display_custom_menu_icon;
     
    705705            if ( $_POST["symposium_toolbar_view"] == 'share' ) {
    706706               
     707                // Share / Subscribe
    707708                $share = array();
    708709                $share['linkedin'] = isset( $_POST["share_linkedin"] ) ? 'on' : '';
     
    717718                update_option( 'wpst_share_icons', $share );
    718719               
     720                // Shared Content
    719721                update_option( 'wpst_share_content', isset( $_POST["shared_content"] ) ? $_POST["shared_content"] : '' );
     722                update_option( 'wpst_share_content_meta', isset( $_POST["shared_content_meta"] ) ? 'on' : '' );
     723                if ( $_POST['shared_content_image_link'] == filter_var( $_POST['shared_content_image_link'], FILTER_VALIDATE_URL ) ) {
     724                    $content_image_link_arr = parse_url( $_POST['shared_content_image_link'] );
     725                    $host = ( is_multisite() ) ? network_site_url() : site_url();
     726                    if ( isset( $content_image_link_arr['host'] ) && strstr( $host, $content_image_link_arr['host'] ) )
     727                        update_option( 'wpst_share_content_image_link', $_POST['shared_content_image_link'] );
     728                    else
     729                        $wpst_errors .= __( 'Shared Content', 'wp-symposium-toolbar' ).' - '.__( 'meta image', 'wp-symposium-toolbar' ).': '.__( 'local URL expected', 'wp-symposium-toolbar' ).'<br />';
     730                } else
     731                    $wpst_errors .= __( 'Shared Content', 'wp-symposium-toolbar' ).' - '.__( 'meta image', 'wp-symposium-toolbar' ).': '.__( 'valid URL expected', 'wp-symposium-toolbar' ).'<br />';
     732               
     733                // Icons
    720734                update_option( 'wpst_share_icons_set', isset( $_POST["icons_set"] ) ? $_POST["icons_set"] : 'lightweight' );
    721735                update_option( 'wpst_share_icons_position', isset( $_POST["icons_position"] ) ? $_POST["icons_position"] : '' );
     
    15341548                                    if ( $valid_menu_slug && $valid_location ) {
    15351549                                        $all_custom_menus[] = $custom_menu;
    1536                                         $all_custom_icons .= '#wpadminbar li.wpst-custom-icon-'.$key.' > .ab-item:before { font-family: dashicons !important; '.str_replace( ': "', ': "\\', $custom_menu[3] ).' display: block; } ';
     1550                                        if ( isset( $custom_menu[3] ) ) if ( is_string( $custom_menu[3] ) && !empty( $custom_menu[3] ) )  $all_custom_icons .= '#wpadminbar li.wpst-custom-icon-'.$key.' > .ab-item:before { font-family: dashicons !important; '.str_replace( ': "', ': "\\', $custom_menu[3] ).'; display: block; } ';
    15371551                                    }
    15381552                                    $key = $key + 1;
  • wp-symposium-toolbar/trunk/wp-symposium-toolbar_functions.php

    r981850 r985670  
    282282 * Add metadata to the WP header
    283283 *
    284  * @since 0.31.0
     284 * @since 0.32.0
    285285 *
    286286 * @param  none
     
    289289function symposium_toolbar_add_meta() {
    290290   
    291     $image_url = 'http://emmi91.fr/ressources/headers/emmi91_rond.jpg';
     291    if ( get_option( 'wpst_share_content_meta', '' ) != "on" )
     292        exit;
     293   
     294    $image_url = urlencode( get_option( 'wpst_share_content_image_link', '' ) );
    292295   
    293296    // Open Graph tags
     
    296299    echo '<meta property="og:description" content="'.get_bloginfo('description').'"/>';
    297300    echo '<meta property="og:url" content="'.get_bloginfo('url').'"/>';
    298     echo '<meta property="og:image" content="'.$image_url.'"/>';
     301    if ( $image_url != '' ) echo '<meta property="og:image" content="'.$image_url.'"/>';
    299302   
    300303    // Twitter cards
     
    302305    echo '<meta property="twitter:description" content="'.get_bloginfo('description').'"/>';
    303306    echo '<meta property="twitter:url" content="'.get_bloginfo('url').'"/>';
    304     echo '<meta property="twitter:image" content="'.$image_url.'"/>';
     307    if ( $image_url != '' ) echo '<meta property="twitter:image" content="'.$image_url.'"/>';
    305308}
    306309
Note: See TracChangeset for help on using the changeset viewer.