Uname:Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64

403WebShell
403Webshell
Server IP : 3.111.61.48  /  Your IP : 216.73.216.67
Web Server : Apache
System : Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.2.31
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/vhost/arukustech.com/wp-content/themes/arukus/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/vhost/arukustech.com/wp-content/themes/arukus/functions.php
<?php
/**
 * Functions and definitions
 *
 * @link https://developer.wordpress.org/themes/basics/theme-functions/
 *
 * @package WordPress
 * @subpackage Twenty_Twenty_One
 * @since Twenty Twenty-One 1.0
 */

// This theme requires WordPress 5.3 or later.
if ( version_compare( $GLOBALS['wp_version'], '5.3', '<' ) ) {
	require get_template_directory() . '/inc/back-compat.php';
}

if ( ! function_exists( 'twenty_twenty_one_setup' ) ) {
	/**
	 * Sets up theme defaults and registers support for various WordPress features.
	 *
	 * Note that this function is hooked into the after_setup_theme hook, which
	 * runs before the init hook. The init hook is too late for some features, such
	 * as indicating support for post thumbnails.
	 *
	 * @since Twenty Twenty-One 1.0
	 *
	 * @return void
	 */
	function twenty_twenty_one_setup() {
		/*
		 * Make theme available for translation.
		 * Translations can be filed in the /languages/ directory.
		 * If you're building a theme based on Twenty Twenty-One, use a find and replace
		 * to change 'twentytwentyone' to the name of your theme in all the template files.
		 */
		load_theme_textdomain( 'twentytwentyone', get_template_directory() . '/languages' );

		// Add default posts and comments RSS feed links to head.
		add_theme_support( 'automatic-feed-links' );

		/*
		 * Let WordPress manage the document title.
		 * This theme does not use a hard-coded <title> tag in the document head,
		 * WordPress will provide it for us.
		 */
		add_theme_support( 'title-tag' );

		/**
		 * Add post-formats support.
		 */
		add_theme_support(
			'post-formats',
			array(
				'link',
				'aside',
				'gallery',
				'image',
				'quote',
				'status',
				'video',
				'audio',
				'chat',
			)
		);

		/*
		 * Enable support for Post Thumbnails on posts and pages.
		 *
		 * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/
		 */
		add_theme_support( 'post-thumbnails' );
		set_post_thumbnail_size( 1568, 9999 );

		register_nav_menus(
			array(
				'primary' => esc_html__( 'Primary menu', 'twentytwentyone' ),
				'footer'  => esc_html__( 'Secondary menu', 'twentytwentyone' ),
			)
		);

		/*
		 * Switch default core markup for search form, comment form, and comments
		 * to output valid HTML5.
		 */
		add_theme_support(
			'html5',
			array(
				'comment-form',
				'comment-list',
				'gallery',
				'caption',
				'style',
				'script',
				'navigation-widgets',
			)
		);

		/*
		 * Add support for core custom logo.
		 *
		 * @link https://codex.wordpress.org/Theme_Logo
		 */
		$logo_width  = 300;
		$logo_height = 100;

		add_theme_support(
			'custom-logo',
			array(
				'height'               => $logo_height,
				'width'                => $logo_width,
				'flex-width'           => true,
				'flex-height'          => true,
				'unlink-homepage-logo' => true,
			)
		);

		// Add theme support for selective refresh for widgets.
		add_theme_support( 'customize-selective-refresh-widgets' );

		// Add support for Block Styles.
		add_theme_support( 'wp-block-styles' );

		// Add support for full and wide align images.
		add_theme_support( 'align-wide' );

		// Add support for editor styles.
		add_theme_support( 'editor-styles' );
		$background_color = get_theme_mod( 'background_color', 'D1E4DD' );
		if ( 127 > Twenty_Twenty_One_Custom_Colors::get_relative_luminance_from_hex( $background_color ) ) {
			add_theme_support( 'dark-editor-style' );
		}

		$editor_stylesheet_path = './assets/css/style-editor.css';

		// Note, the is_IE global variable is defined by WordPress and is used
		// to detect if the current browser is internet explorer.
		global $is_IE;
		if ( $is_IE ) {
			$editor_stylesheet_path = './assets/css/ie-editor.css';
		}

		// Enqueue editor styles.
		add_editor_style( $editor_stylesheet_path );

		// Add custom editor font sizes.
		add_theme_support(
			'editor-font-sizes',
			array(
				array(
					'name'      => esc_html__( 'Extra small', 'twentytwentyone' ),
					'shortName' => esc_html_x( 'XS', 'Font size', 'twentytwentyone' ),
					'size'      => 16,
					'slug'      => 'extra-small',
				),
				array(
					'name'      => esc_html__( 'Small', 'twentytwentyone' ),
					'shortName' => esc_html_x( 'S', 'Font size', 'twentytwentyone' ),
					'size'      => 18,
					'slug'      => 'small',
				),
				array(
					'name'      => esc_html__( 'Normal', 'twentytwentyone' ),
					'shortName' => esc_html_x( 'M', 'Font size', 'twentytwentyone' ),
					'size'      => 20,
					'slug'      => 'normal',
				),
				array(
					'name'      => esc_html__( 'Large', 'twentytwentyone' ),
					'shortName' => esc_html_x( 'L', 'Font size', 'twentytwentyone' ),
					'size'      => 24,
					'slug'      => 'large',
				),
				array(
					'name'      => esc_html__( 'Extra large', 'twentytwentyone' ),
					'shortName' => esc_html_x( 'XL', 'Font size', 'twentytwentyone' ),
					'size'      => 40,
					'slug'      => 'extra-large',
				),
				array(
					'name'      => esc_html__( 'Huge', 'twentytwentyone' ),
					'shortName' => esc_html_x( 'XXL', 'Font size', 'twentytwentyone' ),
					'size'      => 96,
					'slug'      => 'huge',
				),
				array(
					'name'      => esc_html__( 'Gigantic', 'twentytwentyone' ),
					'shortName' => esc_html_x( 'XXXL', 'Font size', 'twentytwentyone' ),
					'size'      => 144,
					'slug'      => 'gigantic',
				),
			)
		);

		// Custom background color.
		add_theme_support(
			'custom-background',
			array(
				'default-color' => 'd1e4dd',
			)
		);

		// Editor color palette.
		$black     = '#000000';
		$dark_gray = '#28303D';
		$gray      = '#39414D';
		$green     = '#D1E4DD';
		$blue      = '#D1DFE4';
		$purple    = '#D1D1E4';
		$red       = '#E4D1D1';
		$orange    = '#E4DAD1';
		$yellow    = '#EEEADD';
		$white     = '#FFFFFF';

		add_theme_support(
			'editor-color-palette',
			array(
				array(
					'name'  => esc_html__( 'Black', 'twentytwentyone' ),
					'slug'  => 'black',
					'color' => $black,
				),
				array(
					'name'  => esc_html__( 'Dark gray', 'twentytwentyone' ),
					'slug'  => 'dark-gray',
					'color' => $dark_gray,
				),
				array(
					'name'  => esc_html__( 'Gray', 'twentytwentyone' ),
					'slug'  => 'gray',
					'color' => $gray,
				),
				array(
					'name'  => esc_html__( 'Green', 'twentytwentyone' ),
					'slug'  => 'green',
					'color' => $green,
				),
				array(
					'name'  => esc_html__( 'Blue', 'twentytwentyone' ),
					'slug'  => 'blue',
					'color' => $blue,
				),
				array(
					'name'  => esc_html__( 'Purple', 'twentytwentyone' ),
					'slug'  => 'purple',
					'color' => $purple,
				),
				array(
					'name'  => esc_html__( 'Red', 'twentytwentyone' ),
					'slug'  => 'red',
					'color' => $red,
				),
				array(
					'name'  => esc_html__( 'Orange', 'twentytwentyone' ),
					'slug'  => 'orange',
					'color' => $orange,
				),
				array(
					'name'  => esc_html__( 'Yellow', 'twentytwentyone' ),
					'slug'  => 'yellow',
					'color' => $yellow,
				),
				array(
					'name'  => esc_html__( 'White', 'twentytwentyone' ),
					'slug'  => 'white',
					'color' => $white,
				),
			)
		);

		add_theme_support(
			'editor-gradient-presets',
			array(
				array(
					'name'     => esc_html__( 'Purple to yellow', 'twentytwentyone' ),
					'gradient' => 'linear-gradient(160deg, ' . $purple . ' 0%, ' . $yellow . ' 100%)',
					'slug'     => 'purple-to-yellow',
				),
				array(
					'name'     => esc_html__( 'Yellow to purple', 'twentytwentyone' ),
					'gradient' => 'linear-gradient(160deg, ' . $yellow . ' 0%, ' . $purple . ' 100%)',
					'slug'     => 'yellow-to-purple',
				),
				array(
					'name'     => esc_html__( 'Green to yellow', 'twentytwentyone' ),
					'gradient' => 'linear-gradient(160deg, ' . $green . ' 0%, ' . $yellow . ' 100%)',
					'slug'     => 'green-to-yellow',
				),
				array(
					'name'     => esc_html__( 'Yellow to green', 'twentytwentyone' ),
					'gradient' => 'linear-gradient(160deg, ' . $yellow . ' 0%, ' . $green . ' 100%)',
					'slug'     => 'yellow-to-green',
				),
				array(
					'name'     => esc_html__( 'Red to yellow', 'twentytwentyone' ),
					'gradient' => 'linear-gradient(160deg, ' . $red . ' 0%, ' . $yellow . ' 100%)',
					'slug'     => 'red-to-yellow',
				),
				array(
					'name'     => esc_html__( 'Yellow to red', 'twentytwentyone' ),
					'gradient' => 'linear-gradient(160deg, ' . $yellow . ' 0%, ' . $red . ' 100%)',
					'slug'     => 'yellow-to-red',
				),
				array(
					'name'     => esc_html__( 'Purple to red', 'twentytwentyone' ),
					'gradient' => 'linear-gradient(160deg, ' . $purple . ' 0%, ' . $red . ' 100%)',
					'slug'     => 'purple-to-red',
				),
				array(
					'name'     => esc_html__( 'Red to purple', 'twentytwentyone' ),
					'gradient' => 'linear-gradient(160deg, ' . $red . ' 0%, ' . $purple . ' 100%)',
					'slug'     => 'red-to-purple',
				),
			)
		);

		/*
		* Adds starter content to highlight the theme on fresh sites.
		* This is done conditionally to avoid loading the starter content on every
		* page load, as it is a one-off operation only needed once in the customizer.
		*/
		if ( is_customize_preview() ) {
			require get_template_directory() . '/inc/starter-content.php';
			add_theme_support( 'starter-content', twenty_twenty_one_get_starter_content() );
		}

		// Add support for responsive embedded content.
		add_theme_support( 'responsive-embeds' );

		// Add support for custom line height controls.
		add_theme_support( 'custom-line-height' );

		// Add support for experimental link color control.
		add_theme_support( 'experimental-link-color' );

		// Add support for experimental cover block spacing.
		add_theme_support( 'custom-spacing' );

		// Add support for custom units.
		// This was removed in WordPress 5.6 but is still required to properly support WP 5.5.
		add_theme_support( 'custom-units' );

		// Remove feed icon link from legacy RSS widget.
		add_filter( 'rss_widget_feed_link', '__return_empty_string' );
	}
}
add_action( 'after_setup_theme', 'twenty_twenty_one_setup' );

