Render the pdf_sectionopenings radio buttons.

@param array $args
541195
function renderSectionOpeningsField( $args ) {
		unset( $args['label_for'], $args['class'] );
		$this->renderRadioButtons(
			[
				'id' => 'pdf_sectionopenings',
				'name' => 'pressbooks_theme_options_' . $this->getSlug(),
				'option' => 'pdf_sectionopenings',
				'value' => getset( $this->options, 'pdf_sectionopenings' ),
				'choices' => $args,
			]
		);
	}
979815
private function _renderArgs($args = [])
    {
        return '('.
            implode(',', array_map(function ($arg) {
                if ($arg instanceof jsExpressionable) {
                    return $arg->jsRender();
                }

                return $this->_json_encode($arg);
            }, $args)).
            ')';
    }
1135238
public function render(array $arguments = [], $renderer = null) {
        if(empty($this->itemsToDisplay)) {
            return $this->button->render($arguments);
        }

        return $this->baseRender($arguments, $renderer);
    }
1347667
function renderHyphenationField( $args ) {
		unset( $args['label_for'], $args['class'] );
		$this->renderCheckbox(
			[
				'id' => 'pdf_hyphens',
				'name' => 'pressbooks_theme_options_' . $this->getSlug(),
				'option' => 'pdf_hyphens',
				'value' => getset( $this->options, 'pdf_hyphens' ),
				'label' => $args[0],
			]
		);
	}
1300606
protected function callStringCallback($callback, $args = [])
    {
        if (strpos($callback, '@')) {
            list($klass, $method) = explode('@', $callback);
        } else {
            $klass  = $callback;
            $method = 'render';
        }

        $klass = isset($this->instantiatedWidgets[$klass]) ? $this->instantiatedWidgets[$klass] : new $klass;

        return call_user_func_array([$klass, $method], $args);
    }
1158398
function renderRunningContentPartRightField( $args ) {
		unset( $args['label_for'], $args['class'] );
		$this->renderCustomSelect(
			[
				'id' => 'running_content_part_right',
				'name' => 'running_content_part_right',
				'value' => getset( $this->options, 'running_content_part_right' ),
				'choices' => $args,
			]
		);
		$this->renderField(
			[
				'id' => 'running_content_part_right_custom',
				'name' => 'pressbooks_theme_options_' . $this->getSlug(),
				'option' => 'running_content_part_right',
				'value' => getset( $this->options, 'running_content_part_right' ),
				'type' => 'text',
				'class' => 'regular-text code',
			]
		);
	}
1081921
function renderAllowRootApi( $args ) {
		$options = get_site_option( $this->getSlug() );
		$this->renderCheckbox(
			[
				'id' => 'enable_network_api',
				'name' => $this->getSlug(),
				'option' => 'enable_network_api',
				'value' => ( isset( $options['enable_network_api'] ) ) ? $options['enable_network_api'] : '',
				'label' => $args[0],
			]
		);
	}
537238
function renderCollapseSections( $args ) {
		unset( $args['label_for'], $args['class'] );
		$this->renderCheckbox(
			[
				'id' => 'collapse_sections',
				'name' => 'pressbooks_theme_options_' . $this->getSlug(),
				'option' => 'collapse_sections',
				'value' => ( isset( $this->options['part_title'] ) ) ? $this->options['collapse_sections'] : '',
				'label' => $args[0],
			]
		);
	}
57526
function renderBodyFontSizeField( $args ) {
		unset( $args['label_for'], $args['class'] );
		$this->renderField(
			[
				'id' => 'pdf_body_font_size',
				'name' => 'pressbooks_theme_options_' . $this->getSlug(),
				'option' => 'pdf_body_font_size',
				'value' => ( isset( $this->options['pdf_body_font_size'] ) ) ? $this->options['pdf_body_font_size'] : $this->defaults['pdf_body_font_size'],
				'description' => $args[0],
				'append' => $args[1],
				'type' => 'text',
				'class' => 'small-text',
			]
		);
	}
932470
protected function render(Args $args)
    {
        $format = $this->registry->get(
            sprintf(
                'format/%s/%s',
                $this->registry->get('env'),
                self::$reverseLevel[$args->get('level')]
            ),
            self::DEFAULT_FORMAT
        );
        $backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 5);
        $message = str_replace(
            [
                '%DATE%',
                '%TIME%',
                '%LEVEL%',
                '%SOURCE%',
                '%FILE%',
                '%LINE%',
                '%MESSAGE%',
            ],
            [
                date('Y-m-d'),
                date('H:i:s'),
                self::$levelToString[$args->get('level')],
                $args->get('source'),
                $backtrace[4]['file'],
                $backtrace[4]['line'],
                $args->get('message')
            ],
            $format
        );

        return $message;
    }
