New answers tagged

0

But I will tell you this @flero...your link to the reference page actually worked. function mawaha_filter_allowed_html($allowed, $context){ if (is_array($context)) { return $allowed; } if ($context === 'post') { // Example case $allowed['a']['data-reveal-id'] = true; } return $allowed; } add_filter('...


0

Adding this to your functions.php should do the trick: function my_allowed_tags() { global $allowedtags; $allowedtags['ul'] = array('data-accordion'=>array()); } add_action('init', 'my_allowed_tags', 10); Note: it will enable data-accordion on ul in every "filtered" place. In this article you can find some more informations about $allowedtags


0

I found this code some ones blog but it worked for me , Solved my problem add_action( 'after_wp_tiny_mce', function( $settings ) { // Check for the 'wplink' editor plugin if( isset( $settings['content']['plugins'] ) && false !== strpos( $settings['content']['plugins'], 'wplink' ) ) echo '<style> ...


0

If I understand your question correctly, you would set a your preferred featured image/thumbnail dimensions either in Settings or, if you have or need a new special image type, by adding it to your functions PHP - something like: add_image_size( 'product_preview', 55, 55, true ) ; In order to retroactively crop the old images, pretty much standard practice ...


0

If you browse through the source code of the function you'll find this: $keys = apply_filters( 'postmeta_form_keys', null, $post ); if ( null === $keys ) { ... } Using the postmeta_form_keys hook you can manually specify the keys to avoid calling this inefficient query altogether: add_filter('postmeta_form_keys', function(){ return ['...



Top 50 recent answers are included