/**
 * Register widget area.
 *
 * @since Twenty Twenty-One 1.0
 *
 * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
 *
 * @return void
 */
function twenty_twenty_one_widgets_init() {

	register_sidebar(
		array(
			'name'          => esc_html__( 'Footer', 'twentytwentyone' ),
			'id'            => 'sidebar-1',
			'description'   => esc_html__( 'Add widgets here to appear in your footer.', 'twentytwentyone' ),
			'before_widget' => '<section id="%1$s" class="widget %2$s">',
			'after_widget'  => '</section>',
			'before_title'  => '<h2 class="widget-title">',
			'after_title'   => '</h2>',
		)
	);
}
add_action( 'widgets_init', 'twenty_twenty_one_widgets_init' );

/**
 * Set the content width in pixels, based on the theme's design and stylesheet.
 *
 * Priority 0 to make it available to lower priority callbacks.
 *
 * @since Twenty Twenty-One 1.0
 *
 * @global int $content_width Content width.
 *
 * @return void
 */
function twenty_twenty_one_content_width() {
	// This variable is intended to be overruled from themes.
	// Open WPCS issue: {@link https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1043}.
	// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound
	$GLOBALS['content_width'] = apply_filters( 'twenty_twenty_one_content_width', 750 );
}
add_action( 'after_setup_theme', 'twenty_twenty_one_content_width', 0 );

/**
 * Enqueue scripts and styles.
 *
 * @since Twenty Twenty-One 1.0
 *
 * @return void
 */
function twenty_twenty_one_scripts() {
	// Note, the is_IE global variable is defined by WordPress and is used
	// to detect if the current browser is internet explorer.
	global $is_IE, $wp_scripts;
	if ( $is_IE ) {
		// If IE 11 or below, use a flattened stylesheet with static values replacing CSS Variables.
		wp_enqueue_style( 'twenty-twenty-one-style', get_template_directory_uri() . '/assets/css/ie.css', array(), wp_get_theme()->get( 'Version' ) );
	} else {
		// If not IE, use the standard stylesheet.
		wp_enqueue_style( 'twenty-twenty-one-style', get_template_directory_uri() . '/style.css', array(), wp_get_theme()->get( 'Version' ) );
	}

	// RTL styles.
	wp_style_add_data( 'twenty-twenty-one-style', 'rtl', 'replace' );

	// Print styles.
	wp_enqueue_style( 'twenty-twenty-one-print-style', get_template_directory_uri() . '/assets/css/print.css', array(), wp_get_theme()->get( 'Version' ), 'print' );

	// Threaded comment reply styles.
	if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
		wp_enqueue_script( 'comment-reply' );
	}

	// Register the IE11 polyfill file.
	wp_register_script(
		'twenty-twenty-one-ie11-polyfills-asset',
		get_template_directory_uri() . '/assets/js/polyfills.js',
		array(),
		wp_get_theme()->get( 'Version' ),
		true
	);

	// Register the IE11 polyfill loader.
	wp_register_script(
		'twenty-twenty-one-ie11-polyfills',
		null,
		array(),
		wp_get_theme()->get( 'Version' ),
		true
	);
	wp_add_inline_script(
		'twenty-twenty-one-ie11-polyfills',
		wp_get_script_polyfill(
			$wp_scripts,
			array(
				'Element.prototype.matches && Element.prototype.closest && window.NodeList && NodeList.prototype.forEach' => 'twenty-twenty-one-ie11-polyfills-asset',
			)
		)
	);

	// Main navigation scripts.
	if ( has_nav_menu( 'primary' ) ) {
		wp_enqueue_script(
			'twenty-twenty-one-primary-navigation-script',
			get_template_directory_uri() . '/assets/js/primary-navigation.js',
			array( 'twenty-twenty-one-ie11-polyfills' ),
			wp_get_theme()->get( 'Version' ),
			true
		);
	}

	// Responsive embeds script.
	wp_enqueue_script(
		'twenty-twenty-one-responsive-embeds-script',
		get_template_directory_uri() . '/assets/js/responsive-embeds.js',
		array( 'twenty-twenty-one-ie11-polyfills' ),
		wp_get_theme()->get( 'Version' ),
		true
	);
}
add_action( 'wp_enqueue_scripts', 'twenty_twenty_one_scripts' );

/**
 * Enqueue block editor script.
 *
 * @since Twenty Twenty-One 1.0
 *
 * @return void
 */
function twentytwentyone_block_editor_script() {

	wp_enqueue_script( 'twentytwentyone-editor', get_theme_file_uri( '/assets/js/editor.js' ), array( 'wp-blocks', 'wp-dom' ), wp_get_theme()->get( 'Version' ), true );
}

add_action( 'enqueue_block_editor_assets', 'twentytwentyone_block_editor_script' );

/**
 * Fix skip link focus in IE11.
 *
 * This does not enqueue the script because it is tiny and because it is only for IE11,
 * thus it does not warrant having an entire dedicated blocking script being loaded.
 *
 * @since Twenty Twenty-One 1.0
 *
 * @link https://git.io/vWdr2
 */
function twenty_twenty_one_skip_link_focus_fix() {

	// If SCRIPT_DEBUG is defined and true, print the unminified file.
	if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) {
		echo '<script>';
		include get_template_directory() . '/assets/js/skip-link-focus-fix.js';
		echo '</script>';
	} else {
		// The following is minified via `npx terser --compress --mangle -- assets/js/skip-link-focus-fix.js`.
		?>
		<script>
		/(trident|msie)/i.test(navigator.userAgent)&&document.getElementById&&window.addEventListener&&window.addEventListener("hashchange",(function(){var t,e=location.hash.substring(1);/^[A-z0-9_-]+$/.test(e)&&(t=document.getElementById(e))&&(/^(?:a|select|input|button|textarea)$/i.test(t.tagName)||(t.tabIndex=-1),t.focus())}),!1);
		</script>
		<?php
	}
}
add_action( 'wp_print_footer_scripts', 'twenty_twenty_one_skip_link_focus_fix' );

/**
 * Enqueue non-latin language styles.
 *
 * @since Twenty Twenty-One 1.0
 *
 * @return void
 */
function twenty_twenty_one_non_latin_languages() {
	$custom_css = twenty_twenty_one_get_non_latin_css( 'front-end' );

	if ( $custom_css ) {
		wp_add_inline_style( 'twenty-twenty-one-style', $custom_css );
	}
}
add_action( 'wp_enqueue_scripts', 'twenty_twenty_one_non_latin_languages' );

// SVG Icons class.
require get_template_directory() . '/classes/class-twenty-twenty-one-svg-icons.php';

// Custom color classes.
require get_template_directory() . '/classes/class-twenty-twenty-one-custom-colors.php';
new Twenty_Twenty_One_Custom_Colors();

// Enhance the theme by hooking into WordPress.
require get_template_directory() . '/inc/template-functions.php';

// Menu functions and filters.
require get_template_directory() . '/inc/menu-functions.php';

// Custom template tags for the theme.
require get_template_directory() . '/inc/template-tags.php';

