HEX
Server: Apache/2.4.25
System: Linux ion14 4.9.0-8-amd64 #1 SMP Debian 4.9.144-3.1 (2019-02-19) x86_64
User: (10087)
PHP: 7.4.30
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,system, exec, shell_exec, passthru, popen, proc_open
Upload Files
File: /home/www/web115/wordpress/wp-content/plugins/digimember/system/controller/post/meta.php
<?php

class ncore_PostMetaController extends ncore_Controller
{
    public function cbMetaBoxInit( $post, $meta )
    {
        $this->post = $post;

        $this->dispatch();
    }

    public function dispatch()
    {
        if ($this->readAccessGranted())
        {
            $this->api->load->helper( 'xss_prevention' );
            echo ncore_XssPasswordHiddenInput();

            $this->view();
        }
    }

    public function cbMetaBoxSave( $post_id )
    {
        $this->post = get_post( $post_id );

        if ($this->writeAccessGranted())
        {
            $this->handleRequest();
        }
    }

    public function isActive()
    {
        return true;
    }

    protected function getPostId()
    {
        return ncore_retrieve( $this->post, 'ID' );
    }

    protected function writeAccessGranted()
    {
        if (!parent::writeAccessGranted())
        {
            return false;
        }

        $this->api->load->helper( 'xss_prevention' );

        if (!ncore_XssPasswordVerified())
        {
            return false;
        }

        $post_id = $this->getPostId();
        $post_type = $this->getPostType();

        switch ($post_type)
        {
            case 'page':
                return current_user_can( 'edit_page', $post_id );

            case 'post':
            default:
                return current_user_can( 'edit_post', $post_id );
        }
    }

    protected function getPostType()
    {
        return ncore_retrieve( $this->post, 'post_type' );
    }

    protected function getPost()
    {
        return $this->post;
    }

    private $post;

}