�PNG  IHDR22?�� pHYs  �� OiCCPPhotoshop ICC profilexڝSgTS�=���BK���KoR RB���&*! J�!��Q�EEȠ�����Q, � ��!���������{�kּ������>���� �H3Q5� �B�������.@� $p�d!s�#�~<<+"��x� �M��0���B�\���t�8K�@z�B�@F���&S�`�cb�P-`'������{[�!�� e�Dh;��V�EX0fK�9�-0IWfH���� � 0Q��){`�##x��F�W<�+��*x��<�$9E�[-qWW.(�I+6aa�@.�y�2�4���������x����6��_-��"bb���ϫp@�t~��,/��;�m��%�h^ �u��f�@����W�p�~<�5�j>{�-�]c�K'Xt����o��(�h���w��?�G�%�fI�q^D$.Tʳ?�D��*�A��,���� �`6�B$��BB d�r`)��B(�Ͱ*`/�@4�Qh��p.�U�=p�a��(�� A�a!ڈb�X#����!�H�$ ɈQ"K�5H1R�T UH�=r9�\F��;�2����G1���Q=� �C��7�F� �dt1�����r�=�6��Ыhڏ>C�0��3�l0.��B�8, �c˱"� ���V����cϱw�E� 6wB aAHXLXN�H� $4� 7 �Q�'"��K�&���b21�XH,#��/{�C�7$�C2'��I��T��F�nR#�,��4H#���dk�9�, +ȅ����3��!�[ �b@q��S�(R�jJ��4�e�2AU��Rݨ�T5�ZB���R�Q��4u�9̓IK�����hh�i��t�ݕN��W���G���w ��Ljg(�gw��L�Ӌ�T071���oUX*�*|�� �J�&�*/T����ު U�U�T��^S}�FU3S� Ԗ�U��P�SSg�;���g�oT?�~Y��Y�L�OC�Q��_�� c�x,!k ��u�5�&���|v*�����=���9C3J3W�R�f?�q��tN �(���~���)�)�4L�1e\k����X�H�Q�G�6������E�Y��A�J'\'Gg����S�Sݧ �M=:��.�k���Dw�n��^��Lo��y���}/�T�m���G X� $� �<�5qo</���QC]�@C�a�a�ᄑ��<��F�F�i�\�$�m�mƣ&&!&KM�M�RM��)�;L;L���͢�֙5�=1�2��כ߷`ZxZ,����eI��Z�Yn�Z9Y�XUZ]�F���%ֻ�����N�N���gð�ɶ�����ۮ�m�}agbg�Ů��}�}��= ���Z~s�r:V:ޚΜ�?}����/gX���3��)�i�S��Ggg�s�󈋉K��.�>.���Ƚ�Jt�q]�z���������ۯ�6�i�ܟ�4�)�Y3s���C�Q��? ��0k߬~OCO�g��#/c/�W�װ��w��a�>�>r��>�<7�2�Y_�7��ȷ�O�o�_��C#�d�z����%g��A�[��z|!��?:�e����A���AA�������!h�쐭!��Α�i�P~���a�a��~ '���W�?�p�X�1�5w��Cs�D�D�Dޛg1O9�-J5*>�.j<�7�4�?�.fY��X�XIlK9.*�6nl������� �{�/�]py�����.,:�@L�N8��A*��%�w%� y��g"/�6ш�C\*N�H*Mz�쑼5y$�3�,幄'���L Lݛ:��v m2=:�1����qB�!M��g�g�fvˬe����n��/��k���Y- �B��TZ(�*�geWf�͉�9���+��̳�ې7�����ᒶ��KW-X潬j9�������(�x��oʿ�ܔ���Ĺd�f�f���-�[����n �ڴ �V����E�/��(ۻ��C���<��e����;?T�T�T�T6��ݵa��n��{��4���[���>ɾ�UUM�f�e�I���?�������m]�Nmq����#�׹���=TR��+�G�����w- 6 U����#pDy��� �� :�v�{���vg/jB��F�S��[b[�O�>����z�G��499�?r����C�d�&����ˮ/~�����јѡ�򗓿m|������������x31^�V���w�w��O�| (�h���SЧ��������c3-� cHRMz%������u0�`:�o�_�F5IDATx��ytUս�?�;���fN$$��@B�!�k��� -*�gE���j�O�kQ�ʠ`U�B_ �AÐ0%�Ȕ�@r3ޛ;߳��$�@��v����^�s����������$��ߢ !�W��5�̱'-٘������4�>�Rƫ$�G��0U�H}�_ _� #��k�MJ/=�9Du *ڲ�k�PQ;0��j|�*�$�^컂脛y���>�z×� B��� ��(�:$�ʔ_�6��C!B����MVx��a��ζyY����j��ƋY2�9�F�{r��r�딟F��Q��hY6��� x��[l��RC��������nt@��;P��3��� F�w��7��:�P���ɋ'���mj���Bƪ�$�Q�L��y��߷g��\���z����v5�p�v$�v櫻�`6~K �Y�X����,�:��"�o�e0II"(��,������l_�C���/4�+f�E�!q��:����u����c��樼.UE�@� �]K�W���$-�h]�JG���Dz)�`��.�A/ ���mᏣc�3jK� �!�>���$�Q�!�_�? \�C2(E �M$Z I{�U���s�ǣ���=��@Բe ޻��W�����@ �w����}�9v,)��.}*|"�s��di���,���G�]W�AC�������|<����[��ߕ������K�*�G nߴ!��‹��J�!��6(L�a)��Am��������;adf��:�xm��nh�;֦I��(���o�C~ډa?�=��s����h��E������xp����)���_���t��W�����´;8���`dz=(��@@�+,�;�`�fhl��XȌ�3,uI�~z(J����� �ZX�A����H'�À�㜦�82|��a�n�z2��I���� ���EY�h�ε<�0�q�{��C��v�˅��?"@��χ�x�WS+��N�~�KQ�J�8ل�� _.W��� !TU{�����,��"�� �;�������HI S� ��))�o�1�H�D� ���� (� ;����"Ҕ��,���� �F=���O��&�Ph>�`���y��߲ &S��P�<��'��1s�1cĂ�N����2)����@�u��tv��<�+�-&�����h��[!FSG���' � z z0��<����8d&�����E0�,��<��"!P�b4��� �{S�����X����.�囤���T��hEF��X�q0"-<����h���]�Py*����F⩍��@v�˂�Y08�� .q��a��s����(!<̫1�3�L�H��7sYW�`��qtu�\7��?�@�Y�� %Ka�x�GZ�*W�P��y�����N0r9��Z�c�%���q,��k�����!!,��>���IB��� �x1�Xu�Y���v-���ֺ��N������JP��a�2`�e5��w��u;�6�i���̃��(K���ťa��(l51��JL��O'%���]���ٖ뿉!��{*�p+f ���i8��D�ȑ���ܩ�M��V��ӟz��x�7Z�1i}�^͜���6e����x��)u�d�ˏ�V�eG�\�X1�����=n�U'�~Y����L�\,�(d!x ,�:�TW8� M`r���@��r+v�Q0��>^;˴�VbF��('����� �*O��i��j�Ӆ����^�S3&� ���{������.ی�� N;��NU%d0�Ce\r"�C�b��&t7N�7��� �ȪD�[%l�۪�$��'m?�A9tI�9>��NVL ��� 6v~M�����ъ�B���0����9$&=ώm��W�0���L���&��E���f�f��'+�9��hv��7,���M��6�D�&�^� �����8 D֮�����o��k^z��O��hP�8q�5d*��YVq3�{��������#LX4�?��jP=3�~�؅c�ݰ�̱�ұ��8̲��2�G�����j��έ�9��w7���U�X�w�85C��?!I&���o&����L���I#�^�eV�,�^t5�k� �xs˛\��U�8��."���{���ǵ�l4��ݼ�;��r"���G�/~���gJV�N糦��ZZ^k+NN�D��I$�=OE�z����|*�*{��%k���G��>�`9��b;�s���8,�qs��c��.b��q�%�>r��n�R�Ƨ�%�,�A��le#�8���}; 21�0�b�&�QX�f���q�00����$>�h�N�'�a3��A���/�r ��L5�8�GԲ'�����w;��c#�q1���h$*��V^�k��QĽ�b:i������� ����H F#�_���,��]g����Ը����`RUU���� ��"�qD���>-��ϤI�~��3�̴�����NZ[[555�eeek7�m����YF#[��Đ��R��i��L�H�r ��@��J-�Pŝ��_|�-��6y��ks�V�U~��6���w.����(��0A� 4��f��� /���C�xŊ�ٳ����z=6�����rg���mKo��o�/����a�g���?'9%9��P��斓��~���L{�� �H��{AW��B��$����v�1b�&Mb�ر��ر#�0`�`xMBp! )Z�Nmo�mZ�g�}�eذaWTVV ���'99��C5��&�&+5�bT>|8��PUUETT����&���t��~TE%��'������b�tEGG;RSS�S�N�v��ѯ��t����u1@�ޚ"f��͈���r'L�Ph��m��ƌ�74o��`�x�q�P���NRSS�X,�����l&&&��MFFA!-��`��ҷ�n��Yuu�����x<I�LB%����KԒ50�!�3�bz�����ʸKL���;---�l6[��`��������Ȏ;�����egg4��!D�T��jWujyZ��������K����%����p�^���X,6��sV=�ܖ����6�3�X ���4ҿ��A2�&����_k�;d�� �VfOIEND�B`�
Warning: session_start(): Session cannot be started after headers have already been sent in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 124

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 130

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 131

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 132

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 133

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 134

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 135

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 547

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 548

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 549

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 550

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 551
links ) ) { return empty( $args['raw'] ) ? '' : array(); } $switcher = new PLL_Switcher(); return $switcher->the_languages( PLL()->links, $args ); } /** * Returns the current language on frontend. * Returns the language set in admin language filter on backend (false if set to all languages). * * @api * @since 0.8.1 * @since 3.4 Accepts composite values. * * @param string $field Optional, the language field to return (@see PLL_Language), defaults to `'slug'`. * Pass `\OBJECT` constant to get the language object. A composite value can be used for language * term property values, in the form of `{language_taxonomy_name}:{property_name}` (see * {@see PLL_Language::get_tax_prop()} for the possible values). Ex: `term_language:term_taxonomy_id`. * @return string|int|bool|string[]|PLL_Language The requested field or object for the current language, `false` if the field isn't set or if current language doesn't exist yet. * * @phpstan-return ( * $field is \OBJECT ? PLL_Language : ( * $field is 'slug' ? non-empty-string : string|int|bool|list * ) * )|false */ function pll_current_language( $field = 'slug' ) { if ( empty( PLL()->curlang ) ) { return false; } if ( \OBJECT === $field ) { return PLL()->curlang; } return PLL()->curlang->get_prop( $field ); } /** * Returns the default language. * * @api * @since 1.0 * @since 3.4 Accepts composite values. * * @param string $field Optional, the language field to return (@see PLL_Language), defaults to `'slug'`. * Pass `\OBJECT` constant to get the language object. A composite value can be used for language * term property values, in the form of `{language_taxonomy_name}:{property_name}` (see * {@see PLL_Language::get_tax_prop()} for the possible values). Ex: `term_language:term_taxonomy_id`. * @return string|int|bool|string[]|PLL_Language The requested field or object for the default language, `false` if the field isn't set or if default language doesn't exist yet. * * @phpstan-return ( * $field is \OBJECT ? PLL_Language : ( * $field is 'slug' ? non-empty-string : string|int|bool|list * ) * )|false */ function pll_default_language( $field = 'slug' ) { $lang = PLL()->model->get_default_language(); if ( empty( $lang ) ) { return false; } if ( \OBJECT === $field ) { return $lang; } return $lang->get_prop( $field ); } /** * Among the post and its translations, returns the ID of the post which is in the language represented by $lang. * * @api * @since 0.5 * @since 3.4 Returns `0` instead of `false` if not translated or if the post has no language. * @since 3.4 $lang accepts `PLL_Language` or string. * * @param int $post_id Post ID. * @param PLL_Language|string $lang Optional language (object or slug), defaults to the current language. * @return int The translation post ID if exists. 0 if not translated, the post has no language or if the language doesn't exist. * * @phpstan-return int<0, max> */ function pll_get_post( $post_id, $lang = '' ) { $lang = $lang ?: pll_current_language(); if ( empty( $lang ) ) { return 0; } return PLL()->model->post->get( $post_id, $lang ); } /** * Among the term and its translations, returns the ID of the term which is in the language represented by $lang. * * @api * @since 0.5 * @since 3.4 Returns `0` instead of `false` if not translated or if the term has no language. * @since 3.4 $lang accepts PLL_Language or string. * * @param int $term_id Term ID. * @param PLL_Language|string $lang Optional language (object or slug), defaults to the current language. * @return int The translation term ID if exists. 0 if not translated, the term has no language or if the language doesn't exist. * * @phpstan-return int<0, max> */ function pll_get_term( $term_id, $lang = '' ) { $lang = $lang ?: pll_current_language(); if ( empty( $lang ) ) { return 0; } return PLL()->model->term->get( $term_id, $lang ); } /** * Returns the home url in a language. * * @api * @since 0.8 * * @param string $lang Optional language code, defaults to the current language. * @return string */ function pll_home_url( $lang = '' ) { if ( empty( $lang ) ) { $lang = pll_current_language(); } if ( empty( $lang ) || empty( PLL()->links ) ) { return home_url( '/' ); } return PLL()->links->get_home_url( $lang ); } /** * Registers a string for translation in the "strings translation" panel. * * @api * @since 0.6 * * @param string $name A unique name for the string. * @param string $string The string to register. * @param string $context Optional, the group in which the string is registered, defaults to 'polylang'. * @param bool $multiline Optional, true if the string table should display a multiline textarea, * false if should display a single line input, defaults to false. * @return void */ function pll_register_string( $name, $string, $context = 'Polylang', $multiline = false ) { if ( PLL() instanceof PLL_Admin_Base ) { PLL_Admin_Strings::register_string( $name, $string, $context, $multiline ); } } /** * Translates a string ( previously registered with pll_register_string ). * * @api * @since 0.6 * * @param string $string The string to translate. * @return string The string translated in the current language. */ function pll__( $string ) { if ( ! is_scalar( $string ) || '' === $string ) { return $string; } return __( $string, 'pll_string' ); // PHPCS:ignore WordPress.WP.I18n } /** * Translates a string ( previously registered with pll_register_string ) and escapes it for safe use in HTML output. * * @api * @since 2.1 * * @param string $string The string to translate. * @return string The string translated in the current language. */ function pll_esc_html__( $string ) { return esc_html( pll__( $string ) ); } /** * Translates a string ( previously registered with pll_register_string ) and escapes it for safe use in HTML attributes. * * @api * @since 2.1 * * @param string $string The string to translate. * @return string The string translated in the current language. */ function pll_esc_attr__( $string ) { return esc_attr( pll__( $string ) ); } /** * Echoes a translated string ( previously registered with pll_register_string ) * It is an equivalent of _e() and is not escaped. * * @api * @since 0.6 * * @param string $string The string to translate. * @return void */ function pll_e( $string ) { echo pll__( $string ); // phpcs:ignore } /** * Echoes a translated string ( previously registered with pll_register_string ) and escapes it for safe use in HTML output. * * @api * @since 2.1 * * @param string $string The string to translate. * @return void */ function pll_esc_html_e( $string ) { echo pll_esc_html__( $string ); // phpcs:ignore WordPress.Security.EscapeOutput } /** * Echoes a translated a string ( previously registered with pll_register_string ) and escapes it for safe use in HTML attributes. * * @api * @since 2.1 * * @param string $string The string to translate. * @return void */ function pll_esc_attr_e( $string ) { echo pll_esc_attr__( $string ); // phpcs:ignore WordPress.Security.EscapeOutput } /** * Translates a string ( previously registered with pll_register_string ). * * @api * @since 1.5.4 * * @param string $string The string to translate. * @param string $lang Language code. * @return string The string translated in the requested language. */ function pll_translate_string( $string, $lang ) { if ( PLL() instanceof PLL_Frontend && pll_current_language() === $lang ) { return pll__( $string ); } if ( ! is_scalar( $string ) || '' === $string ) { return $string; } $lang = PLL()->model->get_language( $lang ); if ( empty( $lang ) ) { return $string; } $mo = new PLL_MO(); $mo->import_from_db( $lang ); return $mo->translate( $string ); } /** * Returns true if Polylang manages languages and translations for this post type. * * @api * @since 1.0.1 * * @param string $post_type Post type name. * @return bool */ function pll_is_translated_post_type( $post_type ) { return PLL()->model->is_translated_post_type( $post_type ); } /** * Returns true if Polylang manages languages and translations for this taxonomy. * * @api * @since 1.0.1 * * @param string $tax Taxonomy name. * @return bool */ function pll_is_translated_taxonomy( $tax ) { return PLL()->model->is_translated_taxonomy( $tax ); } /** * Returns the list of available languages. * * @api * @since 1.5 * * @param array $args { * Optional array of arguments. * * @type bool $hide_empty Hides languages with no posts if set to true ( defaults to false ). * @type string $fields Return only that field if set ( @see PLL_Language for a list of fields ), defaults to 'slug'. * } * @return string[] */ function pll_languages_list( $args = array() ) { $args = wp_parse_args( $args, array( 'fields' => 'slug' ) ); $hide_empty = ! empty( $args['hide_empty'] ) ? 'hide_empty' : ''; $hide_default = ! empty( $args['hide_default'] ) ? 'hide_default' : ''; unset( $args['hide_empty'], $args['hide_default'] ); return PLL()->model->languages ->filter( $hide_empty ) ->filter( $hide_default ) ->get_list( $args ); } /** * Sets the post language. * * @api * @since 1.5 * @since 3.4 $lang accepts PLL_Language or string. * @since 3.4 Returns a boolean. * * @param int $id Post ID. * @param PLL_Language|string $lang Language (object or slug). * @return bool True when successfully assigned. False otherwise (or if the given language is already assigned to * the post). */ function pll_set_post_language( $id, $lang ) { return PLL()->model->post->set_language( $id, $lang ); } /** * Sets the term language. * * @api * @since 1.5 * @since 3.4 $lang accepts PLL_Language or string. * @since 3.4 Returns a boolean. * * @param int $id Term ID. * @param PLL_Language|string $lang Language (object or slug). * @return bool True when successfully assigned. False otherwise (or if the given language is already assigned to * the term). */ function pll_set_term_language( $id, $lang ) { return PLL()->model->term->set_language( $id, $lang ); } /** * Save posts translations. * * @api * @since 1.5 * @since 3.4 Returns an associative array of translations. * * @param int[] $arr An associative array of translations with language code as key and post ID as value. * @return int[] An associative array with language codes as key and post IDs as values. * * @phpstan-return array */ function pll_save_post_translations( $arr ) { $id = reset( $arr ); if ( $id ) { return PLL()->model->post->save_translations( $id, $arr ); } return array(); } /** * Save terms translations * * @api * @since 1.5 * @since 3.4 Returns an associative array of translations. * * @param int[] $arr An associative array of translations with language code as key and term ID as value. * @return int[] An associative array with language codes as key and term IDs as values. * * @phpstan-return array */ function pll_save_term_translations( $arr ) { $id = reset( $arr ); if ( $id ) { return PLL()->model->term->save_translations( $id, $arr ); } return array(); } /** * Returns the post language. * * @api * @since 1.5.4 * @since 3.4 Accepts composite values for `$field`. * * @param int $post_id Post ID. * @param string $field Optional, the language field to return (@see PLL_Language), defaults to `'slug'`. * Pass `\OBJECT` constant to get the language object. A composite value can be used for language * term property values, in the form of `{language_taxonomy_name}:{property_name}` (see * {@see PLL_Language::get_tax_prop()} for the possible values). Ex: `term_language:term_taxonomy_id`. * @return string|int|bool|string[]|PLL_Language The requested field or object for the post language, `false` if no language is associated to that post. * * @phpstan-return ( * $field is \OBJECT ? PLL_Language : ( * $field is 'slug' ? non-empty-string : string|int|bool|list * ) * )|false */ function pll_get_post_language( $post_id, $field = 'slug' ) { $lang = PLL()->model->post->get_language( $post_id ); if ( empty( $lang ) || \OBJECT === $field ) { return $lang; } return $lang->get_prop( $field ); } /** * Returns the term language. * * @api * @since 1.5.4 * @since 3.4 Accepts composite values for `$field`. * * @param int $term_id Term ID. * @param string $field Optional, the language field to return (@see PLL_Language), defaults to `'slug'`. * Pass `\OBJECT` constant to get the language object. A composite value can be used for language * term property values, in the form of `{language_taxonomy_name}:{property_name}` (see * {@see PLL_Language::get_tax_prop()} for the possible values). Ex: `term_language:term_taxonomy_id`. * @return string|int|bool|string[]|PLL_Language The requested field or object for the post language, `false` if no language is associated to that term. * * @phpstan-return ( * $field is \OBJECT ? PLL_Language : ( * $field is 'slug' ? non-empty-string : string|int|bool|list * ) * )|false */ function pll_get_term_language( $term_id, $field = 'slug' ) { $lang = PLL()->model->term->get_language( $term_id ); if ( empty( $lang ) || \OBJECT === $field ) { return $lang; } return $lang->get_prop( $field ); } /** * Returns an array of translations of a post. * * @api * @since 1.8 * * @param int $post_id Post ID. * @return int[] An associative array of translations with language code as key and translation post ID as value. * * @phpstan-return array */ function pll_get_post_translations( $post_id ) { return PLL()->model->post->get_translations( $post_id ); } /** * Returns an array of translations of a term. * * @api * @since 1.8 * * @param int $term_id Term ID. * @return int[] An associative array of translations with language code as key and translation term ID as value. * * @phpstan-return array */ function pll_get_term_translations( $term_id ) { return PLL()->model->term->get_translations( $term_id ); } /** * Counts posts in a language. * * @api * @since 1.5 * * @param string $lang Language code. * @param array $args { * Optional array of arguments. * * @type string $post_type Post type. * @type int $m YearMonth ( ex: 201307 ). * @type int $year 4 digit year. * @type int $monthnum Month number (from 1 to 12). * @type int $day Day of the month (from 1 to 31). * @type int $author Author id. * @type string $author_name Author nicename. * @type string $post_format Post format. * @type string $post_status Post status. * } * @return int Posts count. */ function pll_count_posts( $lang, $args = array() ) { $lang = PLL()->model->get_language( $lang ); if ( empty( $lang ) ) { return 0; } return PLL()->model->count_posts( $lang, $args ); } /** * Wraps `wp_insert_post` with language feature. * * @since 3.7 * * @param array $postarr { * An array of elements that make up a post to insert. * @See https://developer.wordpress.org/reference/functions/wp_insert_post/ wp_insert_post() for accepted arguments. * * @type string[] $translations The translation group to assign to the post with language slug as keys and post ID as values. * } * @param PLL_Language|string $language The post language object or slug. * @return int|WP_Error The post ID on success. The value `WP_Error` on failure. */ function pll_insert_post( array $postarr, $language ) { $language = PLL()->model->get_language( $language ); if ( ! $language instanceof PLL_Language ) { return new WP_Error( 'invalid_language', __( 'Please provide a valid language.', 'polylang' ) ); } return PLL()->model->post->insert( $postarr, $language ); } /** * Wraps `wp_insert_term` with language feature. * * @since 3.7 * * @param string $term The term name to add. * @param string $taxonomy The taxonomy to which to add the term. * @param PLL_Language|string $language The term language object or slug. * @param array $args { * Optional. Array of arguments for inserting a term. * * @type string $alias_of Slug of the term to make this term an alias of. * Default empty string. Accepts a term slug. * @type string $description The term description. Default empty string. * @type int $parent The id of the parent term. Default 0. * @type string $slug The term slug to use. Default empty string. * @type string[] $translations The translation group to assign to the term with language slug as keys and `term_id` as values. * } * @return array|WP_Error { * An array of the new term data, `WP_Error` otherwise. * * @type int $term_id The new term ID. * @type int|string $term_taxonomy_id The new term taxonomy ID. Can be a numeric string. * } */ function pll_insert_term( string $term, string $taxonomy, $language, array $args = array() ) { $language = PLL()->model->get_language( $language ); if ( ! $language instanceof PLL_Language ) { return new WP_Error( 'invalid_language', __( 'Please provide a valid language.', 'polylang' ) ); } return PLL()->model->term->insert( $term, $taxonomy, $language, $args ); } /** * Wraps `wp_update_post` with language feature. * * @since 3.7 * * @param array $postarr { * Optional. An array of elements that make up a post to update. * @See https://developer.wordpress.org/reference/functions/wp_insert_post/ wp_insert_post() for accepted arguments. * * @type PLL_Language|string $lang The post language object or slug. * @type string[] $translations The translation group to assign to the post with language slug as keys and post ID as values. * } * @return int|WP_Error The post ID on success. The value `WP_Error` on failure. */ function pll_update_post( array $postarr ) { return PLL()->model->post->update( $postarr ); } /** * Wraps `wp_update_term` with language feature. * * @since 3.7 * * @param int $term_id The ID of the term. * @param array $args { * Optional. Array of arguments for updating a term. * * @type string $alias_of Slug of the term to make this term an alias of. * Default empty string. Accepts a term slug. * @type string $description The term description. Default empty string. * @type int $parent The id of the parent term. Default 0. * @type string $slug The term slug to use. Default empty string. * @type string $name The term name. * @type PLL_Language|string $lang The term language object or slug. * @type string[] $translations The translation group to assign to the term with language slug as keys and `term_id` as values. * } * @return array|WP_Error { * An array containing the `term_id` and `term_taxonomy_id`, `WP_Error` otherwise. * * @type int $term_id The new term ID. * @type int|string $term_taxonomy_id The new term taxonomy ID. Can be a numeric string. * } */ function pll_update_term( int $term_id, array $args = array() ) { return PLL()->model->term->update( $term_id, $args ); } /** * Allows to access the Polylang instance. * However, it is always preferable to use API functions * as internal methods may be changed without prior notice. * * @since 1.8 * * @return PLL_Frontend|PLL_Admin|PLL_Settings|PLL_REST_Request */ function PLL() { // PHPCS:ignore WordPress.NamingConventions.ValidFunctionName return $GLOBALS['polylang']; }