//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":863,"count":2,"description":"","link":"https:\/\/www.awal-dammam.com\/tag\/%d8%aa%d9%86%d8%b8%d9%8a%d9%81-%d8%a8%d9%82%d8%b9-%d8%a7%d9%84%d9%83%d9%86%d8%a8-%d8%a7%d9%84%d9%82%d8%af%d9%8a%d9%85%d8%a9\/","name":"\u062a\u0646\u0638\u064a\u0641 \u0628\u0642\u0639 \u0627\u0644\u0643\u0646\u0628 \u0627\u0644\u0642\u062f\u064a\u0645\u0629","slug":"%d8%aa%d9%86%d8%b8%d9%8a%d9%81-%d8%a8%d9%82%d8%b9-%d8%a7%d9%84%d9%83%d9%86%d8%a8-%d8%a7%d9%84%d9%82%d8%af%d9%8a%d9%85%d8%a9","taxonomy":"post_tag","meta":[],"_links":{"self":[{"href":"https:\/\/www.awal-dammam.com\/wp-json\/wp\/v2\/tags\/863"}],"collection":[{"href":"https:\/\/www.awal-dammam.com\/wp-json\/wp\/v2\/tags"}],"about":[{"href":"https:\/\/www.awal-dammam.com\/wp-json\/wp\/v2\/taxonomies\/post_tag"}],"wp:post_type":[{"href":"https:\/\/www.awal-dammam.com\/wp-json\/wp\/v2\/posts?tags=863"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}