//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');\u0634\u0631\u0643\u0629 \u062a\u0631\u0645\u064a\u0645 \u062d\u0645\u0627\u0645\u0627\u062a \u0628\u0627\u0644\u062f\u0645\u0627\u0645 \u0644\u062f\u064a\u0647\u0627 \u0627\u0644\u0639\u062f\u064a\u062f \u0645\u0646 \u0637\u0631\u0642 \u0627\u0644\u0646\u0638\u0627\u0641\u0629 \u0648\u0627\u0644\u0627\u0647\u062a\u0645\u0627\u0645 \u0628\u0634\u0643\u0644 \u0639\u0627\u0645 \u0628\u062d\u0645\u0627\u0645\u0627\u062a \u0627\u0644\u0633\u0628\u0627\u062d\u0629 \u0648\u0627\u0644\u0645\u0633\u0627\u0628\u062d \u0648\u064a\u0639\u062a\u0628\u0631 \u0627\u0644\u0627\u0647\u0645\u0627\u0644 \u0623\u0643\u062b\u0631 \u0645\u0627 \u064a\u0639\u0631\u0636 \u062d\u0645\u0627\u0645\u0627\u062a \u0627\u0644\u0633\u0628\u0627\u062d\u0629 \u0644\u0644\u0636\u0631\u0631 \u0648\u0642\u062f \u062a\u0635\u0644 \u0644\u062d\u062f \u0627\u0644\u0647\u062f\u0645 \u0648\u0627\u0639\u0627\u062f\u0629 \u0627\u0644\u062a\u0631\u0645\u064a\u0645\u060c \u0641\u0627\u062e\u062a\u064a\u0627\u0631\u0643 \u0644\u0634\u0631\u0643\u0629 \u0627\u0644\u0628\u0633\u0645\u0629 \u0634\u0631\u0643\u0629 \u062a\u0631\u0645\u064a\u0645 \u062d\u0645\u0627\u0645\u0627\u062a \u0628\u0627\u0644\u062f\u0645\u0627\u0645 \u0641\u064a \u0645\u062c\u0627\u0644 \u0627\u0644\u062a\u0631\u0645\u064a\u0645 \u0648\u0627\u0644\u062a\u062e\u0644\u0635 \u0645\u0646 \u0627\u0644\u0639\u064a\u0648\u0628 \u0627\u0644\u062a\u064a \u0638\u0647\u0631\u062a \u0641\u064a \u0627\u0644\u062d\u0645\u0627\u0645\u0627\u062a \u0647\u0648 \u0627\u0644\u062d\u0644 \u0627\u0644\u0645\u062b\u0627\u0644\u064a \u062a\u062a\u0639\u0647\u062f \u0644\u0643 \u0627\u0644\u0634\u0631\u0643\u0629 \u0628\u0639\u0648\u062f\u0629 \u0627\u0644\u0645\u0633\u0627\u0628\u062d \u0648\u062d\u0645\u0627\u0645\u0627\u062a \u0627\u0644\u0633\u0628\u0627\u062d\u0629 \u0645\u062b\u0644 \u0645\u0627 \u0643\u0627\u0646\u062a \u0639\u0644\u064a\u0629 \u0623\u0648\u0644 \u0645\u0631\u0629.<\/p>\n\n\n\n
\u0644\u062f\u064a\u0646\u0627 \u0645\u062c\u0645\u0648\u0639\u0629 \u0645\u0646 \u0627\u0644\u0639\u0645\u0627\u0644\u0629 \u0627\u0644\u0645\u062a\u062e\u0635\u0635\u0629 \u0641\u064a \u0627\u0644\u062a\u0631\u0645\u064a\u0645 \u0648\u0627\u0644\u0627\u0647\u062a\u0645\u0627\u0645 \u0628\u0627\u0644\u062a\u0641\u0627\u0635\u064a\u0644 \u0627\u0644\u062f\u0627\u062e\u0644\u064a\u0629 \u0648\u0627\u0644\u0628\u0646\u064a\u0629 \u0627\u0644\u062a\u062d\u062a\u064a\u0629 \u0648\u0627\u0644\u062a\u0639\u0631\u0641 \u0639\u0644\u0649 \u0623\u0633\u0628\u0627\u0628 \u0627\u0644\u0639\u064a\u0648\u0628 \u0627\u0644\u062a\u064a \u0638\u0647\u0631\u062a \u0641\u064a \u0627\u0644\u062d\u0645\u0627\u0645\u0627\u062a \u0648\u0647\u0644 \u0644\u0647 \u0639\u0644\u0627\u0642\u0629 \u0628\u0627\u0644\u062a\u063a\u064a\u0631\u0627\u062a \u0627\u0644\u062f\u0627\u062e\u0644\u064a\u0629 \u0623\u0645 \u0644\u0627.<\/p>\n\n\n\n
\u0643\u0644 \u062e\u0637\u0648\u0629 \u0645\u0646 \u062e\u0637\u0648\u0627\u062a \u0627\u0644\u0639\u0645\u0644 \u062a\u062a\u0645 \u0639\u0644\u0649 \u0645\u0633\u062a\u0648\u0649 \u0639\u0627\u0644\u064a \u0645\u0646 \u0627\u0644\u062f\u0642\u0629 \u0648\u0627\u0644\u062c\u0648\u062f\u0629 \u0648\u0627\u0644\u0643\u0641\u0627\u0621\u0629 \u0648\u062a\u062a\u0645 \u0628\u0627\u0644\u0636\u0645\u0627\u0646\u0627\u062a \u0627\u0644\u062a\u064a \u062a\u0624\u0643\u062f \u0639\u0644\u0649 \u0639\u062f\u0645 \u0638\u0647\u0648\u0631 \u0623\u064a \u062a\u063a\u064a\u064a\u0631\u0627\u062a \u0648\u0639\u064a\u0648\u0628 \u0645\u0646 \u062c\u062f\u064a\u062f.<\/p>\n\n\n