bsmolyanov
Forum Replies Created
-
Many thanks for the directions, @eskapism! I tried but cannot get this to work at my level of coding skills… ??
Any help is much appreciated!
Forum: Plugins
In reply to: [Simple History – Track, Log, and Audit WordPress Changes] Custom Logger CodeI will start a new thread based on the new topic.
Thank you!
Forum: Plugins
In reply to: [Simple History – Track, Log, and Audit WordPress Changes] Custom Logger CodeSomething else came to my mind ??
Is there a way to print the visited page/post title as a link?
Currently, the title and the link are in plain text like this:
visited “{post_title}” ({post_permalink})
Thank you!
Forum: Plugins
In reply to: [Simple History – Track, Log, and Audit WordPress Changes] Custom Logger CodeManaged to solve this by replacing LogInitiators::WEB_USER with LogInitiators::WP_USER.
Forum: Plugins
In reply to: [Simple History – Track, Log, and Audit WordPress Changes] Custom Logger CodeHi?@eskapism! The custom logger code you provided is working almost perfectly!
I recently noticed that each history entry starts initiated by it starts with a gray avatar logo followed by ‘Anonymous web user‘. Then, in the message itself it specifies, as expected, all the user/visited page details.
All the other log entries start with the user’s display name (as a link to the user profile) and the user’s email address, which is the expected behavior.
Is there a way to correct this and make the custom logger entries feel ‘native’ in the log?
Thank you very much!
Hi @eskapism
For the record – the culprit was the plugin GP Social Share. It seems not currently supported, although I like it a lot.
Thanks for your support!
Forum: Plugins
In reply to: [Simple History – Track, Log, and Audit WordPress Changes] Custom Logger CodeThank you very much for your time and effort, @eskapism !
I implemented the code and visits are recorded as expected!
Forum: Plugins
In reply to: [Simple History – Track, Log, and Audit WordPress Changes] Custom Logger CodeThanks a lot, @eskapism !
Unfortunately, something seems to be wrong. I place the code in functions.php and then I get the following PHP errors. Also it prevents the other loggers from displaying their messages as well.
There are the errors I am getting:
Got error 'PHP message: PHP Fatal error: Allowed memory size of 2147483648 bytes exhausted (tried to allocate 557056 bytes) in /home/....../wp-includes/class-wpdb.php on line 2459'
and
Got error 'PHP message: WordPress database error Commands out of sync; you can't run this command now for query UPDATE
wp_options
SEToption_value
= '1695284706' WHEREoption_name
= 'action_scheduler_lock_async-request-runner' made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, ActionScheduler_QueueRunner->maybe_dispatch_async_request, ActionScheduler_OptionLock->set, update_option, QM_DB->queryPHP message: WordPress database error Commands out of sync; you can't run this command now for query SELECT COUNT(DISTINCT claim_id) FROM wp_actionscheduler_actions WHERE claim_id != 0 AND status IN ( 'pending', 'in-progress') made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, ActionScheduler_QueueRunner->maybe_dispatch_async_request, ActionScheduler_AsyncRequest_QueueRunner->maybe_dispatch, ActionScheduler_AsyncRequest_QueueRunner->allow, ActionScheduler_Abstract_QueueRunner->has_maximum_concurrent_batches, ActionScheduler_DBStore->get_claim_count, QM_DB->queryPHP message: WordPress database error Commands out of sync; you can't run this command now for query SELECT a.action_id FROM wp_actionscheduler_actions a WHERE 1=1 AND a.status IN ('pending') AND a.scheduled_date_gmt <= '2023-09-21 08:24:06' LIMIT 0, 5 made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, ActionScheduler_QueueRunner->maybe_dispatch_async_request, ActionScheduler_AsyncRequest_QueueRunner->maybe_dispatch, ActionScheduler_AsyncRequest_QueueRunner->allow, ActionScheduler_Store->has_pending_actions_due, ActionScheduler_DBStore->query_actions, QM_DB->query'I would really appreciate your input to make this custom logger work.
Thanks!
- This reply was modified 1 year, 2 months ago by bsmolyanov.
Forum: Plugins
In reply to: [DiffCheck - Compare two text files] Language support and stylingThanks, Stefan! Much appreciated! Keep up the good work!
Forum: Plugins
In reply to: [Custom Content Shortcode] [field excerpt] shortcode within an ACF fieldI tried to resolve it with the following snippet (based on the example here: https://www.advancedcustomfields.com/resources/acf-format_value/). However no success so far.
function my_acf_format_value( $value, $post_id, $field ) { // Render shortcodes in all textarea values. return do_shortcode( $value ); } // Apply to textarea fields. add_filter('acf/format_value/type=textarea', 'my_acf_format_value', 10, 3);
- This reply was modified 2 years, 10 months ago by bsmolyanov.
Forum: Plugins
In reply to: [Manage User Columns] URL in fieldsThanks, Deepak!
It works!!! Thank you so much ??
Forum: Plugins
In reply to: [Import Products from any XML or CSV to WooCommerce] str_replace new linesIt works!!! Thank you so much ??
I watched the video – very helful, but I do not have the “Refund via Stripe” button.
I have the Manual Refund option only.
Could it be due to some settings?Forum: Plugins
In reply to: [MB Relationships] Shortcode – additional parametersThank you so much for your reply. We need a bit more hand here.
We use this code in the functions.php file:
add_action( 'mb_relationships_init', function() { MB_Relationships_API::register( [ 'id' => 'posts_to_pages', 'from' => 'post', 'to' => 'post', ] ); } );
and we use this shortcodes in the body of the post:
[mb_relationships id="posts_to_pages" direction="from" mode="ul"] [mb_relationships id="posts_to_pages" direction="to" mode="ul"]
These settings provide nice list of ‘from’ and ‘to’ post titles, whicih include links to the specific posts.
We just need to display the posts excerpts below each post title.
Do we need to add something in the functions.php file or do we need to add something to the shortcode? If yes, could you please write it.
Maybe something like this, but where to put it if its correct at all?
<?php $my_excerpt = get_the_excerpt(); echo $my_excerpt; ?>
Thank you very much!
- This reply was modified 4 years, 8 months ago by bsmolyanov.
- This reply was modified 4 years, 8 months ago by bsmolyanov.