remino
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Wrapping filtered content in [caption] removes captionActually, if a shortcode calls
do_shortcode
, likeimg_caption_shortcode
, you can.See wp-includes/media.php, lines 1586 and 1589:
https://developer.www.ads-software.com/reference/functions/img_caption_shortcode/When I wrap a
[youtube]
in my blog posts with[caption]
, it is actually wrapping the YouTube embed with a caption.- This reply was modified 6 years, 10 months ago by remino. Reason: Added example
Forum: Requests and Feedback
In reply to: Feature Request: Caption for EmbedsWell, digging into the code, I found that if I specify the width in the caption shortcode, I can add whatever I want in the content of the shortcode. The content will also be parsed by do_shortcode in that case, hence allowing me to add embeds.
My bad. Maybe I missed that part in the docs.
Okay, I understand there are policies, but it really looked like there was a bug to me. Everything was working fine, then the moment I update UpdraftPlus, it’s failing. Failing in cron and failing from wp-admin.
I modified
updraftplus.php
and added this line. This is my diff:*** updraftplus-orig.php Sat Sep 3 07:24:44 2016 --- updraftplus.php Sat Sep 3 07:39:57 2016 *************** if (!file_exists(UPDRAFTPLUS_DIR.'/class *** 151,156 **** --- 151,157 ---- require_once(UPDRAFTPLUS_DIR.'/class-updraftplus.php'); $updraftplus = new UpdraftPlus(); + $GLOBALS['updraftplus'] = $updraftplus; $updraftplus->have_addons = $updraftplus_have_addons; if (!$updraftplus->memory_check(192)) {
Now, everything is working the way it should again.
Actually, I have 6 WordPress sites. All of them have UpdraftPlus. Only one (the one from which I’ve shown the log above) has a paid licence. They’re all doing the same thing.
Although, my error message differs a bit:
Opened log file at time: Sat, 03 Sep 2016 01:53:54 +0000 on https://remino.net/bits UpdraftPlus WordPress backup plugin (https://updraftplus.com): 2.12.20.1 WP: 4.6 PHP: 5.5.38 (Linux alleghany 3.2.61-grsec-modsign #1 SMP Tue Aug 12 09:58:26 UTC 2014 x86_64) MySQL: 5.6.25 WPLANG: en_CA Server: safe_mode: 0 max_execution_time: 900 memory_limit: -1 (used: 55.3M | 56.3M) multisite: N openssl: OpenSSL 1.0.1 14 Mar 2012 mcrypt: Y LANG: ZipArchive::addFile: Y Free space on disk containing Updraft's temporary directory: 1051055.7 MB Tasks: Backup files: 1 (schedule: daily) Backup DB: 1 (schedule: daily) Requesting semaphore lock (fd) (apparently not via scheduler) Fatal error: Call to a member function log() on a non-object in <em>redacted</em>/wp-content/plugins/updraftplus/includes/class-semaphore.php on line 176
There is no reply from @jamesbuck, but I can tell you I’ve been having the same problem as well as the same error, and I’ve done the same procedure.
When running the SQL query above, I get this:
mysql> SELECT * FROM wp_22crc9_options WHERE ( option_name LIKE 'updraftplus_unlocked_%' OR option_name LIKE 'updraftplus_locked_%' OR option_name LIKE 'updraftplus_last_lock_time_%' OR option_name LIKE 'updraftplus_semaphore_%' ); +-----------+-------------------------------+---------------------+----------+ | option_id | option_name | option_value | autoload | +-----------+-------------------------------+---------------------+----------+ | 30386 | updraftplus_last_lock_time_ | 2016-03-11 10:28:40 | yes | | 30379 | updraftplus_last_lock_time_fd | 2016-09-03 01:46:16 | yes | | 30378 | updraftplus_locked_fd | 1 | yes | | 30387 | updraftplus_semaphore_ | 0 | yes | | 30380 | updraftplus_semaphore_fd | 1 | yes | | 30385 | updraftplus_unlocked_ | 1 | yes | +-----------+-------------------------------+---------------------+----------+ 6 rows in set (0.00 sec)
- This reply was modified 8 years, 2 months ago by remino. Reason: Formatting
Forum: Hacks
In reply to: I Think a Hack Added func.php to My Theme FilesJust to let you know, my site was compromised too. A hacker uploaded a doc.php file in /wp-content/plugins/si-contact-form/captcha/temp, with which I assume the same hacker wrote the theme.php (not func.php for me) in /wp-content/themes/twentyeleven. After that, a separate spam WordPress site was installed in /wp-includes/js/saw, which was connected to an external database.
Forum: Fixing WordPress
In reply to: Unable to change site languageJust found the solution. Somehow, I had a small 4KB .mo instead of the bigger ~200KB file I needed. I simply downloaded a copy of the fr_FR.mo from the following:
https://svn.automattic.com/wordpress-i18n/fr_FR/branches/2.7/messages/
Forum: Plugins
In reply to: the_content() in template always emptyIs that what
the_post()
does? I see…I just tried it and it works. Thank you! I guess I still have a lot to learn.
Forum: Plugins
In reply to: the_content() in template always emptyI added a line,
setup_postdata($post)
, in my template, and that did it. I’m surprised I have to do that, sincethe_title()
works just fine, with and without the added line.Forum: Plugins
In reply to: How to get the current page in functions.phpAh, of course. You made me realise the mistake I’ve done. I wrote a function to replace
wp_list_pages()
and I needed to get the current page. To test that function, I actually called it from within functions.php. When I’m calling my custom function from index.php (the main template page), every works just fine.Thanks!