Here is a diff for corrections to make plugin work with php7 on wp 4.9.4, could you pleas add this to the plugin or add soundstrategies to contributors?
svn diff trunk/la-petite-url.php
Index: trunk/la-petite-url.php
===================================================================
— trunk/la-petite-url.php (revision 1817155)
+++ trunk/la-petite-url.php (working copy)
@@ -4,7 +4,7 @@
Plugin URI: https://lapetite.me
Help & Support: https://getsatisfaction.com/extrafuture/products/extrafuture_la_petite_url
Description: Personal, customized URL shortening for WordPress.
-Version: 2.1.5
+Version: 2.1.6
Author: Phil Nelson
Author URI: https://extrafuture.com
@@ -64,6 +64,8 @@
global $wpdb;
global $petite_table;
+ if( empty( $the_petite ) ) return false;
+
$post_query = $wpdb->get_row(“SELECT * FROM “.$wpdb->prefix.”$petite_table WHERE petite_url = ‘”.$the_petite.”‘”);
if(count($post_query) > 0)
{
@@ -129,11 +131,11 @@
try {
if($post_parent != ‘0’ && $post_parent != “”)
{
– $wpdb->query(“INSERT INTO “.$wpdb->prefix. $petite_table .” VALUES($post_parent,'”.mysql_real_escape_string($string).”‘)”);
+ $wpdb->query(“INSERT INTO “.$wpdb->prefix. $petite_table .” VALUES($post_parent,'”.esc_sql($string).”‘)”);
}
else
{
– $wpdb->query(“INSERT INTO “.$wpdb->prefix. $petite_table .” VALUES($post,'”.mysql_real_escape_string($string).”‘)”);
+ $wpdb->query(“INSERT INTO “.$wpdb->prefix. $petite_table .” VALUES($post,'”.esc_sql($string).”‘)”);
}
}
catch(Exception $e)
@@ -164,9 +166,8 @@
$referer = $_SERVER[‘HTTP_REFERER’];
+ $le_petite_url_split = explode(‘/’,$the_petite);
– $le_petite_url_split = spliti(‘/’,$the_petite);
–
$le_petite_url_use = count($le_petite_url_split) – 1;
if(le_petite_url_check_url($le_petite_url_split[$le_petite_url_use]))
@@ -630,5 +631,3 @@
echo “<p>This post doesn’t seem to have a petite url. To generate one, save the post. The petite url will then appear right where this message is.</p>”;
}
}
–
-?>
\ No newline at end of file
You should add in the description of the plugin the function to retrieve the url via php: get_la_petite_url_permalink($post->ID);
cheers
]]>This currently doesn’t work with the latest version of WordPress, the homepage tries to loop back on itself.
This can be fix by add the following at the top of the function “le_petite_url_check_url”.
if( empty( $the_petite ) )
return false;
]]>
There seems to be a conflict with YARPP and YARPP Experiments.
Since the last update of those 2 plugins, la petite url doesn’t work anymore. When I try to access a short URL, I get a blank page with the following error in my apache log file:
[Sun Mar 10 18:00:26 2013] [error] PHP Fatal error: Call to a member function get_option() on a non-object in /wp-content/plugins/yet-another-related-posts-plugin/yarpp.php on line 54
[Sun Mar 10 18:02:25 2013] [error] PHP Fatal error: Call to undefined function yarpp_get_option() in /wp-content/plugins/yarpp-experiments/yarpp-experiments.php on line 364
]]>
Hello,
This is the plugin which I want to use for link shortening than bit.ly or yourls. This is the Only plugin which enables me to shorten the links without a third party app
I would like to know if there is any latest update available
Thanks!
]]>Any way to set the default URL for all the posts?
I would like to display “domain.com” all the time, regardless of which posts, page, site etc they are visiting…
]]>Hi,
Invalid header when installing this plugin on WP 2.9.2 :/
Aleady tested on 2.9.9 ?
Regards
In this way, I can give out “short url’s” to clients for stuff I want them to look at (not my stuff), and I get a log of them hitting it, without depending on anyone else’s short-url service.
]]>Is it possible to define my own keyword for a page or edit it after it has been generated?
]]>