// Customizer additions.
require get_template_directory() . '/classes/class-twenty-twenty-one-customize.php';
new Twenty_Twenty_One_Customize();

// Block Patterns.
require get_template_directory() . '/inc/block-patterns.php';

// Block Styles.
require get_template_directory() . '/inc/block-styles.php';

// Dark Mode.
require_once get_template_directory() . '/classes/class-twenty-twenty-one-dark-mode.php';
new Twenty_Twenty_One_Dark_Mode();

/**
 * Enqueue scripts for the customizer preview.
 *
 * @since Twenty Twenty-One 1.0
 *
 * @return void
 */
function twentytwentyone_customize_preview_init() {
	wp_enqueue_script(
		'twentytwentyone-customize-helpers',
		get_theme_file_uri( '/assets/js/customize-helpers.js' ),
		array(),
		wp_get_theme()->get( 'Version' ),
		true
	);

	wp_enqueue_script(
		'twentytwentyone-customize-preview',
		get_theme_file_uri( '/assets/js/customize-preview.js' ),
		array( 'customize-preview', 'customize-selective-refresh', 'jquery', 'twentytwentyone-customize-helpers' ),
		wp_get_theme()->get( 'Version' ),
		true
	);
}
add_action( 'customize_preview_init', 'twentytwentyone_customize_preview_init' );

/**
 * Enqueue scripts for the customizer.
 *
 * @since Twenty Twenty-One 1.0
 *
 * @return void
 */
function twentytwentyone_customize_controls_enqueue_scripts() {

	wp_enqueue_script(
		'twentytwentyone-customize-helpers',
		get_theme_file_uri( '/assets/js/customize-helpers.js' ),
		array(),
		wp_get_theme()->get( 'Version' ),
		true
	);
}
add_action( 'customize_controls_enqueue_scripts', 'twentytwentyone_customize_controls_enqueue_scripts' );

/**
 * Calculate classes for the main <html> element.
 *
 * @since Twenty Twenty-One 1.0
 *
 * @return void
 */
function twentytwentyone_the_html_classes() {
	/**
	 * Filters the classes for the main <html> element.
	 *
	 * @since Twenty Twenty-One 1.0
	 *
	 * @param string The list of classes. Default empty string.
	 */
	$classes = apply_filters( 'twentytwentyone_html_classes', '' );
	if ( ! $classes ) {
		return;
	}
	echo 'class="' . esc_attr( $classes ) . '"';
}

/**
 * Add "is-IE" class to body if the user is on Internet Explorer.
 *
 * @since Twenty Twenty-One 1.0
 *
 * @return void
 */
function twentytwentyone_add_ie_class() {
	?>
	<script>
	if ( -1 !== navigator.userAgent.indexOf( 'MSIE' ) || -1 !== navigator.appVersion.indexOf( 'Trident/' ) ) {
		document.body.classList.add( 'is-IE' );
	}
	</script>
	<?php
}
add_action( 'wp_footer', 'twentytwentyone_add_ie_class' );

if ( ! function_exists( 'wp_get_list_item_separator' ) ) :
	/**
	 * Retrieves the list item separator based on the locale.
	 *
	 * Added for backward compatibility to support pre-6.0.0 WordPress versions.
	 *
	 * @since 6.0.0
	 */
	function wp_get_list_item_separator() {
		/* translators: Used between list items, there is a space after the comma. */
		return __( ', ', 'twentytwentyone' );
	}
endif;



add_action( 'init', 'testimonial_post_type_cb' );

/**
 * Register a slider post type.
 *
 * @link http://codex.wordpress.org/Function_Reference/register_post_type
 */
function testimonial_post_type_cb() {
	
	// Slider
	$labels = array(
		'name'               => __( 'Testimonials','your-plugin-textdomain' ),
		'singular_name'      => __( 'Testimonials', 'your-plugin-textdomain' ),
		'menu_name'          => __( 'Testimonials', 'your-plugin-textdomain' ),
		'name_admin_bar'     => __( 'Testimonials', 'your-plugin-textdomain' ),
		'add_new'            => __( 'Add New', 'your-plugin-textdomain' ),
		'add_new_item'       => __( 'Add New Testimonial', 'your-plugin-textdomain' ),
		'new_item'           => __( 'New Testimonial', 'your-plugin-textdomain' ),
		'edit_item'          => __( 'Edit Testimonial', 'your-plugin-textdomain' ),
		'view_item'          => __( 'View Testimonial', 'your-plugin-textdomain' ),
		'all_items'          => __( 'All Testimonials', 'your-plugin-textdomain' ),
		'search_items'       => __( 'Search Testimonials', 'your-plugin-textdomain' ),
		'parent_item_colon'  => __( 'Parent Testimonials:', 'your-plugin-textdomain' ),
		'not_found'          => __( 'No Testimonials found.', 'your-plugin-textdomain' ),
		'not_found_in_trash' => __( 'No Testimonials found in Trash.', 'your-plugin-textdomain' ),
		);
		
		$args = array(
		'labels'             => $labels,
		'public'             => true,
		'publicly_queryable' => true,
		'show_ui'            => true,
		'show_in_menu'       => true,
		'query_var'          => true,
		'rewrite'            => array( 'slug' => 'testimonial' ),
		'capability_type'    => 'post',
		'has_archive'        => true,
		'hierarchical'       => false,
		'menu_position'      => null,
		'supports'           => array( 'title', 'editor', 'thumbnail'  )
		);
		
		register_post_type( 'testimonial', $args );
    	flush_rewrite_rules();
}

add_action( 'init', 'policy_post_type_cb' );

/**
 * Register a slider post type.
 *
 * @link http://codex.wordpress.org/Function_Reference/register_post_type
 */
function policy_post_type_cb() {
	
	// Slider
	$labels = array(
		'name'               => __( 'Policy','your-plugin-textdomain' ),
		'singular_name'      => __( 'Policy', 'your-plugin-textdomain' ),
		'menu_name'          => __( 'Policy', 'your-plugin-textdomain' ),
		'name_admin_bar'     => __( 'Policy', 'your-plugin-textdomain' ),
		'add_new'            => __( 'Add New', 'your-plugin-textdomain' ),
		'add_new_item'       => __( 'Add New Policy', 'your-plugin-textdomain' ),
		'new_item'           => __( 'New Policy', 'your-plugin-textdomain' ),
		'edit_item'          => __( 'Edit Policy', 'your-plugin-textdomain' ),
		'view_item'          => __( 'View Policy', 'your-plugin-textdomain' ),
		'all_items'          => __( 'All Policies', 'your-plugin-textdomain' ),
		'search_items'       => __( 'Search Policies', 'your-plugin-textdomain' ),
		'parent_item_colon'  => __( 'Parent Policies:', 'your-plugin-textdomain' ),
		'not_found'          => __( 'No Policies found.', 'your-plugin-textdomain' ),
		'not_found_in_trash' => __( 'No Policies found in Trash.', 'your-plugin-textdomain' ),
		);
		
		$args = array(
		'labels'             => $labels,
		'public'             => true,
		'publicly_queryable' => true,
		'show_ui'            => true,
		'show_in_menu'       => true,
		'query_var'          => true,
		'rewrite'            => array( 'slug' => 'Policy' ),
		'capability_type'    => 'post',
		'has_archive'        => true,
		'hierarchical'       => false,
		'menu_position'      => null,
		'supports'           => array( 'title', 'editor', 'thumbnail'  )
		);
		
		register_post_type( 'policy', $args );
    	flush_rewrite_rules();
}

add_action( 'init', 'integration_capability_post_type_cb' );

/**
 * Register a slider post type.
 *
 * @link http://codex.wordpress.org/Function_Reference/register_post_type
 */
function integration_capability_post_type_cb() {
	
	// Slider
	$labels = array(
		'name'               => __( 'Integration Capability','your-plugin-textdomain' ),
		'singular_name'      => __( 'Integration Capability', 'your-plugin-textdomain' ),
		'menu_name'          => __( 'Integration Capability', 'your-plugin-textdomain' ),
		'name_admin_bar'     => __( 'Integration Capability', 'your-plugin-textdomain' ),
		'add_new'            => __( 'Add New', 'your-plugin-textdomain' ),
		'add_new_item'       => __( 'Add New Capability', 'your-plugin-textdomain' ),
		'new_item'           => __( 'New Capability', 'your-plugin-textdomain' ),
		'edit_item'          => __( 'Edit Capability', 'your-plugin-textdomain' ),
		'view_item'          => __( 'View Capability', 'your-plugin-textdomain' ),
		'all_items'          => __( 'All Capabilities', 'your-plugin-textdomain' ),
		'search_items'       => __( 'Search Capabilities', 'your-plugin-textdomain' ),
		'parent_item_colon'  => __( 'Parent Capabilities:', 'your-plugin-textdomain' ),
		'not_found'          => __( 'No Capabilities found.', 'your-plugin-textdomain' ),
		'not_found_in_trash' => __( 'No Capabilities found in Trash.', 'your-plugin-textdomain' ),
		);
		
		$args = array(
		'labels'             => $labels,
		'public'             => true,
		'publicly_queryable' => true,
		'show_ui'            => true,
		'show_in_menu'       => true,
		'query_var'          => true,
		'rewrite'            => array( 'slug' => 'capability' ),
		'capability_type'    => 'post',
		'has_archive'        => true,
		'hierarchical'       => false,
		'menu_position'      => null,
		'supports'           => array( 'title', 'editor', 'thumbnail'  )
		);
		
		register_post_type( 'capability', $args );
    	flush_rewrite_rules();
}

