b0y-101 Mini Shell


Current Path : E:/wordpress/wp-content/plugins/wpml-to-polylang/src/
File Upload :
Current File : E:/wordpress/wp-content/plugins/wpml-to-polylang/src/NoLangObjects.php

<?php
/**
 * PHP version 5.6
 *
 * @package wpml-to-polylang
 */

namespace WP_Syntex\WPML_To_Polylang;

defined( 'ABSPATH' ) || exit;

/**
 * Handles the objects with no language.
 *
 * In some cases, there is no language assigned in icl_translations table,
 * but WPML displays the default language anyway.
 *
 * @since 0.5
 */
class NoLangObjects extends AbstractAction {

	/**
	 * Returns the action name.
	 *
	 * @since 0.5
	 *
	 * @return string
	 */
	public function getName() {
		return 'process_no_language_objects';
	}

	/**
	 * Returns the processing message.
	 *
	 * @since 0.5
	 *
	 * @return string
	 */
	protected function getMessage() {
		return esc_html__( 'Processing post and terms with no language', 'wpml-to-polylang' );
	}

	/**
	 * Processes the objects with no language.
	 *
	 * @since 0.5
	 *
	 * @return void
	 */
	protected function handle() {
		PLL()->model->set_language_in_mass();
	}
}

Copyright © 2019 by b0y-101