app_id;
$json[ 'user_hash' ] = (string) hash_hmac(
'sha256',
$current_user->user_email,
$this->secret_key
);
/**
* User centric data
*/
$json[ 'email' ] = (string) $current_user->user_email;
$json[ 'name' ] = (string) $current_user->display_name;
$json[ 'created_at' ] = strtotime( $current_user->user_registered );
$json[ 'company' ] = strtotime( get_bloginfo( 'name' ) );
/**
* Child theme information
*/
$this->theme = wp_get_theme();
if( 'layerswp' != $this->theme->get( 'TextDomain' ) ){
$json[ 'Theme' ] = (string) $this->theme->get( 'Name' );
$json[ 'Theme Author' ] = (string) $this->theme->get( 'Author' );
$json[ 'Theme Author URL' ] = (string) $this->theme->get( 'AuthorURI' );
}
/**
* Layers specific data
*/
$this->layers_theme = wp_get_theme( 'layerswp' );
$json[ 'WordPress Version' ] = $wp_version;
$json[ 'Layers Version' ] = $this->layers_theme->get( 'Version' );
$json[ 'Layers Page Count' ] = (float) count( layers_get_builder_pages() );
/**
* Website URL
*/
$json[ 'Website URL' ] = (string) get_home_url();
/**
* Important plugins
*/
$json[ 'Easy Digital Downloads' ] = (bool) ( class_exists( 'Easy_Digital_Downloads' ) ? 1 : 0 );
$json[ 'WooCommerce' ] = (bool) ( class_exists( 'WooCommerce' ) ? 1 : 0 );
$json[ 'Layers Updater' ] = (bool) ( class_exists( 'Layers_Updater' ) || is_plugin_active_for_network( 'Layers_Updater') ? 1 : 0 );
if( class_exists( 'Layers_DevKit' ) && defined( 'LAYERS_DEVKIT_VER' ) ) {
$json[ 'DevKit' ] = LAYERS_DEVKIT_VER;
}
if( class_exists( 'Layers_ColorKit' ) && defined( 'LAYERS_COLORKIT_VER' ) ) {
$json[ 'ColorKit' ] = LAYERS_COLORKIT_VER;
}
if( class_exists( 'Layers_WooCommerce' ) && defined( 'LAYERS_STOREKIT_VER' ) ) {
$json[ 'StoreKit' ] = LAYERS_STOREKIT_VER;
}
if( class_exists( 'Layers_Showcase' ) && defined( 'LAYERS_SHOWCASE_VER' ) ) {
$json[ 'Showcase' ] = LAYERS_SHOWCASE_VER;
}
if( class_exists( 'Layers_Pro' ) && defined( 'LAYERS_PRO_VER' ) ) {
$json[ 'Layers Pro' ] = LAYERS_PRO_VER;
}
if( get_option( 'info_site_usage' ) ) {
$json[ 'Site Category' ] = get_option( 'info_site_usage' );
}
$json[ 'Skill Level' ] = get_option( 'layers_info_developer' );
$json[ 'Launchpad' ] = ( class_exists( 'apollo_launchpad' ) ? 1 : 0 );
$launchpad = get_option( 'apollo_display_options' );
if( isset( $launchpad['launchdate'] ) ){
$json[ 'launched_at' ] = strtotime( $launchpad['launchdate'] );
}
$json[ 'Custom CSS' ] = (bool) layers_get_theme_mod( 'custom-css' );
// jsonify the settings
$settings_json = json_encode( (object) $json, ( defined( 'JSON_PRETTY_PRINT' ) ? JSON_PRETTY_PRINT : TRUE ) ); ?>