| Current Path : /home/x/b/o/xbodynamge/namtation/wp-content/ |
| Current File : /home/x/b/o/xbodynamge/namtation/wp-content/WritingAssistantKeyword.php.tar |
xbodynamge/dev/wp-content/plugins/all-in-one-seo-pack/app/Common/Models/WritingAssistantKeyword.php 0000644 00000003047 15114321564 0030376 0 ustar 00 home <?php
namespace AIOSEO\Plugin\Common\Models;
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Class Keyword.
*
* @since 4.7.4
*/
class WritingAssistantKeyword extends Model {
/**
* The name of the table in the database, without the prefix.
*
* @since 4.7.4
*
* @var string
*/
protected $table = 'aioseo_writing_assistant_keywords';
/**
* Fields that should be numeric values.
*
* @since 4.7.4
*
* @var array
*/
protected $integerFields = [ 'id', 'progress' ];
/**
* Fields that should be boolean values.
*
* @since 4.7.4
*
* @var array
*/
protected $booleanFields = [];
/**
* Fields that should be encoded/decoded on save/get.
*
* @since 4.7.4
*
* @var array
*/
protected $jsonFields = [ 'keywords', 'competitors', 'content_analysis' ];
/**
* Gets a keyword.
*
* @since 4.7.4
*
* @param string $keyword A keyword.
* @param string $country The country code.
* @param string $language The language code.
* @return object A keyword found.
*/
public static function getKeyword( $keyword, $country, $language ) {
$dbKeyword = aioseo()->core->db->start( 'aioseo_writing_assistant_keywords' )
->where( 'keyword', $keyword )
->where( 'country', $country )
->where( 'language', $language )
->run()
->model( 'AIOSEO\Plugin\Common\Models\WritingAssistantKeyword' );
if ( ! $dbKeyword->exists() ) {
$dbKeyword->keyword = $keyword;
$dbKeyword->country = $country;
$dbKeyword->language = $language;
}
return $dbKeyword;
}
} namtation/wp-content/plugins/all-in-one-seo-pack/app/Common/Models/WritingAssistantKeyword.php 0000644 00000003047 15114441617 0031614 0 ustar 00 home/xbodynamge <?php
namespace AIOSEO\Plugin\Common\Models;
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Class Keyword.
*
* @since 4.7.4
*/
class WritingAssistantKeyword extends Model {
/**
* The name of the table in the database, without the prefix.
*
* @since 4.7.4
*
* @var string
*/
protected $table = 'aioseo_writing_assistant_keywords';
/**
* Fields that should be numeric values.
*
* @since 4.7.4
*
* @var array
*/
protected $integerFields = [ 'id', 'progress' ];
/**
* Fields that should be boolean values.
*
* @since 4.7.4
*
* @var array
*/
protected $booleanFields = [];
/**
* Fields that should be encoded/decoded on save/get.
*
* @since 4.7.4
*
* @var array
*/
protected $jsonFields = [ 'keywords', 'competitors', 'content_analysis' ];
/**
* Gets a keyword.
*
* @since 4.7.4
*
* @param string $keyword A keyword.
* @param string $country The country code.
* @param string $language The language code.
* @return object A keyword found.
*/
public static function getKeyword( $keyword, $country, $language ) {
$dbKeyword = aioseo()->core->db->start( 'aioseo_writing_assistant_keywords' )
->where( 'keyword', $keyword )
->where( 'country', $country )
->where( 'language', $language )
->run()
->model( 'AIOSEO\Plugin\Common\Models\WritingAssistantKeyword' );
if ( ! $dbKeyword->exists() ) {
$dbKeyword->keyword = $keyword;
$dbKeyword->country = $country;
$dbKeyword->language = $language;
}
return $dbKeyword;
}
}