Potential security issue in the custom taxonomy search functionality

I want to add functionality to a WordPress client site that allows you to include taxonomy terms from custom post types in WordPress search, and find the following answer:

Include a custom taxonomy term in the search

This solution works, but in the comments, one user mentioned that "it is probably not a good idea to inject the publicly available raw search string directly into an SQL query". and added a link for further reading. I don't see anything in this link that relates to the specifics of the answer.

For a quick reference, the code for the answer is below, would this code be a security risk? And if so, what would be the solution so that you can still have the option of including taxonomy terms in WP search without security risk?

thank you so much

// search all taxonomies, based on: http://projects.jesseheap.com/all-projects/wordpress-plugin-tag-search-in-wordpress-23

function atom_search_where($where){
global $wpdb;
if (is_search())
    $where .= "OR (t.name LIKE '%".get_search_query()."%' AND {$wpdb->posts}.post_status = 'publish')";
return $where;
}

function atom_search_join($join){
global $wpdb;
if (is_search())
    $join .= "LEFT JOIN {$wpdb->term_relationships} tr ON {$wpdb->posts}.ID = tr.object_id INNER JOIN {$wpdb->term_taxonomy} tt ON tt.term_taxonomy_id=tr.term_taxonomy_id INNER JOIN {$wpdb->terms} t ON t.term_id = tt.term_id";
return $join;
}

function atom_search_groupby($groupby){
global $wpdb;

// we need to group on post ID
$groupby_id = "{$wpdb->posts}.ID";
if(!is_search() || strpos($groupby, $groupby_id) !== false) return $groupby;

// groupby was empty, use ours
if(!strlen(trim($groupby))) return $groupby_id;

// wasn't empty, append ours
return $groupby.", ".$groupby_id;
}

add_filter('posts_where','atom_search_where');
add_filter('posts_join', 'atom_search_join');
add_filter('posts_groupby', 'atom_search_groupby');

c # – Keep or change the background color of a custom text box

I worked with the components of the Windows form, I try to create a text box with a round border and a gradient color, I was able to get both, but when I did writing of the degraded color, it is erased and returns to white.
Any ideas on how to keep it or at least change the color of the text box to something other than white? (even if it is the Color class).
I attach the code to the text box:

class TextBoxRounded : TextBox
{
    (System.Runtime.InteropServices.DllImport("gdi32.dll", EntryPoint = "CreateRoundRectRgn"))
    private static extern IntPtr CreateRoundRectRgn
    (
        int nLeftRect, // coordenada X
        int nTopRect,// coordenada Y
        int nRightRect, // ancho
        int nBottomRect,// altura
        int nheightRect, //altura Elipse 
        int nweightRect //ancho Elipse
    );
    protected override void OnPaint(PaintEventArgs e)
    {
        SolidBrush sb = new SolidBrush(this.ForeColor);
        LinearGradientBrush lb = new LinearGradientBrush(this.ClientRectangle, Color.FromArgb(243, 243, 243), Color.White, LinearGradientMode.Vertical);
        e.Graphics.FillRectangle(lb, this.ClientRectangle);
        e.Graphics.DrawString(this.Text, this.Font, sb, 0f, 0f);
        sb.Dispose();
        lb.Dispose();
    }
    protected override void OnCreateControl()
    {
        if (IsHandleCreated)
        {
            SetStyle(ControlStyles.UserPaint, true);
        }
        base.OnCreateControl();
        this.Region = System.Drawing.Region.FromHrgn(CreateRoundRectRgn(2, 3, this.Width, this.Height, 15, 15));
    }

}

custom post types – fatal error recoverable – object of class WP_Post could not be converted to string

