Support » Plugin: Read More Without Refresh » [read more=”… work

  • Автор не поправляет, поправлю я…
    Зайти в папку с плагином и в файле readmoreoptions.php
    Заменить функцию function read_main на следующее:

    function read_main($atts, $content = null) {
    	$atts = shortcode_atts(array(
    		'more' => get_option('rm_text'),
    		'less' => get_option('rl_text')
    	), $atts, 'read');
    
    	mt_srand((double)microtime() * 1000000);
    	$rnum = mt_rand();
       
    	$new_string = '<span><a onclick="read_toggle(' . $rnum . ', \'' . esc_html($atts['less']) . '\', \'' . esc_html($atts['more']) . '\'); return false;" class="read-link" id="readlink' . $rnum . '" style="readlink" href="#">'  . esc_html($atts['more']) . ' </a></span>' . "\n";
    	$new_string .= '<div class="read_div" id="read' . $rnum . '" style="display: none;">' . do_shortcode($content) . '</div>';
    
    	return $new_string;
    }
    • This topic was modified 11 months, 3 weeks ago by ssomov.
  • The topic ‘[read more=”… work’ is closed to new replies.