Changeset 912911
- Timestamp:
- 05/12/2014 08:04:16 PM (12 years ago)
- Location:
- g-crossposting/trunk
- Files:
-
- 3 edited
-
admin.php (modified) (1 diff)
-
g-crossposting.php (modified) (3 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
g-crossposting/trunk/admin.php
r847162 r912911 191 191 192 192 // validate addcanonical setting 193 $new_input['addcanonical'] = trim($input['addcanonical']); 194 if (! g_crossposting_check_addcanonical($new_input['addcanonical'])) { 193 if (isset($input['addcanonical'])) { 194 $new_input['addcanonical'] = trim($input['addcanonical']); 195 if (! g_crossposting_check_addcanonical($new_input['addcanonical'])) { 196 $new_input['addcanonical'] = ''; 197 } 198 } else { 195 199 $new_input['addcanonical'] = ''; 196 200 } -
g-crossposting/trunk/g-crossposting.php
r912244 r912911 4 4 Plugin URI: http://wordpress.org/extend/plugins/g-crossposting/ 5 5 Description: Imports your public Google+ activities in your Wordpress blog. 6 Version: 1. 4.06 Version: 1.5.0 7 7 Author: Sebastian Stein 8 8 Author URI: http://sebstein.hpfsc.de/ … … 341 341 } 342 342 $post_content .= '<div class="g-crossposting-att">'; 343 $post_content .= "<div class=\"g-crossposting-att-title\"><p><a href=\"{$att_url}\" target=\"_blank\">{$att_title}</a></p></div>"; 343 344 if (isset($att_url) && isset($att_title)) { 345 $post_content .= "<div class=\"g-crossposting-att-title\"><p><a href=\"{$att_url}\" target=\"_blank\">{$att_title}</a></p></div>"; 346 } 344 347 345 348 if ($att_photo) { … … 358 361 359 362 360 // set title for post 361 if ($activity->title) { 362 $post_title = $activity->title; 363 } else if ($att_title) { 364 $post_title = $att_title; 365 } else { 366 $post_title = __('Google+ post: No title available…', 'g-crossposting'); 363 // if content starts with bold text, use it as title 364 $post_title = ''; 365 if (isset($activity->object->content)) { 366 $trimmed_content = trim($activity->object->content); 367 $regex = '/^<b>(.*)<\/b>/U'; 368 $matches = array(); 369 if (preg_match($regex, $trimmed_content, $matches) && count($matches) == 2) { 370 $post_title = $matches[1]; 371 } 372 } 373 374 // fallback on G+ title generation logic 375 if (empty($post_title)) { 376 if ($activity->title) { 377 $post_title = $activity->title; 378 } else if ($att_title) { 379 $post_title = $att_title; 380 } else { 381 $post_title = __('Google+ post: No title available…', 'g-crossposting'); 382 } 367 383 } 368 384 -
g-crossposting/trunk/readme.txt
r912244 r912911 1 1 === Google+ Crossposting === 2 2 Contributors: sebstein 3 Donate link: bitcoin:18dNV4mZyQMDdgd1ebe2Gm4f9MNZMLuNNb3 Donate link: http://wordpress.org/plugins/g-crossposting/faq/ 4 4 Tags: google, googleplus, posts, g+ 5 5 Requires at least: 3.0.0 6 6 Tested up to: 3.9.1 7 Stable tag: 1. 4.07 Stable tag: 1.5.0 8 8 9 9 Imports your public Google+ activities in your Wordpress blog. … … 87 87 first! 88 88 89 = Post titles are still shortened, even if I set length to 0 (meaning unlimited length)? = 89 = Where do post titles come from? = 90 91 Google+ provides a title for each post. There is no documentation how Google+ 92 generates those titles. 93 94 You can set a custom title by starting your post with bold text. You can insert 95 bold text in your post by surrounding text with asterics characters, e.g. `*my 96 title*`. 97 98 If the plugin doesn't find bold text at the beginning of your post, it will use 99 the title generated by Google+ instead. 100 101 = Post titles are shortened, even if I set length to 0 (meaning unlimited length)? = 90 102 91 103 Google+ itself limits the length of a post title. If you set 0 for the length of 92 104 the post title, the plugin will import the whole title provided by Google+. If 93 105 Google+ shortens your title, there is nothing this plugin can do. 106 107 = How can I send you a donation? = 108 109 I appreciate your support very much! As I don't want to feed the financial 110 industry, I only accept donations as [https://bitcoin.org/](Bitcoins). Please 111 send your donation to the following Bitcoin address: 112 113 [bitcoin:1Fp4ZtGETPYkcbTW2uQDUPcbCkJBeAWQJr](1Fp4ZtGETPYkcbTW2uQDUPcbCkJBeAWQJr) 114 115 If you are unable to send me Bitcoins, please consider making a donation to a 116 local charity of your choice (e.g. to support homeless people) or to an 117 international organisation like the Red Cross. 118 119 Thank you! 94 120 95 121 … … 100 126 101 127 == Changelog == 128 129 = 1.5.0 = 130 131 * If a Google+ posts starts with bold text, this bold text is used as title of 132 the post instead of the title "guessed" by Google. You can insert bold text in 133 your post by surrounding the text with asterics characters, e.g. *title* 134 * fix PHP warning in admin.php 102 135 103 136 = 1.4.0 =
Note: See TracChangeset
for help on using the changeset viewer.