474664
function renderThemeLockField( $args ) {
		$this->renderCheckbox(
			[
				'id' => 'theme_lock',
				'name' => $this->getSlug(),
				'option' => 'theme_lock',
				'value' => ( isset( $this->options['theme_lock'] ) ) ? $this->options['theme_lock'] : '',
				'label' => $args[0],
				'description' => __( 'This will prevent any changes to your book&rsquo;s appearance and page count when themes are updated.', 'pressbooks' ),
			]
		);
	}
599078
public function textareaRow(array $args = [])
    {
        $default_args = [
            // Required.
            'label' => '',

            // Suggested.
            'tip' => '',

            // Required.
            'name'  => '',
            'value' => '',

            // Optional.
            'placeholder' => '',
            'note'        => '',

            // Optional.
            'class' => '',
            'style' => '',
            'attrs' => '',

            // Optional.
            'if' => '',
        ];
        if (!array_key_exists('value', $args)) {
            throw $this->c::issue('Missing `value` key.');
        }
        $cfg = array_merge($default_args, $args);
        $cfg = array_intersect_key($cfg, $default_args);
        $cfg = array_map('strval', $cfg);

        if (!$cfg['name']) {
            throw $this->c::issue('Arg `name` is required.');
        }
        $cfg['var_name'] = $cfg['name']; // Internal copy.
        $cfg['id']       = $this->elementId($cfg['var_name']);
        $cfg['name']     = $this->elementName($cfg['var_name']);
        $cfg['class']    = $this->c::mbTrim($cfg['class'].' '.$this->elementClass($cfg['var_name']));

        $cfg['tip']  = $cfg['tip'] ? $this->s::menuPageTip($cfg['tip']) : '';
        $cfg['note'] = $cfg['note'] ? $this->s::menuPageNote($cfg['note']) : '';

        $markup = '<tr'.($cfg['if'] ? ' data-if="'.esc_attr($cfg['if']).'"' : '').'>';

        if ($cfg['label']) {
            $markup .= '<th scope="row">';
            $markup .= '<div>'; // For positioning.
            $markup .= $cfg['tip'];
            $markup .= '<label for="'.esc_attr($cfg['id']).'" title="'.esc_attr($cfg['label']).'">'.
                            $cfg['label'].
                       '</label>';
            $markup .= '</div>';
            $markup .= '</th>';
        }
        $markup .= '<td'.(!$cfg['label'] ? ' colspan="2"' : '').'>';
        $markup .= '<div>'; // For positioning.
        $markup .= '<textarea'.
                        ' name="'.esc_attr($cfg['name']).'" id="'.esc_attr($cfg['id']).'"'.
                        ' class="'.esc_attr($cfg['class']).'" style="'.esc_attr($cfg['style']).'"'.
                        ' placeholder="'.esc_attr($cfg['placeholder']).'" autocomplete="new-password"'.
                        ($cfg['attrs'] ? ' '.$cfg['attrs'] : '').
                        '>'.esc_textarea($cfg['value']).'</textarea>';
        $markup .= $cfg['note'];
        $markup .= '</div>';
        $markup .= '</td>';

        $markup .= '</tr>';

        return $markup;
    }
390796
protected function renderRaw($content, $args = array(), $templateDir = null)
    {
        if (\is_array($content)) {
            $content = json_encode($content);
        }

        return $content;
    }
381936
public static function the_comments_pagination( $args = array() ) {
		?>
		<div class="c-pagination">
			<?php
			ob_start();

			$args = array_merge(
				$args,
				[
					'prev_text' => '<i class="fa fa-angle-left" aria-hidden="true"></i>',
					'next_text' => '<i class="fa fa-angle-right" aria-hidden="true"></i>',
				]
			);

			the_comments_pagination( $args );

			self::_sanitize_pagination_e( self::pagination( ob_get_clean() ) );
			?>
		</div>
		<?php
	}
1190508
function renderPartLabelField( $args ) {
		unset( $args['label_for'], $args['class'] );
		$this->renderField(
			[
				'id' => 'part_label',
				'name' => 'pressbooks_theme_options_' . $this->getSlug(),
				'option' => 'part_label',
				'value' => getset( $this->options, 'part_label' ),
				'description' => $args[0],
				'type' => 'text',
				'class' => 'regular-text',
			]
		);
	}
332817
function renderRunningContentChapterRightField( $args ) {
		unset( $args['label_for'], $args['class'] );
		$this->renderCustomSelect(
			[
				'id' => 'running_content_chapter_right',
				'name' => 'running_content_chapter_right',
				'value' => getset( $this->options, 'running_content_chapter_right' ),
				'choices' => $args,
			]
		);
		$this->renderField(
			[
				'id' => 'running_content_chapter_right_custom',
				'name' => 'pressbooks_theme_options_' . $this->getSlug(),
				'option' => 'running_content_chapter_right',
				'value' => getset( $this->options, 'running_content_chapter_right' ),
				'type' => 'text',
				'class' => 'regular-text code',
			]
		);
	}
1135051
protected function renderTemplateString( $template, array $args = [] )
	{
		foreach( $args as $key => $value ) {
			$template = str_replace( '{'.$key.'}', $value, $template );
		}
		return trim( $template );
	}