From a91c74f025c0e9fe3d57d74e756819ad0f74c2ea Mon Sep 17 00:00:00 2001 From: jorge-vitrubio Date: Sat, 23 Jul 2022 16:29:03 +0200 Subject: [PATCH] render shortcode and include image in help metabox --- assets/img/PFC-icon.png | Bin 0 -> 10311 bytes hangar-wp-plugin.php | 4 +++- includes/hangar-extracontent-in-postpage.php | 11 ++++++----- 3 files changed, 9 insertions(+), 6 deletions(-) create mode 100644 assets/img/PFC-icon.png diff --git a/assets/img/PFC-icon.png b/assets/img/PFC-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..7b287a794a417f16924167cc694bcb4d886ee896 GIT binary patch literal 10311 zcmeHtXH-+$)^_MfuhJ1By+aZRq4(ZG6GS0|0HK5cp-7dgpwf#3Y0^bhsshrai--sa zQU#<7s7O=F8$9Qpd+zw&KX;7p{dbbFvv=m2^OoTS#^V@ z@|&*tPiOp-V}yqy+g5&Yghi;$+rFNkcvXX=T${N5g1=jPyU*cuk)EBzwyXB@tad(oW>=>- zLsySg#!e3lEbrM!jJ+A=4zK=jWA5Q_W-vw)JRTJ4{G)YrII3Vi()8YA(R`M)RX4+V zYoU{5^w%p#9F~3$*wb1aUx)Iyc7(zQm|kGd91iKu#P7HFtt7LbusNQ+Zd6ui(i1+* zYH&=B>>PUP7TI~PTCHov_5(iL%plUV>N!Cks+>_keeyCTVpi=mVzsetc(EWkoAK37 z5w^Yj*WB#(G`NNR|?!X^yXXlYvkR*o*#7bX=6)<#9AMMUeuK32YLXIDm2S1k=24Pr}u+e zSn>03cRDI%u{B@S_uG#H&o&Yc#O6s~w2s{}izt2+WqqjrbFTyKA~54)K1ls__`tC} zV?vvJklG&^(`9zh)Ge_rRO4Guw)5ZfE1uo@st|Kc)ZX^AtlF8!O~veujSC zXmX=u(LMumO;O*v{`;14X<7kTpE=7eB}mqxB287<7ZK~?Xf6&;0r6Gh2r-G7U6IPq z@Wf1e`*qY6IqQ5o$jEL*<%<2Iar@k=)}$KP9zQbaO(Y%pA^YPlH>bZcy162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~EM>x%jf{^s98n#GsS-!2TdGH?0|3`123+K>Wa)@y z!l`gg%omwah8=HwUA3*RO3_OtzIe3074&gz>S z5P*e>EFLrG5)y(Z1fQ=GdU%*_MoAtsL}Va3Au$oasOdB<-{g=qH+Q|PygZ@DnUY^5 zd(frM&aa6(FE7t)x{+3NLR#h0})5pe=zlfGW!ziJ8y2?;s;GSgIc z@UrVv5z=F3`}F<%{BTa4o1KG$%i4;`6UUa`=kwtQD>q+;kAeqW>j=371s!n4?Qc!r zV$f`@%Qw`dWJ-wrIn(4XY-wppINcg?ZlA=572kYts^RraiL2qrtGq+$k_H3tp+MT43vV3`1RaYYE(P4h-DC7qJ(T z7p6LV>lPhkOPJ|G60b_4_w*1I58H(~JzzSvKnI%D)j2_bIuG&agF zKY#BqF^g5Frl!_@I6`}5Ao_9ceeKG}gmmEv&4szvQ01^ghQV6EGw)n1^v(KcIisez z#6`4^Pq~9s9cu7mEQ6I8YubQ7oMx0Zuyb({s7Yym_3C`EdY^B1@!!+ zolfSW>!QbEb>3HbKKODQkA9x)08r3zo2$;w&YGBi9Xp8dzd>?hf>2_okw;AL98?hp zU9(LcE-uKnhZ}PDS@gWT{(8OnEq%6BNhLHf1*KBjZwRYQ_;nmA|rXYFMxq3APg+A%7 zE|XBaUMgWis%cq`viHXfzrNP;@@Z4|Tz6ptRJIlT;P)p88bCA+AGouHAK-y>P zT)VrwC8KB|At3@Y%Axx-{G>cQJh^HQJn&^%8B8Xl8FI}}Mn8T`K-twdG$7c?Z*pE& zg24zqmKc%ijkjg4ns_aA_<4Yt^B(!KUk)LX>o0>fDy`rpl{Qrbj}J%I+IeG6E#qt` zYHJNV@V$i2kTpraB2iX$!K@Msy^F?EE$yV?xacabKeenHx0H8~BJZr1Mys#jq5vFFL-ZlvM00|MYq+!(o^zWF@#b*;Z+XbD9hC et?k6%JKKIv&ID ); ?>

- - [shortcode] que genera el icono PFC que ves en la barra de edición de texto.', 'hangar-wpplugin-textdomain' )?> + entrada o página de la web.', 'hangar-wpplugin-textdomain' )?> + [shortcode] que genera el icono PFC icon que ves en la barra de edición de texto.', 'hangar-wpplugin-textdomain' )?>

@@ -79,7 +79,7 @@ if ( ! function_exists( 'hangar_extra_content_callback' ) ) : $settings = array( 'textarea_name' => 'hangar_extra_content_wysiwyg_summary', 'media_buttons' => true, - 'textarea_rows' => 3, + 'textarea_rows' => 10, // https://www.kevinleary.net/customizing-tinymce-wysiwyg-editor-wordpress/ // 'tinymce' => array( // 'toolbar1' => 'formatselect,bold,italic,link,unlink,charmap,removeformat,wp_more', @@ -133,8 +133,9 @@ if ( ! function_exists( 'hangar_show_extra_content' ) ) : $meta_value = get_post_meta( get_the_ID(), 'hangar_extra_content_wysiwyg_summary', true ); // Checks and displays the retrieved value if( !empty( $meta_value ) ) { - echo '
'; - echo $meta_value; + echo '
'; + // to do shortcodes: https://developer.wordpress.org/reference/functions/apply_filters/ + echo apply_filters( 'the_content', $meta_value); echo '
'; } }