I'm using ACF and trying to display a message type title based on the current time. So I have my message type entry with start_time and end_time and my conditional shows my div.onAir, but I get this fatal recoverable error. Here is my code:

 'shows',
      'meta_query' => array(
        array(
          'key' => 'start_time',
          'compare' => '<=',
          'value' => $time_now,
          'type' => 'DATETIME',
        ),
        array(
          'key' => 'end_time',
          'compare' => '<=',
          'value' => $time_now,
          'type' => 'DATETIME',
        )
      ),
    ));
  if( $shows ) {
    foreach( $shows as $show ){ ?>
       
Currently On Air:

I feel close, but I have never seen this particular error before. Any help would be appreciated! Thank you.

php – Show custom data only in administrator emails and wordpress administrator

For 3 days, I try to display personalized data only for the administrator of the new order by e-mail and for the backoffice order. Not for the customer, it's just where the product is stored in stock.

// 2. Save custom field on product variation save

add_action( 'woocommerce_save_product_variation', 'bbloomer_save_rangement_variations', 10, 2 );

function bbloomer_save_rangement_variations( $variation_id, $i ) {
$rangement = $_POST('rangement')($i);
if ( isset( $rangement ) ) update_post_meta( $variation_id, 'rangement', esc_attr( $rangement ) );
}

// -----------------------------------------
// 3. Store custom field value into variation data

add_filter( 'woocommerce_available_variation', 'bbloomer_add_rangement_variation_data' );

function bbloomer_add_rangement_variation_data( $variations ) {
$variations('rangement') = '
Custom Field: ' . get_post_meta( $variations( 'variation_id' ), 'rangement', true ) . '
'; return $variations; } // 4. afficher le champ rangement dans l'email envoyer à l'admin add_action( 'woocommerce_email_order_details', 'add_rangement_to_order_item_meta', 20, 4 ); function add_rangement_to_order_item_meta( $order, $sent_to_admin, $plain_text, $email ) { $rangement_value = get_post_meta( $item->get_product_id(), 'rangement', true ); if ( ! empty($rangement_value) ){ $item->update_meta_data( __('Rangement', 'woocommerce'), $rangement_value ); } }

personalization – custom theme, add media not showing images in media library

I am a beginner in theme development, I created a theme following an online tutorial. when i try to add pictures in a message using the Add Media button, it opens but shows no pictures, the loader continues to run. But accessing the media library directly shows that there are pictures in it.
What am I forgetting here? changing the theme to one of the wordpress themes corrects the problem, but i would use my theme.

Bootstrap-4 carousel ignores my custom CSS

You will find below the arrows of the carousel which are part of a larger carousel object that I am trying to personalize via my external custom.css:







Code (CSS):

In fact, I even tried to overqualify the .carousel-control-next-icon and .carousel-control-prev-iconelements elements in my custom.css as follows:

/* BOOTSTRAP-4 CAROUSEL ARROWS */
div#demo a.carousel-control-prev span.carousel-control-prev-icon,
div#demo a.carousel-control-next span.carousel-control-next-icon {
height: 100px;
width: 100px;
outline: black;
background-size: 100%, 100%;
border-radius: 50%;
border: 1px solid black;
background-image: none;
}

div#demo a.carousel-control-next span.carousel-control-next-icon:after
{
content: '>';
font-size: 55px;
color: red;
}

div#demo a.carousel-control-prev span.carousel-control-prev-icon:after {
content: '<';
font-size: 55px;
color: red;
}

HTML:

And always when I open the element in the chrome inspector, the arrows get the basic style of _carousel.scss, my custom.css attributes are not even displayed in the debugger window.

I have checked all of my custom.css file and there is not a single error, so I don't understand where my definition of custom carousel went. What could be going on here?
SEMrush

2016 – Create a subsite with custom template expiration error on /_layouts/15/newsbweb.aspx

We use SP2016 on site and have a custom site template. The template is a wsp file download via Site Settings -> Solution. The same model works a year ago. It also works in our test environment.
Today we are trying to create a subsite using this template. After pressing create, it charges for 10 minutes. During the 10 minutes, we see that the subsite is actually created by browsing it. However, after the time expires, an error is displayed:

System.TimeoutException: HTTP request timed out after 200,000
milliseconds. —> System.Net.WebException: the request was abandoned:
The request has been canceled. at
System.Net.HttpWebRequest.EndGetResponse (IAsyncResult asyncResult)
at
Microsoft.Workflow.Client.HttpGetResponseAsyncResult`1.OnGotResponse (IAsyncResult
result) — End of internal exception stack trace — at
Microsoft.Workflow.Common.AsyncResult.End (TAsyncResult) (IAsyncResult
result) at Microsoft.Workflow.Client.H

When I refresh the subsite URL, the subsite is deleted and leaves a 404 error.

When checking the ULS log, the error is

Application error while accessing /_layouts/15/newsbweb.aspx,
Error = 0x81020089System.TimeoutException:
The HTTP request expired after 200,000 milliseconds. —>
System.Net.WebException: the request was abandoned: the request was
canceled. at System.Net.HttpWebRequest.EndGetResponse (IAsyncResult
asyncResult) to
Microsoft.Workflow.Client.HttpGetResponseAsyncResult`1.OnGotResponse (IAsyncResult
result) — End of internal exception stack trace — at
Microsoft.Workflow.Common.AsyncResult.End (TAsyncResult) (IAsyncResult
result) at Microsoft.Workflow.Client.H at
Microsoft.SharePoint.Library.SPRequestInternalClass.UpdateFileOrFolderProperties (String
bstrWebUrl, string bstrWebRelativeUrl, string bstrCheckLockId, object
varProperties, Boolean fMigrationSemantics, Boolean fSystemUpdate,
Boolean fUseIncomingLastModifiedTime, Boolean fIncrementItemVersion,
String etagMatch, Guid & pgOriginatorId, String & pbNewETag, Byte &
piLevel) to
Microsoft.SharePoint.Library.SPRequest.UpdateFileOrFolderProperties (String
bstrWebUrl, string bstrWebRelativeUrl, string bstrCheckLockId, object
varProperties, Boolean fMigrationSemantics, Boolean fSystemUpdate,
Boolean fUseIncomingLastModifiedTime, Boolean fIncrementItemVersion,
String etagMatch, Guid & pgOriginatorId, String & pbNewETag, Byte &
piLevel) d7fd449f-dba4-30b8-19f4-94ce6a8e3936

What could be the problem and how to solve it in more detail?

g suite – Is it possible to send and receive emails in GMail while using a custom DNS configuration?

I have a domain that I purchased and configured via GSuite for business emails, all managed via Google domains. We use a third party email platform which is linked to gmail and uses standard gmail / domain settings. We have another third party service which requires us to change our domain name servers. When I change the DNS records, Google tells me that "It looks like you've changed your name servers. All of your domain settings (including website, emails, synthetic records, and resource records) are currently disabled. To enable these settings, you will need to restore Google Domains name servers. "

Is there some sort of workaround to do both? Do you have custom DNS settings AND keep sending emails through gmail? I can't add custom name servers to existing Google DNS, and adding standard Google DNS to the list of custom servers also makes no difference.

macos – Format custom log files for the console

I am developing a Swift application which can store debugging and errors / faults in a * .log file. I am wondering if there is a trick to formatting these self-created log files in such a way that the console prints them as it does with system logs. Do you know how to do this, possibly even with a different file format?
Console screenshot