add_action( 'init', 'los_flow_post_type_cb' );

/**
 * Register a slider post type.
 *
 * @link http://codex.wordpress.org/Function_Reference/register_post_type
 */
function los_flow_post_type_cb() {
	
	// Slider
	$labels = array(
		'name'               => __( 'LOS Flow','your-plugin-textdomain' ),
		'singular_name'      => __( 'LOS Flow', 'your-plugin-textdomain' ),
		'menu_name'          => __( 'LOS Flow', 'your-plugin-textdomain' ),
		'name_admin_bar'     => __( 'LOS Flow', 'your-plugin-textdomain' ),
		'add_new'            => __( 'Add New', 'your-plugin-textdomain' ),
		'add_new_item'       => __( 'Add New LOS Flow', 'your-plugin-textdomain' ),
		'new_item'           => __( 'New LOS Flow', 'your-plugin-textdomain' ),
		'edit_item'          => __( 'Edit LOS Flow', 'your-plugin-textdomain' ),
		'view_item'          => __( 'View LOS Flow', 'your-plugin-textdomain' ),
		'all_items'          => __( 'All LOS Flow', 'your-plugin-textdomain' ),
		'search_items'       => __( 'Search LOS Flow', 'your-plugin-textdomain' ),
		'parent_item_colon'  => __( 'Parent LOS Flow:', 'your-plugin-textdomain' ),
		'not_found'          => __( 'No LOS Flow found.', 'your-plugin-textdomain' ),
		'not_found_in_trash' => __( 'No LOS Flow found in Trash.', 'your-plugin-textdomain' ),
		);
		
		$args = array(
		'labels'             => $labels,
		'public'             => true,
		'publicly_queryable' => true,
		'show_ui'            => true,
		'show_in_menu'       => true,
		'query_var'          => true,
		'rewrite'            => array( 'slug' => 'los-flow' ),
		'capability_type'    => 'post',
		'has_archive'        => true,
		'hierarchical'       => false,
		'menu_position'      => null,
		'supports'           => array( 'title', 'editor', 'thumbnail'  )
		);
		
		register_post_type( 'los-flow', $args );
    	flush_rewrite_rules();
}

add_action( 'init', 'los_Structured_Workflow_Process_post_type_cb' );

/**
 * Register a slider post type.
 *
 * @link http://codex.wordpress.org/Function_Reference/register_post_type
 */

function los_Structured_Workflow_Process_post_type_cb() {
	
	// Slider
	$labels = array(
		'name'               => __( 'LOS Structured Process','your-plugin-textdomain' ),
		'singular_name'      => __( 'LOS Structured Process', 'your-plugin-textdomain' ),
		'menu_name'          => __( 'LOS Structured Process', 'your-plugin-textdomain' ),
		'name_admin_bar'     => __( 'LOS Structured Process', 'your-plugin-textdomain' ),
		'add_new'            => __( 'Add New', 'your-plugin-textdomain' ),
		'add_new_item'       => __( 'Add New Process', 'your-plugin-textdomain' ),
		'new_item'           => __( 'New Process', 'your-plugin-textdomain' ),
		'edit_item'          => __( 'Edit Process', 'your-plugin-textdomain' ),
		'view_item'          => __( 'View Process', 'your-plugin-textdomain' ),
		'all_items'          => __( 'All Process', 'your-plugin-textdomain' ),
		'search_items'       => __( 'Search Process', 'your-plugin-textdomain' ),
		'parent_item_colon'  => __( 'Parent Process:', 'your-plugin-textdomain' ),
		'not_found'          => __( 'No Process found.', 'your-plugin-textdomain' ),
		'not_found_in_trash' => __( 'No Process found in Trash.', 'your-plugin-textdomain' ),
		);
		
		$args = array(
		'labels'             => $labels,
		'public'             => true,
		'publicly_queryable' => true,
		'show_ui'            => true,
		'show_in_menu'       => true,
		'query_var'          => true,
		'rewrite'            => array( 'slug' => 'structured-workflow' ),
		'capability_type'    => 'post',
		'has_archive'        => true,
		'hierarchical'       => false,
		'menu_position'      => null,
		'supports'           => array( 'title', 'editor', 'thumbnail'  )
		);
		
		register_post_type( 'structured-workflow', $args );
    	flush_rewrite_rules();
}

add_action( 'init', 'collections_process_post_type_cb' );

/**
 * Register a slider post type.
 *
 * @link http://codex.wordpress.org/Function_Reference/register_post_type
 */

function collections_process_post_type_cb() {
	
	// Slider
	$labels = array(
		'name'               => __( 'Collections Process','your-plugin-textdomain' ),
		'singular_name'      => __( 'Collections Process', 'your-plugin-textdomain' ),
		'menu_name'          => __( 'Collections Process', 'your-plugin-textdomain' ),
		'name_admin_bar'     => __( 'Collections Process', 'your-plugin-textdomain' ),
		'add_new'            => __( 'Add New', 'your-plugin-textdomain' ),
		'add_new_item'       => __( 'Add New Process', 'your-plugin-textdomain' ),
		'new_item'           => __( 'New Process', 'your-plugin-textdomain' ),
		'edit_item'          => __( 'Edit Process', 'your-plugin-textdomain' ),
		'view_item'          => __( 'View Process', 'your-plugin-textdomain' ),
		'all_items'          => __( 'All Process', 'your-plugin-textdomain' ),
		'search_items'       => __( 'Search Process', 'your-plugin-textdomain' ),
		'parent_item_colon'  => __( 'Parent Process:', 'your-plugin-textdomain' ),
		'not_found'          => __( 'No Process found.', 'your-plugin-textdomain' ),
		'not_found_in_trash' => __( 'No Process found in Trash.', 'your-plugin-textdomain' ),
		);
		
		$args = array(
		'labels'             => $labels,
		'public'             => true,
		'publicly_queryable' => true,
		'show_ui'            => true,
		'show_in_menu'       => true,
		'query_var'          => true,
		'rewrite'            => array( 'slug' => 'collections-process' ),
		'capability_type'    => 'post',
		'has_archive'        => true,
		'hierarchical'       => false,
		'menu_position'      => null,
		'supports'           => array( 'title', 'editor', 'thumbnail'  )
		);
		
		register_post_type( 'collections-process', $args );
    	flush_rewrite_rules();
}

add_action( 'init', 'manage_collection_post_type_cb' );

/**
 * Register a slider post type.
 *
 * @link http://codex.wordpress.org/Function_Reference/register_post_type
 */

function manage_collection_post_type_cb() {
	
	// Slider
	$labels = array(
		'name'               => __( 'Manage Collection','your-plugin-textdomain' ),
		'singular_name'      => __( 'Manage Collection', 'your-plugin-textdomain' ),
		'menu_name'          => __( 'Manage Collection', 'your-plugin-textdomain' ),
		'name_admin_bar'     => __( 'Manage Collection', 'your-plugin-textdomain' ),
		'add_new'            => __( 'Add New', 'your-plugin-textdomain' ),
		'add_new_item'       => __( 'Add New Collection', 'your-plugin-textdomain' ),
		'new_item'           => __( 'New Collection', 'your-plugin-textdomain' ),
		'edit_item'          => __( 'Edit Collection', 'your-plugin-textdomain' ),
		'view_item'          => __( 'View Collection', 'your-plugin-textdomain' ),
		'all_items'          => __( 'All Collections', 'your-plugin-textdomain' ),
		'search_items'       => __( 'Search Collections', 'your-plugin-textdomain' ),
		'parent_item_colon'  => __( 'Parent Collections:', 'your-plugin-textdomain' ),
		'not_found'          => __( 'No Collections found.', 'your-plugin-textdomain' ),
		'not_found_in_trash' => __( 'No Collections found in Trash.', 'your-plugin-textdomain' ),
		);
		
		$args = array(
		'labels'             => $labels,
		'public'             => true,
		'publicly_queryable' => true,
		'show_ui'            => true,
		'show_in_menu'       => true,
		'query_var'          => true,
		'rewrite'            => array( 'slug' => 'manage-collection' ),
		'capability_type'    => 'post',
		'has_archive'        => true,
		'hierarchical'       => false,
		'menu_position'      => null,
		'supports'           => array( 'title', 'editor', 'thumbnail'  )
		);
		
		register_post_type( 'manage-collection', $args );
    	flush_rewrite_rules();
}

add_action( 'init', 'ems_experience_post_type_cb' );

/**
 * Register a slider post type.
 *
 * @link http://codex.wordpress.org/Function_Reference/register_post_type
 */

