Apple_Exporter\Components\Image::find_caption_alignment PHP Method

find_caption_alignment() private method

Find the caption alignment to use.
private find_caption_alignment ( ) : string
return string
    private function find_caption_alignment()
    {
        $text_alignment = null;
        if (Component::ANCHOR_NONE == $this->get_anchor_position()) {
            return 'center';
        }
        switch ($this->get_anchor_position()) {
            case Component::ANCHOR_LEFT:
                return 'left';
            case Component::ANCHOR_AUTO:
                if ('left' == $this->get_setting('body_orientation')) {
                    return 'right';
                }
        }
        return 'left';
    }