per blog metadata for plugin

Options are site specific, so you just need to use update_option() and get_option(). The network-wide equivalents are update_network_option() and get_network_option(). Note that update_site_option() is just a wrapper for update_network_option(), and is an older name from when a multisite network was (confusingly) called a ‘site’. The same applies for get_site_option().

Form using admin-post.php gives 404 after submission

First of all… Your action is called rguroo_email_verification_form, so you should use it when registering your hooks. But you use this instead: add_action( ‘admin_post_nopriv_email_verification_form’, ‘verify_and_sanitize_email_form’, $priority = 10, $accepted_args = 1 ); add_action( ‘admin_post_email_verification_form’, ‘verify_and_sanitize_email_form’, $priority = 10, $accepted_args = 1 ); It should be: add_action( ‘admin_post_nopriv_rguroo_email_verification_form’, ‘verify_and_sanitize_email_form’, $priority = 10, $accepted_args = 1 ); … Read more

Access to apache logs from plugin

If you have Try and cache block and loggin error manually than you can try this : $mylogfilepath = plugin_dir_path(__FILE__).’debug.log’; $errormessage=”SOME ERROR”.PHP_EOL; error_log($errormessage, 3, $mylogfilepath); Place debug.log file directly inside your plugin. and it will log error to that file. third attribute in error_log set path of file in which log should be recored.

How to get post image root URL?

The get_attached_file() function returns the path to a file based on the attachment ID: $FeaturedImage = get_attached_file( get_post_thumbnail_id() ); Getting the path to a specific size is more complicated. WordPress stores the filename for resized versions of the images in as attachment metadata, that can be retrieved with wp_get_attachment_metadata(). Once you have the filename of … Read more

WordPress SVN UTF-8 issue

Wow, your plugin is very useful. #@^%$@ -> rysunok. That’s so amazing!!! About your problem, I guess you copied and pasted the special characters from other into your php files, so it caused this error. My solution: Try opening the file in Notepad++, click on Encoding tab at top menu, you will see the current … Read more