Last active
August 26, 2020 17:31
-
-
Save taotiwordpress/8471839ac2c5638cbe987aad380b431d to your computer and use it in GitHub Desktop.
[lorium ipson populate acf text field] function to populate acf fields #php #acf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function field_with_ipsum_fallback( $text ) { | |
if ( ! empty( $text ) ) { | |
echo $text; | |
} else { | |
echo 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque pellentesque risus vel venenatis faucibus. Nam id pharetra nisl. Nullam viverra eu nisi vel placerat. Donec faucibus blandit dictum'; | |
} | |
} | |
function heading_with_ipsum_fallback( $heading ) { | |
if ( ! empty( $heading ) ) { | |
echo $heading; | |
} else { | |
echo 'Lorem ipsum dolor sit amet'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment