Changeset 985670
- Timestamp:
- 09/09/2014 07:47:28 PM (12 years ago)
- Location:
- wp-symposium-toolbar/trunk
- Files:
-
- 6 edited
-
js/wp-symposium-toolbar_preview.js (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
wp-symposium-toolbar.php (modified) (3 diffs)
-
wp-symposium-toolbar_admin.php (modified) (3 diffs)
-
wp-symposium-toolbar_admin_functions.php (modified) (5 diffs)
-
wp-symposium-toolbar_functions.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-symposium-toolbar/trunk/js/wp-symposium-toolbar_preview.js
r981850 r985670 70 70 var wpstIconHoverEmptyColor = "#2ea2cc"; 71 71 var wpstIconHoverEmptyColorRgb = "rgb( 46, 162, 204 )"; 72 // var wpstFontShadowHoriz = "0";73 // var wpstFontShadowVert = "0";74 72 75 73 var wpstMenuShadowVertical = "3px "; -
wp-symposium-toolbar/trunk/readme.txt
r981864 r985670 9 9 Tested up to: 4.0 10 10 Stable tag: 0.31.0 11 Version: 0.31. 011 Version: 0.31.1 12 12 License: GPLv2 or later 13 13 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 141 141 142 142 == Changelog == 143 144 = 0.32.0. = 145 146 * Bugfix: Custom Menus no longer picking fonticons 143 147 144 148 = 0.31.0. = -
wp-symposium-toolbar/trunk/wp-symposium-toolbar.php
r981864 r985670 11 11 Tested up to: 4.0 12 12 Stable tag: 0.31.0 13 Version: 0.31. 013 Version: 0.31.1 14 14 License: GPLv2 or later 15 15 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 22 22 23 23 // Increase Build nr at each version 24 define( "WPST_BUILD_NR", 310 0);24 define( "WPST_BUILD_NR", 3101 ); 25 25 26 26 … … 335 335 336 336 // 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 ); 338 338 339 339 // Toolbar styles callback -
wp-symposium-toolbar/trunk/wp-symposium-toolbar_admin.php
r981850 r985670 1214 1214 if ( get_option( 'wpst_share_content', 'home' ) == "current" ) echo " CHECKED"; 1215 1215 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 />'; 1217 1217 1218 1218 // Meta 1219 /* echo '<br />'; 1219 1220 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" ) 1221 1222 echo '" CHECKED'; 1222 1223 else { … … 1228 1229 } 1229 1230 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 */ 1231 1237 echo '</td>'; 1232 1238 echo '</tr>'; … … 1255 1261 echo '> <span class="description wpst-checkbox"> ' . __( 'Plain Circles', 'wp-symposium-toolbar' ) . '</span><br />'; 1256 1262 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 />'; 1266 1273 1267 1274 echo '<span>' . __( 'Where should they be displayed?', 'wp-symposium-toolbar' ) . '</span><br />'; -
wp-symposium-toolbar/trunk/wp-symposium-toolbar_admin_functions.php
r981850 r985670 632 632 if ( strstr( $display_custom_menu_icon, 'content: ' ) ) { 633 633 $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; } '; 635 635 } elseif ( filter_var( $display_custom_menu_icon, FILTER_VALIDATE_URL ) ) { 636 636 $menu_icon = $display_custom_menu_icon; … … 662 662 if ( strstr( $display_custom_menu_icon, 'content: ' ) ) { 663 663 $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; } '; 665 665 } elseif ( filter_var( $display_custom_menu_icon, FILTER_VALIDATE_URL ) ) { 666 666 $menu_icon = $display_custom_menu_icon; … … 705 705 if ( $_POST["symposium_toolbar_view"] == 'share' ) { 706 706 707 // Share / Subscribe 707 708 $share = array(); 708 709 $share['linkedin'] = isset( $_POST["share_linkedin"] ) ? 'on' : ''; … … 717 718 update_option( 'wpst_share_icons', $share ); 718 719 720 // Shared Content 719 721 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 720 734 update_option( 'wpst_share_icons_set', isset( $_POST["icons_set"] ) ? $_POST["icons_set"] : 'lightweight' ); 721 735 update_option( 'wpst_share_icons_position', isset( $_POST["icons_position"] ) ? $_POST["icons_position"] : '' ); … … 1534 1548 if ( $valid_menu_slug && $valid_location ) { 1535 1549 $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; } '; 1537 1551 } 1538 1552 $key = $key + 1; -
wp-symposium-toolbar/trunk/wp-symposium-toolbar_functions.php
r981850 r985670 282 282 * Add metadata to the WP header 283 283 * 284 * @since 0.3 1.0284 * @since 0.32.0 285 285 * 286 286 * @param none … … 289 289 function symposium_toolbar_add_meta() { 290 290 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', '' ) ); 292 295 293 296 // Open Graph tags … … 296 299 echo '<meta property="og:description" content="'.get_bloginfo('description').'"/>'; 297 300 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.'"/>'; 299 302 300 303 // Twitter cards … … 302 305 echo '<meta property="twitter:description" content="'.get_bloginfo('description').'"/>'; 303 306 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.'"/>'; 305 308 } 306 309
Note: See TracChangeset
for help on using the changeset viewer.