wordpress/wp-content/themes/basic/themify/themify-builder/classes/class-themify-global-styles.php
/**
	 * Return Global Styles page content
	 *
	 * @access static
	 * @return String
	 */
Return Global Styles page content
@access static
@return String
Return Global Styles page content @access static @return String
public static function page_content() {
		$page_status = empty( $_GET['status'] ) ? 'publish' : $_GET['status'];
		$args = array(
			'preview' => true,
			'status' => $page_status,
			'limit' => 20,
			'paged' => isset( $_GET['pagenum'] ) ? absint( $_GET['pagenum'] ) : 1
		);
		if ( !empty( $_GET['s'] ) ) {
			$args['search'] = sanitize_text_field( $_GET['s'] );
		}
		$globalStyles = self::get_global_styles( $args );
		if ( !empty( $globalStyles ) ) {
			wp_enqueue_style( 'themify-builder-style', themify_enque( THEMIFY_BUILDER_URI . '/css/themify-builder-style.css' ), null, THEMIFY_VERSION );
			if ( is_rtl() ) {
				wp_enqueue_style( 'themify-builder-style-rtl', themify_enque( THEMIFY_BUILDER_URI . '/css/themify-builder-style-rtl.css' ), null, THEMIFY_VERSION );
			}
			wp_register_script( 'themify-main-script', themify_enque( THEMIFY_URI . '/js/main.js' ), null, THEMIFY_VERSION, true );
			global $ThemifyBuilder;
			$ThemifyBuilder->footer_js();
			Themify_Enqueue_Assets::loadMainScript();
			wp_enqueue_script( 'themify-builder-js', themify_enque( THEMIFY_BUILDER_URI . '/js/themify.builder.script.js' ), null, THEMIFY_VERSION, true );
		}
		wp_enqueue_media();
		wp_enqueue_script( 'plupload-all' );
		wp_enqueue_script( 'themify-plupload' );
		$button = themify_get_uploader( 'tb_gs_import', array(
				'label' => __( 'Import', 'themify' ),
				'preset' => false,
				'preview' => false,
				'tomedia' => false,
				'topost' => '',
				'fields' => '',
				'featured' => '',
				'message' => '',
				'fallback' => '',
				'dragfiles' => false,
				'confirm' => __( 'This will import the global style. Press OK to continue, Cancel to stop.', 'themify' ),
				'medialib' => false,
				'formats' => 'txt',
				'type' => '',
				'action' => 'tb_import_gs_posts_ajax',
				'button_class' => 'page-title-action',
			)
		);
		?>
		<div id="tb_admin_gs_container" class="wrap">
			<!-- Just used for admin notice placement-->
			<h2 style="display: none;"></h2>
			<h3 class="page-title"><?php _e( 'Global Styles', 'themify' ); ?></h3>
			<a href="#tb_new_gs_form"
			   class="page-title-action tb_add_new_gs"><?php _e( 'Add new', 'themify' ) ?></a>
			<div class="tb_gs_import_button"><?php echo $button; ?></div>
			<div class="tb_gs_admin_page_header">
				<div class="tb_gs_post_status">
					<a <?php echo 'publish' === $page_status ? 'class="tb_gs_active_page"' : ''; ?>
							href="<?php echo admin_url( 'admin.php?page=themify-global-styles&status=publish' ); ?>"><?php _e( 'Published', 'themify' ); ?></a>
					<a <?php echo 'trash' === $page_status ? 'class="tb_gs_active_page"' : ''; ?>
							href="<?php echo admin_url( 'admin.php?page=themify-global-styles&status=trash' ); ?>"><?php _e( 'Trash', 'themify' ); ?></a>
				</div>
				<div class="tb_gs_admin_search">
					<form>
						<input type="text" name="s" value="<?php echo isset($_GET['s'])?$_GET['s']:''?>">
						<input type="hidden" name="page" value="themify-global-styles">
						<input type="hidden" name="status" value="<?php echo $page_status; ?>">
						<button type="submit"><?php _e( 'Search', 'themify' ); ?></button>
					</form>
				</div>
			</div>
			<?php if ( !empty( $_GET['s'] ) ): ?>
				<h3><?php echo sprintf( __( 'Search Results for ', 'themify' ) . '%s', $_GET['s'] ); ?></h3>
			<?php endif; ?>
			<div class="tb_admin_gs_list" data-list="<?php echo $page_status; ?>">
		<?php if ( !empty( $globalStyles ) ): ?>
			<?php foreach ( $globalStyles as $style ): ?>
						<div class="tb_gs_element">
							<div class="tb_gs_thumbnail_container">
								<span class="tb_admin_gs_type"><?php echo $style['type']; ?></span>
								<a href="#" class="tb_remove_gs tf_close" data-id="<?php echo $style['id']; ?>"></a>
								<?php
				if ( 'publish' === $page_status ): ?>
									<a href="<?php echo self::export_url($style['id']); ?>" target="_blank" class="tb_gs_export tb_export" data-id="<?php echo $style['id']; ?>"><?php echo themify_get_icon('export','ti'); ?></a>
				<?php else: ?>
									<a href="#" class="tb_gs_restore" data-id="<?php echo $style['id']; ?>"><?php echo themify_get_icon('back-left','ti'); ?></a>
				<?php endif; ?>
								<div data-builder="<?php echo esc_url( $style['url'] ); ?>#builder_active"
									 class="tb_gs_preview_container">
									<a href="<?php echo 'publish' === $page_status ? esc_url( $style['url'] ) . '#builder_active' : '#'; ?>"
									   class="tb_gs_preview_overlay"></a>
									<?php echo $style['preview']; ?>
								</div>
							</div>
							<span class="tb_admin_gs_title"><?php echo $style['title']; ?></span>
						</div>
					<?php endforeach; ?>
				<?php else: ?>
					<p class="wp-heading-inline"><?php _e( 'No Global Styles found.', 'themify' ); ?></p>
				<?php endif; ?>
			</div>
			<?php self::add_new_form(); ?>
			<?php self::pagination(); ?>
		</div>
		<?php
	}
