function tinybuddha_get_custom_css_file_path() { return get_stylesheet_directory() . '/css/custom-theme-options.css'; } function tinybuddha_sync_custom_css_file() { $css = (string) get_option( 'dm_custom_css', '' ); $css = trim( $css ); $file_path = tinybuddha_get_custom_css_file_path(); $dir_path = dirname( $file_path ); if ( ! is_dir( $dir_path ) ) { $created = wp_mkdir_p( $dir_path ); if ( ! $created ) { update_option( 'tinybuddha_custom_css_file_error', 1, false ); return false; } } $written = file_put_contents( $file_path, "/* Tiny Buddha custom theme options CSS */ " . $css . " " ); if ( false === $written ) { update_option( 'tinybuddha_custom_css_file_error', 1, false ); return false; } delete_option( 'tinybuddha_custom_css_file_error' ); return true; } function tinybuddha_maybe_sync_custom_css_file() { if ( is_admin() ) { tinybuddha_sync_custom_css_file(); } } add_action( 'init', 'tinybuddha_maybe_sync_custom_css_file', 20 ); function tinybuddha_custom_css_file_admin_notice() { if ( ! current_user_can( 'manage_options' ) ) { return; } if ( ! isset( $_GET['page'] ) || 'theme-options.php' !== $_GET['page'] ) { return; } $file_path = tinybuddha_get_custom_css_file_path(); if ( ! get_option( 'tinybuddha_custom_css_file_error' ) && file_exists( $file_path ) && is_writable( $file_path ) ) { return; } echo '

'; echo esc_html__( 'Tiny Buddha could not write custom CSS to wp-content/themes/tinybuddha/css/custom-theme-options.css. Styles will be loaded inline as a fallback.', 'tinybuddha' ); echo '

'; } add_action( 'admin_notices', 'tinybuddha_custom_css_file_admin_notice' ); Fun & Inspiring Archives - Page 169 of 181 - Tiny Buddha
Menu

Forgiveness Doesn’t Excuse Their Behavior

Look at What’s a Blessing, Not as What’s Depressing

Count your blessings with Tiny Buddha’s Gratitude Journal! Pre-order here.

A Smooth Sea Never Made a Skilled Sailor

Be Good to People for No Reason

Life Gets So Much Better When You Stop Taking Things Personally

Be Strong, Smart, and Brave

The Balance in Your Life

If You’re Always Trying to Be Normal…

To Be Kind Is More Important Than to Be Right

Live Simple, Dream Big

Never Take This Life for Granted

It Can’t Rain Forever

Don’t Allow Their Judgment to Become Your Truth

This Is Not Your Destruction, This Is Your Birth

Every Day Is a New Beginning

The Storm Will Pass

A Little More Kindness, a Little Less Judgment

Today, I Am Counting My Blessings

Get Tiny Buddha’s Gratitude Journal here

Hurt People, Hurt People

Who Am I to Judge?