'; echo '' . esc_html( $total_files->publish ) . ''; echo '' . esc_html__( 'Ticks', 'wplt2' ) . ''; echo ''; } /** * Register settings page. * * @return void */ public static function register_settings_page() { add_submenu_page( 'edit.php?post_type=wplt2_tick', 'Liveticker2 ' . __( 'Settings', 'wplt2' ), __( 'Settings', 'wplt2' ), 'manage_options', 'wplt2_settings', array( 'WPLiveticker2_Admin', 'settings_page', ) ); } /** * Register settings API * * @return void */ public static function register_settings() { register_setting( 'wplt2_settings', 'wplt2', array( 'WPLiveticker2_Admin', 'validate_settings' ) ); // Form sections. add_settings_section( 'wplt2_settings_general', __( 'General', 'wplt2' ), array( 'WPLiveticker2_Admin', 'settings_general_section' ), __FILE__ ); add_settings_section( 'wplt2_settings_uninstall', __( 'Uninstall', 'wplt2' ), array( 'WPLiveticker2_Admin', 'settings_uninstall_section' ), __FILE__ ); // Form fields. add_settings_field( 'enable_css', __( 'Default CSS Styles', 'wplt2' ), array( 'WPLiveticker2_Admin', 'settings_enable_css_field' ), __FILE__, 'wplt2_settings_general' ); add_settings_field( 'reset_settings', __( 'Reset Settings', 'wplt2' ), array( 'WPLiveticker2_Admin', 'settings_reset_settings_field' ), __FILE__, 'wplt2_settings_uninstall' ); } /** * Render general section. * * @return void */ public static function settings_general_section() { } /** * Render uninstall section. * * @return void */ public static function settings_uninstall_section() { } /** * Render enable css field. * * @return void */ public static function settings_enable_css_field() { $checked = self::$_options['enable_css']; echo ''; echo '

' . esc_html__( 'Disable this option to remove the default button styling and the Delightful Downloads CSS file.', 'wplt2' ) . '

'; } /** * Render default style field. * * @return void */ public static function settings_default_style_field() { $styles = wplt_get_shortcode_styles(); $default_style = self::$_options['default_style']; echo ''; echo '

' . esc_html__( 'The default display style.', 'wplt2' ) . '

'; } /** * Render reset settings field * * @return void */ public static function settings_reset_settings_field() { $checked = self::$_options['reset_settings']; echo ''; } /** * Render the settings page. * * @return void */ public static function settings_page() { ?>

Liveticker

' . esc_html__( 'Settings updated successfully.', 'wplt2' ) . '

'; } ?>