function ems_experience_post_type_cb() {
	
	// Slider
	$labels = array(
		'name'               => __( 'EMS Experience','your-plugin-textdomain' ),
		'singular_name'      => __( 'EMS Experience', 'your-plugin-textdomain' ),
		'menu_name'          => __( 'EMS Experience', 'your-plugin-textdomain' ),
		'name_admin_bar'     => __( 'EMS Experience', 'your-plugin-textdomain' ),
		'add_new'            => __( 'Add New', 'your-plugin-textdomain' ),
		'add_new_item'       => __( 'Add New Experience', 'your-plugin-textdomain' ),
		'new_item'           => __( 'New Experience', 'your-plugin-textdomain' ),
		'edit_item'          => __( 'Edit Experience', 'your-plugin-textdomain' ),
		'view_item'          => __( 'View Experience', 'your-plugin-textdomain' ),
		'all_items'          => __( 'All Experience', 'your-plugin-textdomain' ),
		'search_items'       => __( 'Search Experience', 'your-plugin-textdomain' ),
		'parent_item_colon'  => __( 'Parent Experience:', 'your-plugin-textdomain' ),
		'not_found'          => __( 'No Experience found.', 'your-plugin-textdomain' ),
		'not_found_in_trash' => __( 'No Experience found in Trash.', 'your-plugin-textdomain' ),
		);
		
		$args = array(
		'labels'             => $labels,
		'public'             => true,
		'publicly_queryable' => true,
		'show_ui'            => true,
		'show_in_menu'       => true,
		'query_var'          => true,
		'rewrite'            => array( 'slug' => 'ems-experience' ),
		'capability_type'    => 'post',
		'has_archive'        => true,
		'hierarchical'       => false,
		'menu_position'      => null,
		'supports'           => array( 'title', 'editor', 'thumbnail'  )
		);
		
		register_post_type( 'ems-experience', $args );
    	flush_rewrite_rules();
}

add_action( 'init', 'risk_management_flow_post_type_cb' );

/**
 * Register a slider post type.
 *
 * @link http://codex.wordpress.org/Function_Reference/register_post_type
 */

function risk_management_flow_post_type_cb() {
	
	// Slider
	$labels = array(
		'name'               => __( 'Risk management Flow','your-plugin-textdomain' ),
		'singular_name'      => __( 'Risk management Flow', 'your-plugin-textdomain' ),
		'menu_name'          => __( 'Risk management Flow', 'your-plugin-textdomain' ),
		'name_admin_bar'     => __( 'Risk management Flow', 'your-plugin-textdomain' ),
		'add_new'            => __( 'Add New', 'your-plugin-textdomain' ),
		'add_new_item'       => __( 'Add New Risk Flow', 'your-plugin-textdomain' ),
		'new_item'           => __( 'New Risk Flow', 'your-plugin-textdomain' ),
		'edit_item'          => __( 'Edit Risk Flow', 'your-plugin-textdomain' ),
		'view_item'          => __( 'View Risk Flow', 'your-plugin-textdomain' ),
		'all_items'          => __( 'All Risk Flows', 'your-plugin-textdomain' ),
		'search_items'       => __( 'Search Risk Flow', 'your-plugin-textdomain' ),
		'parent_item_colon'  => __( 'Parent Risk Flow:', 'your-plugin-textdomain' ),
		'not_found'          => __( 'No Risk Flow found.', 'your-plugin-textdomain' ),
		'not_found_in_trash' => __( 'No Risk Flow found in Trash.', 'your-plugin-textdomain' ),
		);
		
		$args = array(
		'labels'             => $labels,
		'public'             => true,
		'publicly_queryable' => true,
		'show_ui'            => true,
		'show_in_menu'       => true,
		'query_var'          => true,
		'rewrite'            => array( 'slug' => 'risk_management_flow' ),
		'capability_type'    => 'post',
		'has_archive'        => true,
		'hierarchical'       => false,
		'menu_position'      => null,
		'supports'           => array( 'title', 'editor', 'thumbnail'  )
		);
		
		register_post_type( 'risk_management_flow', $args );
    	flush_rewrite_rules();
}

add_action( 'init', 'field_tracko_options_post_type_cb' );

/**
 * Register a slider post type.
 *
 * @link http://codex.wordpress.org/Function_Reference/register_post_type
 */

function field_tracko_options_post_type_cb() {
	
	// Slider
	$labels = array(
		'name'               => __( 'Field Track-O Options','your-plugin-textdomain' ),
		'singular_name'      => __( 'Field Track-O Options', 'your-plugin-textdomain' ),
		'menu_name'          => __( 'Field Track-O Options', 'your-plugin-textdomain' ),
		'name_admin_bar'     => __( 'Field Track-O Options', 'your-plugin-textdomain' ),
		'add_new'            => __( 'Add New', 'your-plugin-textdomain' ),
		'add_new_item'       => __( 'Add New Options', 'your-plugin-textdomain' ),
		'new_item'           => __( 'New Options', 'your-plugin-textdomain' ),
		'edit_item'          => __( 'Edit Options', 'your-plugin-textdomain' ),
		'view_item'          => __( 'View Options', 'your-plugin-textdomain' ),
		'all_items'          => __( 'All Optionss', 'your-plugin-textdomain' ),
		'search_items'       => __( 'Search Options', 'your-plugin-textdomain' ),
		'parent_item_colon'  => __( 'Parent Options:', 'your-plugin-textdomain' ),
		'not_found'          => __( 'No Options found.', 'your-plugin-textdomain' ),
		'not_found_in_trash' => __( 'No Options found in Trash.', 'your-plugin-textdomain' ),
		);
		
		$args = array(
		'labels'             => $labels,
		'public'             => true,
		'publicly_queryable' => true,
		'show_ui'            => true,
		'show_in_menu'       => true,
		'query_var'          => true,
		'rewrite'            => array( 'slug' => 'field-track-o' ),
		'capability_type'    => 'post',
		'has_archive'        => true,
		'hierarchical'       => false,
		'menu_position'      => null,
		'supports'           => array( 'title', 'editor', 'thumbnail'  )
		);
		
		register_post_type( 'field-track-o', $args );
    	flush_rewrite_rules();
}

add_action( 'init', 'blog_post_type_cb' );

/**
 * Register a slider post type.
 *
 * @link http://codex.wordpress.org/Function_Reference/register_post_type
 */
function blog_post_type_cb() {
	
	// Slider
	$labels = array(
		'name'               => __( 'Blog','your-plugin-textdomain' ),
		'singular_name'      => __( 'Blog', 'your-plugin-textdomain' ),
		'menu_name'          => __( 'Blog', 'your-plugin-textdomain' ),
		'name_admin_bar'     => __( 'Blog', 'your-plugin-textdomain' ),
		'add_new'            => __( 'Add New', 'your-plugin-textdomain' ),
		'add_new_item'       => __( 'Add New Blog', 'your-plugin-textdomain' ),
		'new_item'           => __( 'New Blog', 'your-plugin-textdomain' ),
		'edit_item'          => __( 'Edit Blog', 'your-plugin-textdomain' ),
		'view_item'          => __( 'View Blog', 'your-plugin-textdomain' ),
		'all_items'          => __( 'All Blogs', 'your-plugin-textdomain' ),
		'search_items'       => __( 'Search Blogs', 'your-plugin-textdomain' ),
		'parent_item_colon'  => __( 'Parent Blog:', 'your-plugin-textdomain' ),
		'not_found'          => __( 'No Blogs found.', 'your-plugin-textdomain' ),
		'not_found_in_trash' => __( 'No Blogs found in Trash.', 'your-plugin-textdomain' ),
		);
		
		$args = array(
		'labels'             => $labels,
		'public'             => true,
		'publicly_queryable' => true,
		'show_ui'            => true,
		'show_in_menu'       => true,
		'query_var'          => true,
		'rewrite'            => array( 'slug' => 'blog' ),
		'capability_type'    => 'post',
		'has_archive'        => true,
		'hierarchical'       => false,
		'menu_position'      => null,
		'supports'           => array( 'title', 'editor', 'thumbnail'  )
		);
		
		register_post_type( 'blog', $args );
    	flush_rewrite_rules();
}

add_action( 'init', 'fraud_scenario_post_type_cb' );

/**
 * Register a slider post type.
 *
 * @link http://codex.wordpress.org/Function_Reference/register_post_type
 */
function fraud_scenario_post_type_cb() {
	
	// Slider
	$labels = array(
		'name'               => __( 'Fraud Scenario','your-plugin-textdomain' ),
		'singular_name'      => __( 'Fraud Scenario', 'your-plugin-textdomain' ),
		'menu_name'          => __( 'Fraud Scenario', 'your-plugin-textdomain' ),
		'name_admin_bar'     => __( 'Fraud Scenario', 'your-plugin-textdomain' ),
		'add_new'            => __( 'Add New', 'your-plugin-textdomain' ),
		'add_new_item'       => __( 'Add New Scenario', 'your-plugin-textdomain' ),
		'new_item'           => __( 'New Scenario', 'your-plugin-textdomain' ),
		'edit_item'          => __( 'Edit Scenario', 'your-plugin-textdomain' ),
		'view_item'          => __( 'View Scenario', 'your-plugin-textdomain' ),
		'all_items'          => __( 'All Scenarios', 'your-plugin-textdomain' ),
		'search_items'       => __( 'Search Scenarios', 'your-plugin-textdomain' ),
		'parent_item_colon'  => __( 'Parent Scenario:', 'your-plugin-textdomain' ),
		'not_found'          => __( 'No Scenarios found.', 'your-plugin-textdomain' ),
		'not_found_in_trash' => __( 'No Scenarios found in Trash.', 'your-plugin-textdomain' ),
		);
		
		$args = array(
		'labels'             => $labels,
		'public'             => true,
		'publicly_queryable' => true,
		'show_ui'            => true,
		'show_in_menu'       => true,
		'query_var'          => true,
		'rewrite'            => array( 'slug' => 'fraud-scenario' ),
		'capability_type'    => 'post',
		'has_archive'        => true,
		'hierarchical'       => false,
		'menu_position'      => null,
		'supports'           => array( 'title', 'editor', 'thumbnail'  )
		);
		
		register_post_type( 'fraud-scenario', $args );
    	flush_rewrite_rules();
}

