| Server IP : 177.55.116.72 / Your IP : 216.73.217.104 Web Server : Apache System : Linux UBAPCWEB27 3.10.0-862.14.4.el7.x86_64 #1 SMP Wed Sep 26 15:12:11 UTC 2018 x86_64 User : web_hotelpraiadoc ( 3326) PHP Version : 8.2.20 Disable Function : proc_open, passthru, escapeshellcmd, exec, shell_exec, system, ini_alter, dl, popen, php_check_syntax, show_source, highlight_file, symlink, link, openlog, apache_child_terminate MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/hotelpraiadoconde.com.br/public/wp-content/plugins/pods/src/Pods/Whatsit/ |
Upload File : |
<?php
namespace Pods\Whatsit;
use Pods\Whatsit;
/**
* Legacy Object class.
*
* @since 2.8.0
*/
class Legacy_Object extends Whatsit {
/**
* {@inheritdoc}
*/
public function get_clean_args() {
$args = parent::get_clean_args();
$old_mapping = [
'name' => 'label',
'slug' => 'name',
'uri' => 'name',
'code' => 'description',
];
$new_args = [];
foreach ( $old_mapping as $old_arg => $new_arg ) {
$new_args[ $old_arg ] = '';
if ( isset( $args[ $new_arg ] ) ) {
$new_args[ $old_arg ] = $args[ $new_arg ];
unset( $args[ $new_arg ] );
}
}
return array_merge( $new_args, $args );
}
/**
* {@inheritdoc}
*/
public function get_arg( $arg, $default = null, $strict = false, $raw = false ) {
if ( $raw ) {
return parent::get_arg( $arg, $default, $strict, $raw );
}
$old_mapping = [
'name' => 'label',
'slug' => 'name',
'uri' => 'name',
'code' => 'description',
];
if ( isset( $old_mapping[ $arg ] ) ) {
$arg = $old_mapping[ $arg ];
}
return parent::get_arg( $arg, $default );
}
/**
* {@inheritdoc}
*/
public function get_name() {
// Map get_name() to the real name, so we have a way to still get to it intentionally.
if ( isset( $this->args['name'] ) ) {
return $this->args['name'];
}
return null;
}
}