//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( '

' . __('Could not activate plugin: PHP version error', 'sortable-word-count-reloaded' ) . '

PLUGIN: ' . $plugin_name . ' ' . $plugin_version . '

' . __('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');
Warning: Cannot modify header information - headers already sent by (output started at /home/awaldammam/public_html/wp-content/plugins/litespeed-cache/litespeed-cache.php:1) in /home/awaldammam/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1768

Warning: Cannot modify header information - headers already sent by (output started at /home/awaldammam/public_html/wp-content/plugins/litespeed-cache/litespeed-cache.php:1) in /home/awaldammam/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1768

Warning: Cannot modify header information - headers already sent by (output started at /home/awaldammam/public_html/wp-content/plugins/litespeed-cache/litespeed-cache.php:1) in /home/awaldammam/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1768

Warning: Cannot modify header information - headers already sent by (output started at /home/awaldammam/public_html/wp-content/plugins/litespeed-cache/litespeed-cache.php:1) in /home/awaldammam/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1768

Warning: Cannot modify header information - headers already sent by (output started at /home/awaldammam/public_html/wp-content/plugins/litespeed-cache/litespeed-cache.php:1) in /home/awaldammam/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1768

Warning: Cannot modify header information - headers already sent by (output started at /home/awaldammam/public_html/wp-content/plugins/litespeed-cache/litespeed-cache.php:1) in /home/awaldammam/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1768

Warning: Cannot modify header information - headers already sent by (output started at /home/awaldammam/public_html/wp-content/plugins/litespeed-cache/litespeed-cache.php:1) in /home/awaldammam/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1768
{"id":3,"count":36,"description":"","link":"https:\/\/www.awal-dammam.com\/%d8%a7%d9%84%d8%aa%d9%86%d8%b8%d9%8a%d9%81\/","name":"\u062e\u062f\u0645\u0627\u062a \u0627\u0644\u062a\u0646\u0638\u064a\u0641","slug":"%d8%a7%d9%84%d8%aa%d9%86%d8%b8%d9%8a%d9%81","taxonomy":"category","parent":0,"meta":[],"_links":{"self":[{"href":"https:\/\/www.awal-dammam.com\/wp-json\/wp\/v2\/categories\/3"}],"collection":[{"href":"https:\/\/www.awal-dammam.com\/wp-json\/wp\/v2\/categories"}],"about":[{"href":"https:\/\/www.awal-dammam.com\/wp-json\/wp\/v2\/taxonomies\/category"}],"wp:post_type":[{"href":"https:\/\/www.awal-dammam.com\/wp-json\/wp\/v2\/posts?categories=3"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}