* @package vamtam/consulting */ /** * class VamtamAdmin */ class VamtamAdmin { /** * Initialize the theme admin */ public static function actions() { if ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) { add_action( 'admin_init', array( 'VamtamUpdateNotice', 'check' ) ); } add_action( 'admin_footer', array( __CLASS__, 'icons_selector' ) ); add_action( 'add_meta_boxes', array( __CLASS__, 'load_metaboxes' ) ); add_action( 'save_post', array( __CLASS__, 'load_metaboxes' ) ); add_filter( 'admin_notices', array( __CLASS__, 'update_warning' ) ); add_action( 'admin_init', array( __CLASS__, 'setup_settings' ) ); self::load_functions(); new VamtamPurchaseHelper; new VamtamHelpPage; require_once VAMTAM_ADMIN_HELPERS . 'updates/version-checker.php'; if ( ! get_option( VAMTAM_THEME_SLUG . '_vamtam_theme_activated', false ) ) { update_option( VAMTAM_THEME_SLUG . '_vamtam_theme_activated', true ); delete_option( 'default_comment_status' ); } } public static function setup_settings() { add_settings_field( 'vamtam_custom_font_families', esc_html__( 'Custom Font Families', 'vamtam-consulting' ), array( __CLASS__, 'custom_font_families_settings_field' ), 'general' ); register_setting( 'general', 'vamtam_custom_font_families' ); add_settings_field( 'vamtam_featured_images_ratio', esc_html__( 'Featured images width-to-height ratio', 'vamtam-consulting' ), array( __CLASS__, 'featured_images_settings_field' ), 'media' ); register_setting( 'media', 'vamtam_featured_images_ratio' ); } public static function custom_font_families_settings_field() { $value = get_option( 'vamtam_custom_font_families' ); ?>
1.3, VAMTAM_THUMBNAIL_PREFIX . 'single' => 1.3, ) ); ?>'; ; esc_html_e( 'Hey, just a polite reminder that if you update WordPress you will also need to update your theme and plugins.', 'vamtam-consulting' ); echo ''; echo '
'; printf( wp_kses_post( __( 'You should see any available theme updates on this page if you have entered your purchase information in Settings / VamTam Purchase', 'vamtam-consulting' ) ), esc_url( admin_url( 'themes.php?page=vamtam_theme_setup' ) ) ); echo '
'; esc_html_e( "Please note that if we haven't released an update, you shouldn't update your WordPress and plugins until we release one. Otherwise you may run into various compatibility issues.", 'vamtam-consulting' ); echo '
'; printf( wp_kses_post( __( 'If you are unsure as to whether it is safe to update your site, please do ask us at %2$s and we\'ll help you.', 'vamtam-consulting' ) ), esc_url( 'http://support.vamtam.com' ), 'our support site' ); echo '
'; } if ( did_action( 'load-update-core.php' ) || did_action( 'load-themes.php' ) ) { echo ''; ; esc_html_e( 'VamTam theme resources: ', 'vamtam-consulting' ); echo ''; echo ''; esc_html_e( 'Sample child themes', 'vamtam-consulting' ); echo '; '; echo ''; esc_html_e( 'Changelog', 'vamtam-consulting' ); echo ''; echo '