//allset wp-kinit )(<[^>\/][^>]*?>)/', '$1 $2', $content ); $content = strip_tags( nl2br( $content ) ); if ( preg_match( "/[\x{4e00}-\x{9fa5}]+/u", $content ) ) { $content = preg_replace( '/[\x80-\xff]{1,3}/', ' ', $content, -1, $n ); $n += str_word_count($content); return $n; } else { return count( preg_split( '/\s+/', $content ) ); } } /** * Update for all post types */ function apa_swcr_update_posts_wc_value() { if (get_option(APA_SWCR_OPTION_FIELD_KEY) == false) { // Posts apa_swcr_update_wc_posts('post'); // Pages apa_swcr_update_wc_posts('page'); // Initialized add_option(APA_SWCR_OPTION_FIELD_KEY, true); } } /** * Update Word Count on save * @param $post_id */ function apa_swcr_update_post_wc_value( $post_id ) { $content = get_post_field('post_content', $post_id); update_post_meta($post_id, APA_SWCR_META_FIELD_KEY, str_word_count($content)); } /** * Styles */ function apa_swcr_styles() { echo ''; } /** * Run plugin */ apa_swcr_sortable_word_count_run(); /** * Do some check on plugin activation. */ function apa_swcr_f_activation() { $plugin_data = get_plugin_data( __FILE__ ); $plugin_version = $plugin_data['Version']; $plugin_name = $plugin_data['Name']; $php_minimum = '5.6'; if ( version_compare( PHP_VERSION, $php_minimum, '<' ) ) { deactivate_plugins( plugin_basename( __FILE__ ) ); wp_die( '
' . __('You are using PHP version', 'apa-cf7sdomt' ) . ' ' . PHP_VERSION . '. ' . __( 'This plugin has been tested with PHP versions', 'apa-cf7sdomt' ) . ' ' . $php_minimum . ' ' . __( 'and greater.', 'apa-cf7sdomt' ) . '
' . __('WordPress itself recommends using PHP version 7.3 or greater. Please upgrade your PHP version or contact your Server administrator.', 'apa-cf7sdomt' ) . '
', __('Could not activate plugin: PHP version error', 'apa-cf7sdomt' ), array( 'back_link' => true ) ); } } register_activation_hook( __FILE__, 'apa_swcr_f_activation' ); /** * Read translations. */ function apa_swcr_f_init() { load_plugin_textdomain( 'sortable-word-count-reloaded', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' ); } add_action('plugins_loaded', 'apa_swcr_f_init');\u0646\u0631\u062d\u0628 \u0628\u0643\u0645 \u0641\u064a \u0627\u0641\u0636\u0644 \u0634\u0631\u0643\u0629 \u062a\u0631\u0643\u064a\u0628 \u0627\u062b\u0627\u062b \u0627\u064a\u0643\u064a\u0627 \u0628\u0627\u0644\u0645\u062f\u064a\u0646\u0629 \u0627\u0644\u0645\u0646\u0648\u0631\u0629 \u0628\u062e\u0635\u0645 30%\u060c \u0648\u0645\u0646 \u0642\u0628\u0644 \u0623\u0641\u0636\u0644 \u0627\u0644\u0641\u0646\u064a\u064a\u0646 \u0648\u0627\u0644\u0645\u062d\u062a\u0631\u0641\u064a\u0646 \u0628\u062f\u0631\u062c\u0629 \u0639\u0627\u0644\u064a\u0629 \u0645\u0646 \u0627\u0644\u0643\u0641\u0627\u0621\u0629\u060c \u0627\u062a\u0635\u0644 \u0628\u0646\u0627 \u0627\u0644\u0622\u0646 \u062a\u062c\u062f\u0646\u0627 \u0641\u064a \u062e\u062f\u0645\u062a\u0643 \u0639\u0644\u0649 \u0627\u0644\u0641\u0648\u0631 \u0648\u0628\u0623\u0633\u0631\u0639 \u0648\u0642\u062a \u0645\u0645\u0643\u0646.<\/p>\n\n\n\n
\u0646\u0631\u062d\u0628 \u0628\u0643\u0645 \u0641\u064a \u0627\u0641\u0636\u0644 \u0634\u0631\u0643\u0627\u062a \u062a\u0631\u0643\u064a\u0628 \u0627\u062b\u0627\u062b \u0627\u064a\u0643\u064a\u0627 \u0628\u0627\u0644\u0645\u062f\u064a\u0646\u0629 \u0627\u0644\u0645\u0646\u0648\u0631\u0629 \u0627\u0644\u0645\u062a\u062e\u0635\u0635\u0629 \u0627\u0644\u062a\u064a \u062a\u0647\u062a\u0645 \u0628\u062a\u0648\u0641\u064a\u0631 \u0627\u0633\u0639\u0627\u0631 \u0645\u0646\u0627\u0633\u0628\u0629 \u0644\u0644\u062c\u0645\u064a\u0639.<\/p>\n\n\n\n
\u0645\u0639 \u062d\u0631\u0635 \u0627\u0644\u0634\u0631\u0643\u0629 \u0639\u0644\u0649 \u062a\u0648\u0641\u064a\u0631 \u0623\u0641\u0636\u0644 \u0646\u062c\u0627\u0631 \u0627\u064a\u0643\u064a\u0627 \u0628\u0627\u0644\u0645\u062f\u064a\u0646\u0629 \u0627\u0644\u0645\u0646\u0648\u0631\u0629\u060c \u0644\u064a\u062a\u0645\u0643\u0646 \u0645\u0646 \u0627\u0644\u0642\u064a\u0627\u0645 \u0628\u0645\u0627 \u064a\u0644\u064a:<\/p>\n\n\n\n