| Server IP : 43.130.17.34 / Your IP : 216.73.217.6 Web Server : nginx/1.28.0 System : Linux VM-4-12-opencloudos 6.6.92-34.1.oc9.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jun 25 21:32:13 CST 2025 x86_64 User : www ( 1000) PHP Version : 8.0.26 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,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_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /www/wwwroot/yespkg.com/wp-content/plugins/elementor-pro/modules/posts/traits/ |
Upload File : |
<?php
namespace ElementorPro\Modules\Posts\Traits;
use ElementorPro\Modules\Posts\Widgets\Posts_Base;
use ElementorPro\Plugin;
use ElementorPro\Core\Utils;
use Elementor\Controls_Manager;
use Elementor\Core\Base\Document;
trait Query_Note_Trait {
public function is_editing_archive_template() {
if ( Plugin::elementor()->documents->get_current() ) {
$id = Utils::get_current_post_id();
} else {
$id = get_the_ID();
}
return 'archive' === get_post_meta( $id, Document::TYPE_META_KEY, true );
}
public function inject_archive_query_note( $placement_id, $condition_id, $widget ) {
$archive_setting_url = admin_url( 'options-reading.php' );
$widget->start_injection( [
'of' => $placement_id,
'at' => 'before',
] );
$widget->add_control(
'archive_query_note',
[
'type' => Controls_Manager::RAW_HTML,
'raw' => sprintf(
esc_html__( 'The amount of items displayed in your Archive is set in your WordPress settings. %s', 'elementor-pro' ),
'<a target="_blank" href="' . esc_url( $archive_setting_url ) . '">' . esc_html__( 'Take me there', 'elementor-pro' ) . '</a>'
),
'content_classes' => 'elementor-descriptor',
'condition' => [
$condition_id => 'current_query',
],
]
);
$widget->end_injection();
}
}