public static function page_content ( ) { $ page_status = empty ( $ _GET [ 'status' ] ) ? 'publish' : $ _GET [ 'status' ] ; $ args = array ( 'preview' => true , 'status' => $ page_status , 'limit' => 20 , 'paged' => isset ( $ _GET [ 'pagenum' ] ) ? absint ( $ _GET [ 'pagenum' ] ) : 1 ) ; if ( ! empty ( $ _GET [ 's' ] ) ) { $ args [ 'search' ] = sanitize_text_field ( $ _GET [ 's' ] ) ; } $ globalStyles = self :: get_global_styles ( $ args ) ; if ( ! empty ( $ globalStyles ) ) { wp_enqueue_style ( 'themify-builder-style' , themify_enque ( THEMIFY_BUILDER_URI . '/css/themify-builder-style.css' ) , null , THEMIFY_VERSION ) ; if ( is_rtl ( ) ) { wp_enqueue_style ( 'themify-builder-style-rtl' , themify_enque ( THEMIFY_BUILDER_URI . '/css/themify-builder-style-rtl.css' ) , null , THEMIFY_VERSION ) ; } wp_register_script ( 'themify-main-script' , themify_enque ( THEMIFY_URI . '/js/main.js' ) , null , THEMIFY_VERSION , true ) ; global $ ThemifyBuilder ; $ ThemifyBuilder -> footer_js ( ) ; Themify_Enqueue_Assets :: loadMainScript ( ) ; wp_enqueue_script ( 'themify-builder-js' , themify_enque ( THEMIFY_BUILDER_URI . '/js/themify.builder.script.js' ) , null , THEMIFY_VERSION , true ) ; } wp_enqueue_media ( ) ; wp_enqueue_script ( 'plupload-all' ) ; wp_enqueue_script ( 'themify-plupload' ) ; $ button = themify_get_uploader ( 'tb_gs_import' , array ( 'label' => __ ( 'Import' , 'themify' ) , 'preset' => false , 'preview' => false , 'tomedia' => false , 'topost' => '' , 'fields' => '' , 'featured' => '' , 'message' => '' , 'fallback' => '' , 'dragfiles' => false , 'confirm' => __ ( 'This will import the global style. Press OK to continue, Cancel to stop.' , 'themify' ) , 'medialib' => false , 'formats' => 'txt' , 'type' => '' , 'action' => 'tb_import_gs_posts_ajax' , 'button_class' => 'page-title-action' , ) ) ; ?> <div id="tb_admin_gs_container" class="wrap">
			<!-- Just used for admin notice placement-->
			<h2 style="display: none;"></h2>
			<h3 class="page-title"> <?php _e ( 'Global Styles' , 'themify' ) ; ?> </h3>
			<a href="#tb_new_gs_form"
			   class="page-title-action tb_add_new_gs"> <?php _e ( 'Add new' , 'themify' ) ?> </a>
			<div class="tb_gs_import_button"> <?php echo $ button ; ?> </div>
			<div class="tb_gs_admin_page_header">
				<div class="tb_gs_post_status">
					<a  <?php echo 'publish' === $ page_status ? 'class="tb_gs_active_page"' : '' ; ?> href=" <?php echo admin_url ( 'admin.php?page=themify-global-styles&status=publish' ) ; ?> "> <?php _e ( 'Published' , 'themify' ) ; ?> </a>
					<a  <?php echo 'trash' === $ page_status ? 'class="tb_gs_active_page"' : '' ; ?> href=" <?php echo admin_url ( 'admin.php?page=themify-global-styles&status=trash' ) ; ?> "> <?php _e ( 'Trash' , 'themify' ) ; ?> </a>
				</div>
				<div class="tb_gs_admin_search">
					<form>
						<input type="text" name="s" value=" <?php echo isset ( $ _GET [ 's' ] ) ? $ _GET [ 's' ] : '' ?> ">
						<input type="hidden" name="page" value="themify-global-styles">
						<input type="hidden" name="status" value=" <?php echo $ page_status ; ?> ">
						<button type="submit"> <?php _e ( 'Search' , 'themify' ) ; ?> </button>
					</form>
				</div>
			</div>
			 <?php if ( ! empty ( $ _GET [ 's' ] ) ) : ?> <h3> <?php echo sprintf ( __ ( 'Search Results for ' , 'themify' ) . '%s' , $ _GET [ 's' ] ) ; ?> </h3>
			 <?php endif ; ?> <div class="tb_admin_gs_list" data-list=" <?php echo $ page_status ; ?> ">
		 <?php if ( ! empty ( $ globalStyles ) ) : ?> <?php foreach ( $ globalStyles as $ style ) : ?> <div class="tb_gs_element">
							<div class="tb_gs_thumbnail_container">
								<span class="tb_admin_gs_type"> <?php echo $ style [ 'type' ] ; ?> </span>
								<a href="#" class="tb_remove_gs tf_close" data-id=" <?php echo $ style [ 'id' ] ; ?> "></a>
								 <?php if ( 'publish' === $ page_status ) : ?> <a href=" <?php echo self :: export_url ( $ style [ 'id' ] ) ; ?> " target="_blank" class="tb_gs_export tb_export" data-id=" <?php echo $ style [ 'id' ] ; ?> "> <?php echo themify_get_icon ( 'export' , 'ti' ) ; ?> </a>
				 <?php else : ?> <a href="#" class="tb_gs_restore" data-id=" <?php echo $ style [ 'id' ] ; ?> "> <?php echo themify_get_icon ( 'back-left' , 'ti' ) ; ?> </a>
				 <?php endif ; ?> <div data-builder=" <?php echo esc_url ( $ style [ 'url' ] ) ; ?> #builder_active"
									 class="tb_gs_preview_container">
									<a href=" <?php echo 'publish' === $ page_status ? esc_url ( $ style [ 'url' ] ) . '#builder_active' : '#' ; ?> "
									   class="tb_gs_preview_overlay"></a>
									 <?php echo $ style [ 'preview' ] ; ?> </div>
							</div>
							<span class="tb_admin_gs_title"> <?php echo $ style [ 'title' ] ; ?> </span>
						</div>
					 <?php endforeach ; ?> <?php else : ?> <p class="wp-heading-inline"> <?php _e ( 'No Global Styles found.' , 'themify' ) ; ?> </p>
				 <?php endif ; ?> </div>
			 <?php self :: add_new_form ( ) ; ?> <?php self :: pagination ( ) ; ?> </div>
		 <?php }
Return Global Styles page content
 @access static
 @return String
Return Global Styles page content @access static @return String
// Enqueue media scripts // Plupload