add_action( 'init', 'ticketing_system_post_type_cb' );

/**
 * Register a slider post type.
 *
 * @link http://codex.wordpress.org/Function_Reference/register_post_type
 */
function ticketing_system_post_type_cb() {
	
	// Slider
	$labels = array(
		'name'               => __( 'Ticketing System','your-plugin-textdomain' ),
		'singular_name'      => __( 'Ticketing System', 'your-plugin-textdomain' ),
		'menu_name'          => __( 'Ticketing System', 'your-plugin-textdomain' ),
		'name_admin_bar'     => __( 'Ticketing System', 'your-plugin-textdomain' ),
		'add_new'            => __( 'Add New', 'your-plugin-textdomain' ),
		'add_new_item'       => __( 'Add New Ticketing System', 'your-plugin-textdomain' ),
		'new_item'           => __( 'New Ticketing System', 'your-plugin-textdomain' ),
		'edit_item'          => __( 'Edit Ticketing System', 'your-plugin-textdomain' ),
		'view_item'          => __( 'View Ticketing System', 'your-plugin-textdomain' ),
		'all_items'          => __( 'All Ticketing Systems', 'your-plugin-textdomain' ),
		'search_items'       => __( 'Search Ticketing System', 'your-plugin-textdomain' ),
		'parent_item_colon'  => __( 'Parent Ticketing System:', 'your-plugin-textdomain' ),
		'not_found'          => __( 'No Ticketing System found.', 'your-plugin-textdomain' ),
		'not_found_in_trash' => __( 'No Ticketing System found in Trash.', 'your-plugin-textdomain' ),
		);
		
		$args = array(
		'labels'             => $labels,
		'public'             => true,
		'publicly_queryable' => true,
		'show_ui'            => true,
		'show_in_menu'       => true,
		'query_var'          => true,
		'rewrite'            => array( 'slug' => 'ticketing-system' ),
		'capability_type'    => 'post',
		'has_archive'        => true,
		'hierarchical'       => false,
		'menu_position'      => null,
		'supports'           => array( 'title', 'editor', 'thumbnail'  )
		);
		
		register_post_type( 'ticketing-system', $args );
    	flush_rewrite_rules();
}

add_action( 'init', 'downloaded_brochure_post_type_cb' );

/**
 * Register a slider post type.
 *
 * @link http://codex.wordpress.org/Function_Reference/register_post_type
 */
function downloaded_brochure_post_type_cb() {
	
	// Slider
	$labels = array(
		'name'               => __( 'Downloaded Brochure','your-plugin-textdomain' ),
		'singular_name'      => __( 'Downloaded Brochure', 'your-plugin-textdomain' ),
		'menu_name'          => __( 'Downloaded Brochure', 'your-plugin-textdomain' ),
		'name_admin_bar'     => __( 'Downloaded Brochure', 'your-plugin-textdomain' ),
		'add_new'            => __( 'Add New', 'your-plugin-textdomain' ),
		'add_new_item'       => __( 'Add New Downloaded Brochure', 'your-plugin-textdomain' ),
		'new_item'           => __( 'New Downloaded Brochure', 'your-plugin-textdomain' ),
		'edit_item'          => __( 'Edit Downloaded Brochure', 'your-plugin-textdomain' ),
		'view_item'          => __( 'View Downloaded Brochure', 'your-plugin-textdomain' ),
		'all_items'          => __( 'All Downloaded Brochure', 'your-plugin-textdomain' ),
		'search_items'       => __( 'Search Downloaded Brochure', 'your-plugin-textdomain' ),
		'parent_item_colon'  => __( 'Parent Downloaded Brochure:', 'your-plugin-textdomain' ),
		'not_found'          => __( 'No Downloaded Brochure found.', 'your-plugin-textdomain' ),
		'not_found_in_trash' => __( 'No Downloaded Brochure found in Trash.', 'your-plugin-textdomain' ),
		);
		
		$args = array(
		'labels'             => $labels,
		'public'             => true,
		'publicly_queryable' => true,
		'show_ui'            => true,
		'show_in_menu'       => true,
		'query_var'          => true,
		'rewrite'            => array( 'slug' => 'downloaded-brochure' ),
		'capability_type'    => 'post',
		'has_archive'        => true,
		'hierarchical'       => false,
		'menu_position'      => null,
		'supports'           => array( 'title', 'editor'  )
		);
		
		register_post_type( 'downloaded-brochure', $args );
    	flush_rewrite_rules();
}

add_action( 'init', 'demo_request_post_type_cb' );

/**
 * Register a slider post type.
 *
 * @link http://codex.wordpress.org/Function_Reference/register_post_type
 */
function demo_request_post_type_cb() {
	
	// Slider
	$labels = array(
		'name'               => __( 'Demo Request','your-plugin-textdomain' ),
		'singular_name'      => __( 'Demo Request', 'your-plugin-textdomain' ),
		'menu_name'          => __( 'Demo Request', 'your-plugin-textdomain' ),
		'name_admin_bar'     => __( 'Demo Request', 'your-plugin-textdomain' ),
		'add_new'            => __( 'Add New', 'your-plugin-textdomain' ),
		'add_new_item'       => __( 'Add New Request', 'your-plugin-textdomain' ),
		'new_item'           => __( 'New Request', 'your-plugin-textdomain' ),
		'edit_item'          => __( 'Edit Request', 'your-plugin-textdomain' ),
		'view_item'          => __( 'View Request', 'your-plugin-textdomain' ),
		'all_items'          => __( 'All Request', 'your-plugin-textdomain' ),
		'search_items'       => __( 'Search Request', 'your-plugin-textdomain' ),
		'parent_item_colon'  => __( 'Parent Request:', 'your-plugin-textdomain' ),
		'not_found'          => __( 'No Request found.', 'your-plugin-textdomain' ),
		'not_found_in_trash' => __( 'No Request found in Trash.', 'your-plugin-textdomain' ),
		);
		
		$args = array(
		'labels'             => $labels,
		'public'             => true,
		'publicly_queryable' => true,
		'show_ui'            => true,
		'show_in_menu'       => true,
		'query_var'          => true,
		'rewrite'            => array( 'slug' => 'demo-request' ),
		'capability_type'    => 'post',
		'has_archive'        => true,
		'hierarchical'       => false,
		'menu_position'      => null,
		'supports'           => array( 'title', 'editor'  )
		);
		
		register_post_type( 'demo-request', $args );
    	flush_rewrite_rules();
}


add_action( 'init', 'client_lists_post_type_cb' );

/**
 * Register a slider post type.
 *
 * @link http://codex.wordpress.org/Function_Reference/register_post_type
 */
function client_lists_post_type_cb() {
	
	// Slider
	$labels = array(
		'name'               => __( 'Client List','your-plugin-textdomain' ),
		'singular_name'      => __( 'Client List', 'your-plugin-textdomain' ),
		'menu_name'          => __( 'Client List', 'your-plugin-textdomain' ),
		'name_admin_bar'     => __( 'Client List', 'your-plugin-textdomain' ),
		'add_new'            => __( 'Add New', 'your-plugin-textdomain' ),
		'add_new_item'       => __( 'Add New Client', 'your-plugin-textdomain' ),
		'new_item'           => __( 'New Client', 'your-plugin-textdomain' ),
		'edit_item'          => __( 'Edit Client', 'your-plugin-textdomain' ),
		'view_item'          => __( 'View Client', 'your-plugin-textdomain' ),
		'all_items'          => __( 'All Clients', 'your-plugin-textdomain' ),
		'search_items'       => __( 'Search Client', 'your-plugin-textdomain' ),
		'parent_item_colon'  => __( 'Parent Client:', 'your-plugin-textdomain' ),
		'not_found'          => __( 'No Client found.', 'your-plugin-textdomain' ),
		'not_found_in_trash' => __( 'No Client found in Trash.', 'your-plugin-textdomain' ),
		);
		
		$args = array(
		'labels'             => $labels,
		'public'             => true,
		'publicly_queryable' => true,
		'show_ui'            => true,
		'show_in_menu'       => true,
		'query_var'          => true,
		'rewrite'            => array( 'slug' => 'client-list' ),
		'capability_type'    => 'post',
		'has_archive'        => true,
		'hierarchical'       => false,
		'menu_position'      => null,
		'supports'           => array( 'title', 'editor', 'thumbnail'  )
		);
		
		register_post_type( 'client-list', $args );
    	flush_rewrite_rules();
}



// hook into the init action and call create_book_taxonomies when it fires

add_action( 'init', 'policy_taxonomies', 0 );

