wordpress/wp-content/themes/basic/themify/themify-builder/classes/class-themify-builder.php
/**
		 * Load pages for maintenance page dropdown
		 */
Load pages for maintenance page dropdown
Load pages for maintenance page dropdown
public function load_maintenance_pages() {
			check_ajax_referer( 'ajax-nonce', 'nonce' );
			$pages = get_pages();
			$selected = themify_builder_get( 'setting-page_builder_maintenance_page', 'tools_maintenance_page' );
			$output = sprintf( '<option value=""%s></option>',selected('',$selected));
			foreach ( $pages as $page ) {
				$val = $page->post_name;
				$post_parent = $page->post_parent;
				while ( $post_parent !== 0 ) {
					$post_aux = get_post( $post_parent );
					$val = $post_aux->post_name.'/'.$val;
					$post_parent = $post_aux->post_parent;
				}
				$output .= sprintf( '<option value="%s"%s>%s</option>',
					$val,
					selected($val,$selected),
					$page->post_title
				);
			}
			echo $output;
			die();
		}
public function load_maintenance_pages ( ) { check_ajax_referer ( 'ajax-nonce' , 'nonce' ) ; $ pages = get_pages ( ) ; $ selected = themify_builder_get ( 'setting-page_builder_maintenance_page' , 'tools_maintenance_page' ) ; $ output = sprintf ( '<option value=""%s></option>' , selected ( '' , $ selected ) ) ; foreach ( $ pages as $ page ) { $ val = $ page -> post_name ; $ post_parent = $ page -> post_parent ; while ( $ post_parent !== 0 ) { $ post_aux = get_post ( $ post_parent ) ; $ val = $ post_aux -> post_name . '/' . $ val ; $ post_parent = $ post_aux -> post_parent ; } $ output .= sprintf ( '<option value="%s"%s>%s</option>' , $ val , selected ( $ val , $ selected ) , $ page -> post_title ) ; } echo $ output ; die ( ) ; }
Load pages for maintenance page dropdown
Load pages for maintenance page dropdown