Changeset 3305442
- Timestamp:
- 06/03/2025 05:55:14 AM (10 months ago)
- Location:
- lander-for-instagram
- Files:
-
- 5 added
- 2 edited
-
tags/1.1.0 (added)
-
tags/1.1.0/httplib.php (added)
-
tags/1.1.0/instagram-lander.php (added)
-
tags/1.1.0/pixel.png (added)
-
tags/1.1.0/readme.txt (added)
-
trunk/instagram-lander.php (modified) (8 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lander-for-instagram/trunk/instagram-lander.php
r3101474 r3305442 3 3 Plugin Name: Lander For IG 4 4 Plugin URI: https://wordpress.org/plugins/lander-for-instagram 5 Version: 1. 0.95 Version: 1.1.0 6 6 Description: Landing page featuring a mirror of your instagram feed with links to related posts 7 7 Author: James Low … … 27 27 } 28 28 public static function ajax() { 29 if (current_user_can('administrator')) { 29 //if (current_user_can('administrator')) { 30 if (current_user_can('read')) { 30 31 $method = $_REQUEST['method']; 31 32 if ($method == 'accesstoken') { … … 45 46 public static function admin_menu() { 46 47 //add_options_page( $page_title, $menu_title, $capability, $menu_slug, $function); 47 add_options_page('Instagram Lander', 'Instagram Lander', 'manage_options', self::$PREFIX, array('Instagram_Lander', 'options_page')); 48 //add_options_page('Instagram Lander', 'Instagram Lander', 'manage_options', self::$PREFIX, array('Instagram_Lander', 'options_page')); 49 add_options_page('Instagram Lander', 'Instagram Lander', 'read', self::$PREFIX, array('Instagram_Lander', 'options_page')); 48 50 add_action('admin_init', array('Instagram_Lander', 'admin_init')); 49 51 } … … 117 119 '; 118 120 $default_link = $a['default_link']; 119 121 $default_link == '' ? get_site_url() : $default_link; 120 122 foreach ($rows as $row) { 121 123 $caption = trim(str_replace("\n", ' ', $row->caption)); … … 124 126 //$link = $default_link == '' ? $row->permalink : $default_link; 125 127 $target = ''; 126 $link = $default_link == '' ? get_site_url() : $default_link; 127 if (count($parts) > 0) { 128 $last = $parts[count($parts)-1]; 129 if (strpos($last, 'http') === 0) { 130 $link = $last; 128 $link = $default_link; 129 foreach ($parts as $part) { 130 if (strpos($part, 'http') === 0) { 131 $link = $part; 131 132 $target = ''; 132 133 } … … 276 277 <h1>Instagram Lander</h1> 277 278 <ol> 278 < li>Create and add your Facebook App Id</li>279 <li>Add your Facebook App Secret</li> 279 <!--<li>Create and add your Facebook App Id</li> 280 <li>Add your Facebook App Secret</li>--> 280 281 <li>Click lookup: <button onclick="return instagram_lander_init();">Lookup Info</button></li> 281 282 <li>If your browser blocks popup, you may have to enable it and click lookup again</li> … … 287 288 <table class="form-table"> 288 289 <tr valign="top"> 289 <th scope="row"> Facebook App Id</th>290 <td><?php echo self:: setting('facebook-app','App Id'); ?>291 <?php echo self:: setting('facebook-secret','App Secret',true); ?></td>290 <th scope="row"><!--Facebook App Id--></th> 291 <td><?php echo self::hidden('facebook-app','App Id'); ?> 292 <?php echo self::hidden('facebook-secret','App Secret',true); ?></td> 292 293 </tr> 293 294 <tr valign="top"> … … 321 322 return '<input placeholder="'.$placeholder.'" type="'.($password?'password':'text').'" name="'.self::$PREFIX.'-'.$id.'" value="'.esc_attr(self::option($id)).'" />'; 322 323 } 324 public static function hidden($id, $placeholder = '', $password = false) { 325 return '<input placeholder="'.$placeholder.'" type="hidden" name="'.self::$PREFIX.'-'.$id.'" value="'.esc_attr(self::option($id)).'" />'; 326 } 323 327 public static function option($id) { 324 328 return get_option(self::$PREFIX.'-'.$id); -
lander-for-instagram/trunk/readme.txt
r3101474 r3305442 5 5 Requires at least: 4.0.1 6 6 Tested up to: 6.5.4 7 Stable tag: 1. 0.97 Stable tag: 1.1.0 8 8 License: MIT License 9 9 License URI: https://opensource.org/licenses/MIT … … 30 30 31 31 == Changelog == 32 33 = 1.1.0 = 34 * Link detection even if not last line in caption 32 35 33 36 = 1.0.9 =
Note: See TracChangeset
for help on using the changeset viewer.