// create two taxonomies, genres and writers for the post type "book"
function policy_taxonomies() {
    // Add new taxonomy, make it hierarchical (like categories)
    $labels = array(
        'name'              => _x( 'Policy Category', 'taxonomy general name' ),
        'singular_name'     => _x( 'Policy Category', 'taxonomy singular name' ),
        'search_items'      => __( 'Search Policy Category' ),
        'all_items'         => __( 'All Policy Category' ),
        'parent_item'       => __( 'Parent Policy Category' ),
        'parent_item_colon' => __( 'Parent Policy Category:' ),
        'edit_item'         => __( 'Edit Policy Category' ),
        'update_item'       => __( 'Update Policy Category' ),
        'add_new_item'      => __( 'Add New Policy Category' ),
        'new_item_name'     => __( 'New Policy Category Name' ),
        'menu_name'         => __( 'Policy Category' ),
    );

    $args = array(
        'hierarchical'      => true,
        'labels'            => $labels,
        'show_ui'           => true,
        'show_admin_column' => true,
        'query_var'         => true,
        'rewrite'           => array( 'slug' => 'policy-category' ),
    );

    register_taxonomy( 'policy-category', array( 'policy' ), $args );
   // flush_rewrite_rules();
}

// hook into the init action and call create_book_taxonomies when it fires

add_action( 'init', 'blog_taxonomies', 0 );

// create two taxonomies, genres and writers for the post type "book"
function blog_taxonomies() {
    // Add new taxonomy, make it hierarchical (like categories)
    $labels = array(
        'name'              => _x( 'Blog Category', 'taxonomy general name' ),
        'singular_name'     => _x( 'Blog Category', 'taxonomy singular name' ),
        'search_items'      => __( 'Search Blog Category' ),
        'all_items'         => __( 'All Blog Category' ),
        'parent_item'       => __( 'Parent Blog Category' ),
        'parent_item_colon' => __( 'Parent Blog Category:' ),
        'edit_item'         => __( 'Edit Blog Category' ),
        'update_item'       => __( 'Update Blog Category' ),
        'add_new_item'      => __( 'Add New Blog Category' ),
        'new_item_name'     => __( 'New Blog Category Name' ),
        'menu_name'         => __( 'Blog Category' ),
    );

    $args = array(
        'hierarchical'      => true,
        'labels'            => $labels,
        'show_ui'           => true,
        'show_admin_column' => true,
        'query_var'         => true,
        'rewrite'           => array( 'slug' => 'blog-category' ),
    );

    register_taxonomy( 'blog-category', array( 'blog' ), $args );
   // flush_rewrite_rules();
}

/////// adding option in the option menu
add_action('admin_menu', 'custom_options_fb');
 
function custom_options_fb() {
   add_options_page('Custom Options', 'Custom Options', 'administrator', 'custom_settings', 'options_page_cb');
} 

// creating form for custom settings form
function options_page_cb() {
?>
<div>
<form action="options.php" method="post">
<?php settings_fields('custom_settings'); ?>
<?php do_settings_sections('custom_settings'); ?>

<p class="submit">
   <input name="submit" id="submit" type="submit" class="button-primary" value="<?php esc_attr_e('Save Changes'); ?>" />
</p>
</form></div>

<?php
}
// for managing site basic settings
add_action('admin_init', 'add_theme_settings_cb');
// adding section and registering settings
function add_theme_settings_cb() {
 
add_settings_section('custom_setting_section','Custom settings section','contact_setting_section_cb','custom_settings');


add_settings_field( 'site_logo', 'Site Logo', 'site_logo_cb', 'custom_settings', 'custom_setting_section' );
add_settings_field( 'site_loader', 'Site Loader', 'site_loader_cb', 'custom_settings', 'custom_setting_section' );
add_settings_field( 'banner_content', 'Banner Content', 'banner_content_cb', 'custom_settings', 'custom_setting_section' );
add_settings_field( 'contact_email', 'Contact Email', 'contact_email_cb', 'custom_settings', 'custom_setting_section' );
add_settings_field( 'timing', 'Timing', 'timing_cb', 'custom_settings', 'custom_setting_section' );
add_settings_field( 'facebook_fan_page_url', 'Facebook Fan Page url', 'facebook_fan_page_url_cb', 'custom_settings', 'custom_setting_section' );
add_settings_field( 'twitter_fan_page_url', 'Twitter Fan Page url', 'twitter_fan_page_url_cb', 'custom_settings', 'custom_setting_section' );
add_settings_field( 'linkedin_page_url', 'Linkedin Page url', 'linkedin_page_url_cb', 'custom_settings', 'custom_setting_section' );
add_settings_field( 'registered_address', 'Registered Address', 'registered_address_cb', 'custom_settings', 'custom_setting_section' );
add_settings_field( 'branch_address', 'Branch Address', 'branch_address_cb', 'custom_settings', 'custom_setting_section' );
add_settings_field( 'phone_no', 'Phone No', 'phone_no_cb', 'custom_settings', 'custom_setting_section' );
add_settings_field( 'usa_phone_no', 'USA Phone No', 'usa_phone_no_cb', 'custom_settings', 'custom_setting_section' );
add_settings_field( 'footer_text', 'Footer Map Address', 'footer_text_cb', 'custom_settings', 'custom_setting_section' );




//add_settings_section('fb_setting_section','FB settings section','fb_setting_section_cb','custom_settings');

register_setting('custom_settings','site_logo');
register_setting('custom_settings','site_loader');
register_setting('custom_settings','contact_email');
register_setting('custom_settings','timing');
register_setting('custom_settings','facebook_fan_page_url');
register_setting('custom_settings','twitter_fan_page_url');
register_setting('custom_settings','linkedin_page_url');
register_setting('custom_settings','registered_address');
register_setting('custom_settings','branch_address');
register_setting('custom_settings','banner_content');
register_setting('custom_settings','footer_text');
register_setting('custom_settings','phone_no');
register_setting('custom_settings','usa_phone_no');



}
function contact_setting_section_cb(){
    echo '<p><i>Managing Custom Setting here...</i></p>';
}

// creating Conatct Fields block
function contact_email_cb() { 
echo '<input type="text" size="5" class="regular-text code" value="'.get_option('contact_email').'" id="contact_email" name="contact_email" />';
}
function timing_cb() { 
echo '<input type="text" size="5" class="regular-text code" value="'.get_option('timing').'" id="timing" name="timing" />';
}
function facebook_fan_page_url_cb() { 
echo '<input type="text" size="5" class="regular-text code" value="'.get_option('facebook_fan_page_url').'" id="facebook_fan_page_url" name="facebook_fan_page_url" />';
}
function twitter_fan_page_url_cb() { 
echo '<input type="text" size="5" class="regular-text code" value="'.get_option('twitter_fan_page_url').'" id="twitter_fan_page_url" name="twitter_fan_page_url" />';
}
function linkedin_page_url_cb() { 
echo '<input type="text" size="5" class="regular-text code" value="'.get_option('linkedin_page_url').'" id="linkedin_page_url" name="linkedin_page_url" />';
}
function phone_no_cb() { 
echo '<input type="text" size="5" class="regular-text code" value="'.get_option('phone_no').'" id="phone_no" name="phone_no" />';
}

function usa_phone_no_cb() { 
	echo '<input type="text" size="5" class="regular-text code" value="'.get_option('usa_phone_no').'" id="usa_phone_no" name="usa_phone_no" />';
	}

function registered_address_cb() { 
echo '<textarea id="registered_address" name="registered_address" class="regular-text code" rows="5" cols="40">'.get_option('registered_address').'</textarea>';
}

function branch_address_cb() { 
echo '<textarea id="branch_address" name="branch_address" class="regular-text code" rows="5" cols="40">'.get_option('branch_address').'</textarea>';
}

function banner_content_cb() { 
echo '<textarea id="banner_content" name="banner_content" class="regular-text code" rows="5" cols="40">'.get_option('banner_content').'</textarea>';
}

function footer_text_cb() { 
echo '<textarea id="footer_text" name="footer_text" class="regular-text code" rows="5" cols="40">'.get_option('footer_text').'</textarea>';
}
// function minimally_invasive_content_cb() { 
// echo '<textarea id="minimally_invasive_content" name="minimally_invasive_content" class="regular-text code" rows="5" cols="40">'.get_option('minimally_invasive_content').'</textarea>';
// }
// function minimally_invasive_clild_one_cb() { 
// echo '<input type="text" size="5" class="regular-text code" value="'.get_option('minimally_invasive_clild_one').'" id="minimally_invasive_clild_one" name="minimally_invasive_clild_one" />';
// }
// function minimally_invasive_clild_two_cb() { 
// echo '<input type="text" size="5" class="regular-text code" value="'.get_option('minimally_invasive_clild_two').'" id="minimally_invasive_clild_two" name="minimally_invasive_clild_two" />';
// }
// function minimally_invasive_clild_three_cb() { 
// echo '<input type="text" size="5" class="regular-text code" value="'.get_option('minimally_invasive_clild_three').'" id="minimally_invasive_clild_three" name="minimally_invasive_clild_three" />';
// }


