Covi
Forum Replies Created
-
A few of my snippets:
uploads_url (Sortcode, PHP code)
$upload_dir = (array) wp_upload_dir(); if ( isset($upload_dir['baseurl']) && !empty($upload_dir['baseurl']) ) echo $upload_dir['baseurl']; } else // your fallback
home_url (Sortcode, PHP code, vars: path,scheme)
echo home_url("{path}", "{scheme}");
…imagine what you can do ??
F.e: you can make a snippet for
bloginfo
(untested):bloginfo (Sortcode, PHP code, vars: key)
echo bloginfo("{key}");
or
bloginfo (Sortcode, PHP code, vars: key,echo)
if ( "" !== "{echo}" ) echo get_bloginfo("{key}"); else get_bloginfo("{key}");
I use a lot: antispambot, permalink, google maps, Wikipedia, Google links…
Great plugin ??Forum: Plugins
In reply to: [Secure Custom Fields] Advanced Custom Fields is slowing down my siteIMHO: What did you expect?
2 fields for each value on postmeta table (the value for plugin and original metadata)… instead save values into a serialized object for example; or even serialized object for each group.
Empty metadata values stored in table, extra functions to get values when we have native functions, extra post_types (and their metadata in postmeta), extra options…It’s a heavy plugin and maybe you need another option as WPAlchemy metaboxes or a lightweight plugin.
I have tested enough, and finally my solution is my own metaboxes.Thanks! ??
Ok, wp-admin error on
admin-footer.php line 17
:<?php bloginfo('url'); ?>/wp-admin/plugin-install.php
<?php echo admin_url('plugin-install.php'); ?>
—
<p><?php _e('See updates for', 'cfs'); ?> <a class="thickbox" href="<?php bloginfo('url'); ?>/wp-admin/plugin-install.php?tab=plugin-information&plugin=custom-field-suite§ion=changelog&TB_iframe=1&width=640&height=480">v<?php echo $this->version; ?></a></p>
Fix:
<p><?php _e('See updates for', 'cfs'); ?> <a class="thickbox" href="<?php echo admin_url('plugin-install.php'); ?>?tab=plugin-information&plugin=custom-field-suite§ion=changelog&TB_iframe=1&width=640&height=480">v<?php echo $this->version; ?></a></p>
PS: I think the best option is set something like
$this->admin_url
to check wp version and setup admin url (WordPress Network usenetwork_admin_url()
instead).Thanks Logikal, …I’m not newbie (I know how to edit DB, etc); and I put 5 stars (because of POO) to plugin before this.
I just think a plugin should check DB tables, directories, initialize vars… An uninstalled plugin should delete tables unused. Imagine you had 30 plugins with tables that already not in use? 30 dead tables on my DB??
I have another example (trying to find this file…) on homepage of plugin: On thickbox, this file uses “wp-admin” directly instead
admin_url('location/')
(I’m not using blogurl/wp-admin/).—
Finally: I think the plugin shouldn’t assume anything. If I need delete my old db option of version, the plugin should to do this; if the plugin needs a pre-defined var, the plugin should check and setup this; …not the user.PS: Great work anyway; mmm… you don’t have the project on github?
Forum: Fixing WordPress
In reply to: Notice: get_settings is deprecated since version 2.1!Backward compatibility, I guess ??
PD: Maybe we need a wordpress option to do not trigger errors of core files.Thanks ??
Another small suggestion, if you don’t mind; you can save all <del>fields</del><ins> values</ins> of a group into a serialized object = DB optimization.
Forum: Plugins
In reply to: [ProPlayer] [Plugin: ProPlayer] SQL inyectionIf what you get is a number, is not this better?:
$xml = $playlistController->getPlaylist(abs((int) $_GET["pp_playlist_id"]));
Forum: Plugins
In reply to: [Custom Field Suite] [Plugin: Custom Field Suite] Javascript errorThanks so much, great work ??
Forum: Requests and Feedback
In reply to: Official plugins db optionsYeah, …maybe as inspiration to developers; ….maybe a cat from a mechanic ??
Forum: Requests and Feedback
In reply to: Official plugins db optionsOk…, but at this time, there is nothing to prevent us from proposing unwritten guidelines like this, right?
Wordpress has come a long way in a short time, I have the hope that eventually, we will reach something like this.
Thanks ??Forum: Requests and Feedback
In reply to: Official plugins db optionsWell… IMHO, this should be a directive for WordPress Plugins system’s. All plugins should implement 4 methods (the first two at least): install, uninstall, backupOptions, restoreOptions.
In fact…, I think all plugins should be based on a parent abstract class with some methods required.
Forum: Plugins
In reply to: [WP-Footnotes] [Plugin: WP-Footnotes] Undefined index: symbolMore (perfomance): We don’t need call extra functions in each instance of loop for static values as permalink…
Near line 208:
[Code moderated as per the Forum Rules. Please use the pastebin]Forum: Plugins
In reply to: [WP-Footnotes] [Plugin: WP-Footnotes] Undefined index: symbolMore improvements, 2 internal – private helpers _getLinkFormat() for links and _getCurrentOption():
https://pastebin.com/TVNgrM7WForum: Plugins
In reply to: [postTabs] [Plugin: postTabs] XHTMLSorry Ovidiu, …my code works for me but isn’t right for a plugin ATM :S
— edit —
You can see in action (try disable Javascript also)
here: https://laguardiadejaen.com/web/ayuntamiento/area-de-comunicacion-y-prensa/archivo-de-noticias/
and here:
https://laguardiadejaen.com/web/ayuntamiento/corporacion-municipal/
and oher sections of laguardiadejaen.com