Calcular meta de atendimento em Python

Boa tarde pessoal!
Sou iniciante em Python e estou com alguns problemas para resolver.
Tenho uma série de critérios em horas, e preciso calcular o quando uma Ordem de Serviço vai ser concluída, ou precisa ser concluída.
Os critérios de horas são 24 hrs, 48hrs e 120hrs úteis para concluir a O.S.

Vamos aos exemplos:

tenho uma ordem de serviço que precisa ser concluida em 24 horas uteis, ela foi criada 13/11/2020 08:00:00, ela vai somar 8 horas hoje, dia 14 8 horas, dia 15 4 horas(domingo) e dia 16 4 horas.
Então a meta de atendimento dessa O.S é 16/11/2020 12:00.

Lembrando que essa O.S pode ser criada em qualquer hora do dia e eu preciso descobrir qual o dia, mes, ano, hora, minuto e segundo que vence essa OS.

Alguem pode me ajudar, ja passaram por isso?

[XenFun] Unlimited Meta Tags | NulledTeam UnderGround

Compatibility with XenForo 2.2

You can put unlimited meta tags, script, HTML tags as you need in your template Head Tags without modifying the template. It will place between the <head> and </head> tags.

XenForo users are missing many things with new features when upgrading to the new version and if they customized their template. Because they customized template and new version templates are not override while upgrading. So, you can use our addons to use xenforo original features +…

wp query – Sort wordpress custom posts based on meta value

I’m trying to sort the custom posts based on meta value as priority level1, level2 and level3. I have given a dropdown field in post meta as featured posts, standard posts and basic posts. I want to display them as featured posts on top, then standard posts and then basic posts. I tried with below code but it’s not sorting the posts in the order.

Any guidance or advise much appreciated!

Here is my code:

Array(
    'name'          => __( 'Listing Type Options', 'text-domain' ),
    'id'            => 'lising_type_options',
    'type'          => 'select',
    'child_of' => '',
    'options' => array(
        '' => 'Select Listing Type',
        '1' => 'Basic',
        '2' => 'Standard',
        '3' => 'Featured',
    ),
    'desc' => ''
),

if( isset( $lp_type ) && !empty( $lp_type ) ){
     if( $lp_type == '3' ){
          $lp_type = 'Featured';
     } elseif( $lp_type == '2' ){
          $lp_type = 'Standard';
     } elseif( $lp_type == '1' ){
          $lp_type = 'Basic';
     }
} else{
     $lp_type = '';
}

This is the query:

            $args = array(
                    'post_type' => $type,
                    'post_status' => 'publish',
                    'posts_per_page' => $postsonpage,
                    'paged'  => $paged,
                    'post__not_in' =>$ad_campaignsIDS,
                    'tax_query' => $TxQuery,
                    // 'meta_key'   => $MtKey,
                    // 'orderby' => $lporderby,
                    // 'order'   => $lporders,
                    'order'      => 'DESC',
                    'orderby'    => 'meta_value',
                    'meta_query' => array(
                        'relation' => 'OR',
                                $MtKey,
                                array(
                                    'relation' => 'OR',
                                    array( 
                                        'key'     => 'lp_listingpro_options',
                                        'value'   => 'lising_type_options',
                                        'compare' => 'LIKE',
                                    ),
                                    array(
                                        'key'     => 'lp_listingpro_options',
                                        'value'   => 'lising_type_options',
                                        'compare' => 'NOT LIKE',
                                    ),
                                ),
                        ),
                );

functions – What are the meta fields for an attachment?

You can easily inspect all the metadata for any post like so:

// 123 is the attachment post ID
var_dump( get_post_meta( 123 ) );

And in a default WP setup with no plugins or theme which add custom metadata to the image attachment post, the metadata you’d get are:

  • _wp_attached_file — string, the image file (path and name) for the attachment post

  • _wp_attachment_metadata — array (serialized), the sizes for the image like ‘thumbnail’ (including original size), and metadata from EXIF/IPTC info.

  • _wp_attachment_image_alt — string, the image’s alternative text

As for the other attachment post details like title, they are in the post data (in the posts database table):

  • post_title — image title

  • post_excerpt — image caption

  • post_content — image description

I will write 20 page Meta tittles and Meta description for $10

I will write 20 page Meta tittles and Meta description

Welcome to my on page SEO Gig.

On page SEO is essential for making sure your customers can easily find your website. I will write engaging meta titles and descriptions that are focused around your most important keywords and will ensure more customers click through to your website.

Title tag :-

Meta Title Tag plays a significant role in the Google positioning process. a meta title tag that contains the page title with a key impact on the site’s position in search results.

Description tag :-

Well-structured meta description tags Significantly improve the click-through of the results displayed by search engines like Google, Yahoo, and Bing.

My Services :

✅ Meta Title (60 to 70 Words)

✅ Meta Description (120 to 160 Words)

✅ Image Alter Tags

✅ Keyword Research (Optional)

Why Chose me ?

✅ Provide report & screen shot

✅ 100% satisfy guarantee

✅ If you’re not satisfied Money back guarantee

✅ 1 Month free support

✅ Timely Deliver

Note : If you have any question simply drop the message & get a reply within a second.

Looking forward to hearing from you.

.(tagsToTranslate)writting(t)content(t)SEO(t)onsiteseo(t)metatitle(t)metadescription

Extend an existing (Core) Gutenberg Block (not the meta attributes but the block it self)

I’m trying to update an existing Gutenberg Block (core/heading) to show multiple input fields. There are many tutorials that show how to add attributes (showing in the right sidebar) , but I can’t find any info on how to extend the block it self.

Can anyone explain if/ how this can be done?

What I'm trying to do

Meta query ignores multiple values of the key

I have the following post meta for posts:

_post_allowed_countries

//Example value: 
array ( 0 => 'en', 1 => 'gr', )

// A list of allowed countries

and

_post_allowed_countries_not

//Example value: 
array ( 0 => '0' )

// True/False -> If true ( '1' ), _post_allowed_countries act as disallowed countries

and this is my meta query:

array(
    'relation'              => 'OR',
    array(
        'relation'          => 'AND',
        array(
            'relation'      => 'OR',
            array(
                'key'       =>'_post_allowed_countries_not',
                'value'     => '',
                'compare'   => 'NOT EXISTS'
            ),
            array(
                'key'       =>'_post_allowed_countries_not',
                'value'     => '0',
                'compare'   => '='
            ),
        ),
        array(
            'key'       =>'_post_allowed_countries',
            'value'     => serialize('gr'),
            'compare'   => 'LIKE'
        )
    ),
    array(
        'relation'      => 'AND',
        array(
            'key'       =>'_post_allowed_countries_not',
            'value'     => '1',
            'compare'   => '='
        ),
        array(
            'key'       =>'_post_allowed_countries',
            'value'     => serialize('gr'),
            'compare'   => 'NOT LIKE'
        )
    ),
)

So basically I am trying to query all the posts that have gr as one of their allowed counties or they don’t have gr as one of their disallowed countries ( gr in reality is the current’s visitor country code ).

The problem seems to be that the meta query only checks for the first value of _post_allowed_countries. Is there any way to fix this?

Note: Yes I know it’s easier to do this with taxonomies but at this point it’s not option for me. I need to make this work with post meta.