/*Site Logo */
function site_logo_cb() { 

	if(function_exists( 'wp_enqueue_media' )){
		wp_enqueue_media();
	}else{
		wp_enqueue_style('thickbox');
		wp_enqueue_script('media-upload');
		wp_enqueue_script('thickbox');
	}
?>
<p><strong>Site Logo Image URL</strong>

                <img class="site_logo" src="<?php echo get_option('site_logo'); ?>" height="100" width="100"/>
                <input class="site_logo_banner_url" type="text" name="site_logo" size="60" value="<?php echo get_option('site_logo'); ?>">
                <a href="#" class="site_logo_upload">Upload</a>

</p>  

<?php 


/*Site Logo */
function site_loader_cb() { 

	if(function_exists( 'wp_enqueue_media' )){
		wp_enqueue_media();
	}else{
		wp_enqueue_style('thickbox');
		wp_enqueue_script('media-upload');
		wp_enqueue_script('thickbox');
	}
?>
<p><strong>Site Loader Image URL</strong>

                <img class="site_loader" src="<?php echo get_option('site_loader'); ?>" height="100" width="100"/>
                <input class="site_loader_banner_url" type="text" name="site_loader" size="60" value="<?php echo get_option('site_loader'); ?>">
                <a href="#" class="site_loader_upload">Upload</a>

</p> 




<script>
    jQuery(document).ready(function($) {
        $('.site_logo_upload').click(function(e) {
            e.preventDefault();

            var custom_uploader = wp.media({
                title: 'Custom Image',
                button: {
                    text: 'Upload Image'
                },
                multiple: false  // Set this to true to allow multiple files to be selected
            })
            .on('select', function() {
                var attachment = custom_uploader.state().get('selection').first().toJSON();
                $('.site_logo').attr('src', attachment.url);
                $('.site_logo_banner_url').val(attachment.url);

            })
            .open();
        });
    });

	jQuery(document).ready(function($) {
        $('.site_loader_upload').click(function(e) {
            e.preventDefault();

            var custom_uploader = wp.media({
                title: 'Custom Image',
                button: {
                    text: 'Upload Image'
                },
                multiple: false  // Set this to true to allow multiple files to be selected
            })
            .on('select', function() {
                var attachment = custom_uploader.state().get('selection').first().toJSON();
                $('.site_loader').attr('src', attachment.url);
                $('.site_loader_banner_url').val(attachment.url);

            })
            .open();
        });
    });
</script>
<?php
}
}

function wpse13669_show_all_children( $post_id, $current_level ) {
    $children = get_posts( array(
        'post_type' =>'page',
        'posts_per_page' =>-1,
        'post_parent' => $post_id,
        'order_by' => 'title',
        'order' => 'ASC' ) );
    if ( empty($children) ) return;

    // echo '<ul class="children level-'.$current_level.'-children">';
	$fn_html = '';
    foreach ($children as $child) {

        /* Here would be the point where you
            do whatever you want to display the 
            posts. The variable $current_level can
            be used if you want to style different 
            levels in the hierarchy differently */

            //echo '<li>';

        // echo '<a href="'.get_permalink($child->ID).'">';
        // echo apply_filters( 'the_title', $child->post_title );
		// echo '</a>';
		
		// $fn_html.= '<div class="col-md-4"><a href="'.get_permalink($child->ID).'" class="portion"><img src="'.wp_get_attachment_url( get_post_thumbnail_id($child->ID) ). '" alt="'.apply_filters( 'the_title', $child->post_title ). '" title="'.apply_filters( 'the_title', $child->post_title ). '"><h3>'. apply_filters( 'the_title', $child->post_title ). '</h3><p>'. apply_filters( 'the_content', $child->post_content ). '</p><span class="explore">Explore</span></a></div>';

		$fn_html .= '<div class="col-md-4"><a href="' . get_permalink($child->ID) . '" class="portion"><img src="' . wp_get_attachment_url(get_post_thumbnail_id($child->ID)) . '" alt="' . apply_filters('the_title', $child->post_title) . '" title="' . apply_filters('the_title', $child->post_title) . '"><h3>' . apply_filters('the_title', $child->post_title) . '</h3><p>' . substr(strip_tags(apply_filters('the_content', $child->post_content)), 0, 150) . '[...]</p><span class="explore">Explore</span></a></div>';


        // now call the same function for child of this child
        //wpse13669_show_all_children( $child->ID, $current_level+1 );

            //echo '</li>';

        }

	// echo '</ul>';
	return $fn_html;

	}
	
	function cc_mime_types( $mimes ){
		$mimes['svg'] = 'image/svg+xml';
		return $mimes;
	  }
	  add_filter( 'upload_mimes', 'cc_mime_types' );

	  function add_custom_post_share() {
		if ( is_single() ) {
			$post_title = urlencode( get_the_title() );
			$post_url = urlencode( get_permalink() );
	
			$twitter_url = 'https://twitter.com/intent/tweet?text=' . $post_title . '&amp;url=' . $post_url;
			$facebook_url = 'https://www.facebook.com/sharer/sharer.php?u=' . $post_url;
			$linkedin_url = 'https://www.linkedin.com/shareArticle?mini=true&amp;url=' . $post_url . '&amp;title=' . $post_title;
	
			echo '<ul class="floating_social">';
			echo '<li><strong>Share</strong> </li>';
			echo '<li class="facebook"><a href="' . $facebook_url . '" target="_blank"><i class="fab fa-facebook-f"></i></a></li>';
			echo '<li class="twitter"><a href="' . $twitter_url . '" target="_blank"><i class="fab fa-twitter"></i></a></li>';
			echo '<li class="linkedin"><a href="' . $linkedin_url . '" target="_blank"><i class="fab fa-linkedin-in"></i></a></li>';
			echo '</ul>';
		}
	}
	//add_action( 'wp_footer', 'add_custom_post_share' );

	function send_demo_email() {
		if ( isset($_POST['send_demo_email_nonce']) && wp_verify_nonce($_POST['send_demo_email_nonce'], 'send_demo_email_action') ) {
			// Perform additional validation if needed
			
			// Redirect to a different page or display a message after form submission
			wp_safe_redirect('/form-submitted/');
			exit;
		}
	}
	add_action( 'admin_post_nopriv_send_demo_email', 'send_demo_email' );
	add_action( 'admin_post_send_demo_email', 'send_demo_email' );
	add_filter('wpcf7_autop_or_not', '__return_false');
	remove_filter('the_content', 'wpautop');
	
	// Add a custom action after successful form submission
add_action('wpcf7_mail_sent', 'my_custom_action_after_submission', 10, 1);

//  Custom post type pagination function 
	
function cpt_pagination($pages = '', $range = 4)
{
	$showitems = ($range * 2)+1;
	global $paged;
	if(empty($paged)) $paged = 1;
	if($pages == '')
	{
		global $wp_query;
		$pages = $wp_query->max_num_pages;
		if(!$pages)
		{
			$pages = 1;
		}
	}
	if(1 != $pages)
	{
		echo " <ul class=''>";
		if($paged > 2 && $paged > $range+1 && $showitems < $pages) echo " <li class=''><a href='".get_pagenum_link(1)."'>&laquo; First</a></li>";
		if($paged > 1 && $showitems < $pages) echo "<li class=''><a href='".get_pagenum_link($paged - 1)."'>&lsaquo; Previous</a></li>";
		for ($i=1; $i <= $pages; $i++)
		{
			if (1 != $pages &&( !($i >= $paged+$range+1 || $i <= $paged-$range-1) || $pages <= $showitems ))
			{
				echo ($paged == $i)? "<li class=\"current\"><a class=''>".$i."</a></li>":"<li class=''> <a href='".get_pagenum_link($i)."' class=\"\">".$i."</a></li>";
			}
		}
		if ($paged < $pages && $showitems < $pages) echo " <li class=''><a class='' href=\"".get_pagenum_link($paged + 1)."\"><i class='fa fa-angle-right'></i></a></li>";
		if ($paged < $pages-1 &&  $paged+$range-1 < $pages && $showitems < $pages) echo " <li class=''><a class='' href='".get_pagenum_link($pages)."'><i class='fa fa-angle-double-right'></i></a></li>";
		echo "</ul>\n";
	}
}

function generate_math_captcha($whichDemo = 'requestDemo') {
	session_start();

    $operators = array('+', '-');
    $num1 = rand(11, 20);
    $num2 = rand(1, 10);
    $operator = $operators[array_rand($operators)];

    switch ($operator) {
        case '+':
            $result = $num1 + $num2;
            break;
        case '-':
            $result = $num1 - $num2;
            break;
        case '*':
            $result = $num1 * $num2;
            break;
        case '/':
            $result = $num1 / $num2;
            break;
    }
	if($whichDemo == 'bookDemo') {
	$_SESSION['bookDemo_captcha'] = $result;
	} else {
	$_SESSION['requestDemo_captcha'] = $result;
	}

    $captcha = "$num1 $operator $num2";
    return $captcha;
}

// function custom_cf7_submission_tracking( $result, $form ) {
//     // Replace 'your-form-id' with the ID of the Contact Form 7 form you want to track
//     if ( $form->id() === '848' ) {
//         echo "<script>window.lintrk('track', { conversion_id: 14717353 });</script>";
//     } else if ( $form->id() === '6' ) {
//         echo "<script>window.lintrk('track', { conversion_id: 14717353 });</script>";
//     } else {
// 		echo "<script>window.lintrk('track', { conversion_id: 14717337 });</script>";
// 	}

//     return $result;
// }
// add_action( 'wpcf7_mail_sent', 'custom_cf7_submission_tracking', 10, 2 );






	

Youez - 2016 - github.com/yon3zu
LinuXploit