using filter and hook inside class

No, constructors should not define hooks. Constructors should be used to set the initial state of the object. Hooks have nothing to do with the object’s initial state, so they don’t belong in the constructor. Constructors should not have “side effects”, so that using new ClassName() does not affect any other parts of the program, … Read more

Advanced Custom Forms PHP formatting for do_shortcode

Even though you are echoing the shortcode, I think you still need to echo the ACF field inside the string of the do_shortcode function. Change your ACF field return function for the_field() : <?php echo do_shortcode(“[tnc-pdf-viewer-iframe file=”.the_field(‘document_link’).” width=”900px” height=”700px” download=”false” print=”false” fullscreen=”true” share=”true” zoom=”true” open=”true” pagenav=”true” logo=”true” find=”true” current_view=”true” rotate=”true” handtool=”true” doc_prop=”true” toggle_menu=”true” toggle_left=”true” scroll=”true” … Read more