HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux vm8 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: afleverb (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //var/www/mussarq_bak/wp-content/themes/wpnull24/framework/plugins-support/polylang.php
<?php defined( 'ABSPATH' ) OR die( 'This script cannot be accessed directly.' );

/**
 * polylang Support
 *
 * @link https://polylang.pro/
 */

 if (! (function_exists ( 'pll_languages_list' ))) {
 	return;
 }
 if ( pll_current_language() != pll_default_language() ) {
   	global $pagenow;
   	// Exception: do not add class on Theme Options page
   	if ( ! ( ( $pagenow == 'admin.php' ) AND ( $_GET['page'] == 'us-theme-options' ) ) ) {
   		function us_admin_add_wpml_nondefault_class( $class ) {
   			return $class . ' us_wpml_non_default';
   		}

   		add_filter( 'admin_body_class', 'us_admin_add_wpml_nondefault_class' );
   	} else {
   		// For Theme Options page adding redirect to default language
   		wp_redirect( admin_url() . 'admin.php?page=us-theme-options&lang=' . pll_default_language() );
   	}
  }
 function  cpt__labels ( $cpts ) {
   $args = array(
 		'public' => TRUE,
 		'publicly_queryable' => TRUE,
 		'_builtin' => FALSE,
 	);
 	$types = get_post_types( $args, 'objects' );
   if ( ! empty ( $types ) AND  function_exists ( 'pll_register_string' ))     {
 		foreach ( $types as $type ){
 		pll_register_string ( 'themes' , $type->name );
 		pll_register_string ( 'themes' , $type->label );
             if ( ! empty ( $type->description )) {
                 pll_register_string ( 'themes' , $type->description);
             }
             foreach ( $type->labels as  $label ) {
                 pll_register_string ( 'themes' , $label );
             }
         }
     }
     return  $cpts ;
 }

add_action('init', 'cpt__labels');