%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /dom495844/wp-content/plugins/coblocks/includes/
Upload File :
Create Path :
Current File : /dom495844/wp-content/plugins/coblocks/includes/class-coblocks-site-content.php

<?php
/**
 * CoBlocks Site Content
 *
 * @package CoBlocks
 */

defined( 'ABSPATH' ) || exit;

/**
 * Site_Content
 *
 * @package CoBlocks
 * @author  GoDaddy
 */
class CoBlocks_Site_Content {

	/**
	 * Class constructor
	 */
	public function __construct() {

		add_action( 'init', array( $this, 'register_settings' ), 11 );
		add_filter( 'wp_insert_post_empty_content', array( $this, 'allow_empty_post_content' ), 10, 2 );

	}

	/**
	 * Filters whether the post should be considered "empty".
	 *
	 * @see wp_insert_post()
	 *
	 * @param bool  $maybe_empty Whether the post should be considered "empty".
	 * @param array $postarr     Array of post data.
	 */
	public function allow_empty_post_content( $maybe_empty, $postarr ) {
		$post_type = empty( $postarr['post_type'] ) ? 'post' : $postarr['post_type'];

		return in_array( $post_type, array( 'post', 'page' ), true )
			? false // Allow empty title, content, and excerpt.
			: $maybe_empty;
	}

	/**
	 * Retreive the available post types
	 */
	private function get_page_nav_post_types() {

		$post_types = get_post_types();
		$white_list = array(
			'page' => 'pages',
		);

		foreach ( $post_types as $post_type_slug ) {

			if ( ! array_key_exists( $post_type_slug, $white_list ) ) {
				unset( $post_types[ $post_type_slug ] );
				continue;
			}

			$post_type_obj = get_post_type_object( $post_type_slug );

			$post_types[ $white_list[ $post_type_slug ] ] = $post_type_obj->label;
			unset( $post_types[ $post_type_slug ] );
		}

		ksort( $post_types );

		return $post_types;

	}

	/**
	 * Register core site settings for Site Content
	 */
	public function register_settings() {
		register_setting(
			'reading',
			'show_on_front',
			array(
				'show_in_rest' => true,
				'type'         => 'string',
				'description'  => __( 'What to show on the front page', 'gutenberg' ),
			)
		);

		register_setting(
			'reading',
			'page_on_front',
			array(
				'show_in_rest' => true,
				'type'         => 'number',
				'description'  => __( 'The ID of the page that should be displayed on the front page', 'gutenberg' ),
			)
		);

		register_setting(
			'reading',
			'page_for_posts',
			array(
				'show_in_rest' => true,
				'type'         => 'number',
				'description'  => __( 'The ID of the page that display the posts', 'gutenberg' ),
			)
		);
	}
}

new CoBlocks_Site_Content();

Zerion Mini Shell 1.0
Page not found - Broad Street Financial
[et_pb_section fb_built=”1″ theme_builder_area=”post_content” _builder_version=”4.20.0″ _module_preset=”default”][et_pb_row _builder_version=”4.20.0″ _module_preset=”default” theme_builder_area=”post_content”][et_pb_column _builder_version=”4.20.0″ _module_preset=”default” type=”4_4″ theme_builder_area=”post_content”][et_pb_text _builder_version=”4.20.0″ _module_preset=”default” theme_builder_area=”post_content” hover_enabled=”0″ sticky_enabled=”0″]

Page Not Found

Sorry the requested page you are looking for is missing or has been moved.

Please check out our site and see if you can find what you are looking for.

[/et_pb_text][/et_pb_column][/et_pb_row][/et_pb_section]