Yoast seo plugin
আসসালামু আলাইকুম আশাকরি সকলেই ভালো আছেন ।আল্লাহর রহমতে আপনাদের দোয়াই আমিও ইনশাআল্লাহ ভালো আছি।
আজ আমি আপনাদের মাজে একটি অসাধারন প্লাগিন নিয়ে হাজির হয়েছি যেটা world এর মধ্যে একটি জনপ্রিয় প্লাগিন yoast Seo premium ভার্সন যেটা বাংলাদেশের প্রাই ৭০০০ মূল্য সেই প্লাগিনটা যদি ফ্রীতে নেওয়া যায় তাহলে কেমন হবে আবস্যই দারুন হবে এবং আপনার সাইটটি সহজেই seo ranking করাতে পারবেন।
World এর বড় বড় সাইট এই প্লাগিন দিয়ে SEO করে থাকে সেটা আমরা সকলেই জানি এবং ট্রিকবিড়িও এই yoast seo premium ভার্সনটি ব্যবহার করতেছে । আমরা হয়তো সকলেই যানি ফ্রী জিনিস গুলা ভালো না তর মধ্যে কিছু সমস্যা অবস্যই থাকে। এটার মধ্যেও সমস্যা রয়েছে ভয় পাবেন না সমস্যাটা দুর করার ব্যবস্থাও আছে। যারা নতুন তারা হয়তো ভাবতেছেন
SEO কি..?
SEO হচ্ছে গুগল সহ বিভিন্ন সার্চ ইঞ্জিনে যে কোন অনলাইন ভিত্তিক ব্যবসা বা ওয়েবসাইটকে মার্কেটিং করা যার মাধ্যমে ফ্রীতেই বিপুল পরিমাণ সেলস নিয়ে আসা সম্ভব। এটি হচ্ছে সিম্পল কিছু মার্কেটিং টেকনিক
যেহেতু এর মাধ্যমে সার্চ ইঞ্জিন থেকে ফ্রীতে পাওয়ারফুল সেলস আনা যায়, আর তাই ইন্টারনেটে প্রচার করতে গেলে যে কোন কোম্পানীর SEO করা লাগবেই লাগবে।
এজন্যই এসইও এর এত গুরুত্ব। কারন SEO ছাড়া অনলাইনে দীর্ঘস্থায়ী ব্যবসা কল্পনা করা যায় না।
এখন তো বোঝলেন SEO কি জিনিস
তো এখন দেখে আসেন ৭০০০ টাকা মূল্যের এই প্লাগিনটার মধ্যে কি কি ফিউচা রয়েছে এবং ফ্রী টার মধ্যে কি কি ফিউচার রয়েছে
Yoast SEO Premium Features
1. Multiple Focus Keywords
2. Redirect Manager
3. Internal Link Suggestions
4. Customer Su
5. Yoast Premium is Ad-free
6. XML Sitemaps
Yoast SEO Free Features
Other Features
Meta title
Meta description
Snippet Preview
1 Focused Keyword
Limited Readability analysis
Meta robots tags
Canonical URL (Read this post on what is a canonical URL)
Social tab without preview
তো চলুন নিচে থেকে প্লাগিনটা ডাউনলোড করে নিন ..
ডাউনলোড হয়ে গেলে আপনার ওয়ার্ডপ্রেস সাইটে প্লাগিনটা ইনস্টল দিয়ে এক্টিক করে দিন । এখন দেখেন নোটিফিকেশন এ আপনার কাছে লাইসেন্স চাচ্ছে ।লাইসেন্স করতে হলে টাকা দিয়ে কিনতে হবে তো আমরা টাকা ছাড়া সহজেই লাইসেন্স করে নিবো তার জন্য আপনাদেরকে ভালো ভাবে পোষ্টা খেয়াল করতে হবে। তো চলেন কাজে নেমে পরি
সরাসরি আপনার ওয়ার্ডপ্রেস সাইটে ডেসবোর্ডে চলে যান
এবার স্কিনসট ফলো করুন. .
➡Plugins এ গিয়ে Plugin Editor এ ক্লিক করেন
➡স্কিনসট এ দেখানো থ্রি ডট এ ক্লিক করেন।
➡এবার Desktop site অন করে দিন
➡ স্কিনসট এ দেখানো বক্সে ক্লিক করেন
➡এখন yoast seo premium এটাতে ক্লিক করে Select এ ক্লিক করেন
➡প্রথমে vendor তারপর yoast তারপর license-manager তারপর class-license-manager.php
ফাইলে যান
➡এবার বক্সের কোড গুলো কেটে দিন তারপর নিচের কোড গুলো কপি করে বক্সে পেস্ট করে Update File এ ক্লিক করেন ।
[code] <?php
if ( ! interface_exists( ‘iYoast_License_Manager’, false ) ) {
interface iYoast_License_Manager {
public function specific_hooks();
public function setup_auto_updater();
}
}
if ( ! class_exists( ‘Yoast_License_Manager’, false ) ) {
/**
* Class Yoast_License_Manager
*/
abstract class Yoast_License_Manager implements iYoast_License_Manager {
/**
* @const VERSION The version number of the License_Manager class
*/
const VERSION = 1;
/**
* @var Yoast_License The license
*/
protected $product;
/**
* @var string
*/
private $license_constant_name = ”;
/**
* @var boolean True if license is defined with a constant
*/
private $license_constant_is_defined = false;
/**
* @var boolean True if remote license activation just failed
*/
private $remote_license_activation_failed = false;
/**
* @var array Array of license related options
*/
private $options = array();
/**
* @var string Used to prefix ID’s, option names, etc..
*/
protected $prefix;
/**
* @var bool Boolean indicating whether this plugin is network activated
*/
protected $is_network_activated = false;
/**
* Constructor
*
* @param Yoast_Product $product
*/
public function __construct( Yoast_Product $product ) {
// Set the license
$this->product = $product;
// set prefix
$this->prefix = sanitize_title_with_dashes( $this->product->get_item_name() . ‘_’, null, ‘save’ );
// maybe set license key from constant
$this->maybe_set_license_key_from_constant();
}
/**
* Setup hooks
*
*/
public function setup_hooks() {
// show admin notice if license is not active
add_action( ‘admin_notices’, array( $this, ‘display_admin_notices’ ) );
// catch POST requests from license form
add_action( ‘admin_init’, array( $this, ‘catch_post_request’ ) );
// setup item type (plugin|theme) specific hooks
$this->specific_hooks();
// setup the auto updater
$this->setup_auto_updater();
}
/**
* Display license specific admin notices, namely:
*
* – License for the product isn’t activated
* – External requests are blocked through WP_HTTP_BLOCK_EXTERNAL
*/
public function display_admin_notices() {
if ( ! current_user_can( ‘manage_options’ ) ) {
return;
}
// show notice if license is invalid
if ($this->license_is_valid() ) {
if ( $this->get_license_key() == ” ) {
$message = __( ‘<b>Warning!</b> You didn\’t set your %s license key yet, which means you\’re missing out on updates and support! <a href=”%s”>Enter your license key</a> or <a href=”%s” target=”_blank”>get a license here</a>.’ );
} else {
$message = __( ‘<b>Warning!</b> Your %s license is inactive which means you\’re missing out on updates and support! <a href=”%s”>Activate your license</a> or <a href=”%s” target=”_blank”>get a license here</a>.’ );
}
?>
<div class=”notice notice-error yoast-notice-error”>
<p><?php printf( __( $message, $this->product->get_text_domain() ), $this->product->get_item_name(), $this->product->get_license_page_url(), $this->product->get_tracking_url( ‘activate-license-notice’ ) ); ?></p>
</div>
<?php
}
// show notice if external requests are blocked through the WP_HTTP_BLOCK_EXTERNAL constant
if ( defined( “WP_HTTP_BLOCK_EXTERNAL” ) && WP_HTTP_BLOCK_EXTERNAL === true ) {
// check if our API endpoint is in the allowed hosts
$host = parse_url( $this->product->get_api_url(), PHP_URL_HOST );
if ( ! defined( “WP_ACCESSIBLE_HOSTS” ) || stristr( WP_ACCESSIBLE_HOSTS, $host ) === false ) {
?>
<div class=”notice notice-error yoast-notice-error”>
<p><?php printf( __( ‘<b>Warning!</b> You\’re blocking external requests which means you won\’t be able to get %s updates. Please add %s to %s.’, $this->product->get_text_domain() ), $this->product->get_item_name(), ‘<strong>’ . $host . ‘</strong>’, ‘<code>WP_ACCESSIBLE_HOSTS</code>’ ); ?></p>
</div>
<?php
}
}
}
/**
* Set a notice to display in the admin area
*
* @param string $type error|updated
* @param string $message The message to display
*/
protected function set_notice( $message, $success = true ) {
$css_class = ( $success ) ? ‘notice-success yoast-notice-success’ : ‘notice-error yoast-notice-error’;
add_settings_error( $this->prefix . ‘license’, ‘license-notice’, $message, $css_class );
}
/**
* Remotely activate License
* @return boolean True if the license is now activated, false if not
*/
public function activate_license() {
$result = $this->call_license_api( ‘activate’ );
if ( $result ) {
// show success notice if license is valid
if ( $result->license === ‘valid’ ) {
$success = true;
$message = $this->get_successful_activation_message( $result );
} else {
$this->remote_license_activation_failed = true;
$success = false;
$message = $this->get_unsuccessful_activation_message( $result );
}
// Append custom HTML message to default message.
$message .= $this->get_custom_message( $result );
$this->set_notice( $message, $success );
$this->set_license_status( $result->license );
}
return $this->license_is_valid();
}
/**
* Remotely deactivate License
* @return boolean True if the license is now deactivated, false if not
*/
public function deactivate_license() {
$result = $this->call_license_api( ‘deactivate’ );
if ( $result ) {
// show notice if license is deactivated
if ( $result->license === ‘deactivated’ ) {
$success = true;
$message = sprintf( __( “Your %s license has been deactivated.”, $this->product->get_text_domain() ), $this->product->get_item_name() );
} else {
$success = false;
$message = sprintf( __( “Failed to deactivate your %s license.”, $this->product->get_text_domain() ), $this->product->get_item_name() );
}
$message .= $this->get_custom_message( $result );
// Append custom HTML message to default message.
$this->set_notice( $message, $success );
$this->set_license_status( $result->license );
}
return ( $this->get_license_status() === ‘deactivated’ );
}
/**
* @param string $action activate|deactivate
*
* @return mixed
*/
protected function call_license_api( $action ) {
// don’t make a request if license key is empty
if ( $this->get_license_key() === ” ) {
return false;
}
// data to send in our API request
$api_params = array(
‘edd_action’ => $action . ‘_license’,
‘license’ => $this->get_license_key(),
‘item_name’ => urlencode( trim( $this->product->get_item_name() ) ),
‘url’ => get_option( ‘home’ )
// grab the URL straight from the option to prevent filters from breaking it.
);
// create api request url
$url = add_query_arg( $api_params, $this->product->get_api_url() );
require_once dirname( __FILE__ ) . ‘/class-api-request.php’;
$request = new Yoast_API_Request( $url );
if ( $request->is_valid() !== true ) {
$this->set_notice( sprintf( __( “Request error: \”%s\” (%scommon license notices%s)”, $this->product->get_text_domain() ), $request->get_error_message(), ‘<a href=”http://kb.yoast.com/article/13-license-activation-notices”>’, ‘</a>’ ), false );
}
// get response
return $request->get_response();
}
/**
* Set the license status
*
* @param string $license_status
*/
public function set_license_status( $license_status ) {
$this->set_option( ‘status’, $license_status );
}
/**
* Get the license status
*
* @return string $license_status;
*/
public function get_license_status() {
$license_status = $this->get_option( ‘status’ );
return trim( $license_status );
}
/**
* Set the license key
*
* @param string $license_key
*/
public function set_license_key( $license_key ) {
$this->set_option( ‘key’, $license_key );
}
/**
* Gets the license key from constant or option
*
* @return string $license_key
*/
public function get_license_key() {
$license_key = $this->get_option( ‘key’ );
return trim( $license_key );
}
/**
* Gets the license expiry date
*
* @return string
*/
public function get_license_expiry_date() {
return $this->get_option( ‘expiry_date’ );
}
/**
* Stores the license expiry date
*/
public function set_license_expiry_date( $expiry_date ) {
$this->set_option( ‘expiry_date’, $expiry_date );
}
/**
* Checks whether the license status is active
*
* @return boolean True if license is active
*/
public function license_is_valid() {
return ( $this->get_license_status() === ‘valid’ );
}
/**
* Get all license related options
*
* @return array Array of license options
*/
protected function get_options() {
// create option name
$option_name = $this->prefix . ‘license’;
// get array of options from db
if ( $this->is_network_activated ) {
$options = get_site_option( $option_name, array() );
} else {
$options = get_option( $option_name, array() );
}
// setup array of defaults
$defaults = array(
‘key’ => ”,
‘status’ => ”,
‘expiry_date’ => ”
);
// merge options with defaults
$this->options = wp_parse_args( $options, $defaults );
return $this->options;
}
/**
* Set license related options
*
* @param array $options Array of new license options
*/
protected function set_options( array $options ) {
// create option name
$option_name = $this->prefix . ‘license’;
// update db
if ( $this->is_network_activated ) {
update_site_option( $option_name, $options );
} else {
update_option( $option_name, $options );
}
}
/**
* Gets a license related option
*
* @param string $name The option name
*
* @return mixed The option value
*/
protected function get_option( $name ) {
$options = $this->get_options();
return $options[ $name ];
}
/**
* Set a license related option
*
* @param string $name The option name
* @param mixed $value The option value
*/
protected function set_option( $name, $value ) {
// get options
$options = $this->get_options();
// update option
$options[ $name ] = $value;
// save options
$this->set_options( $options );
}
public function show_license_form_heading() {
?>
<h3>
<?php printf( __( “%s: License Settings”, $this->product->get_text_domain() ), $this->product->get_item_name() ); ?>
</h3>
<?php
}
/**
* Show a form where users can enter their license key
*
* @param boolean $embedded Boolean indicating whether this form is embedded in another form?
*/
public function show_license_form( $embedded = true ) {
$key_name = $this->prefix . ‘license_key’;
$nonce_name = $this->prefix . ‘license_nonce’;
$action_name = $this->prefix . ‘license_action’;
$api_host_available = $this->get_api_availability();
$visible_license_key = $this->get_license_key();
// obfuscate license key
$obfuscate = ( strlen( $this->get_license_key() ) > 5 && ( $this->license_is_valid() || ! $this->remote_license_activation_failed ) );
if ( $obfuscate ) {
$visible_license_key = str_repeat( ‘*’, strlen( $this->get_license_key() ) – 4 ) . substr( $this->get_license_key(), – 4 );
}
// make license key readonly when license key is valid or license is defined with a constant
$readonly = ( $this->license_is_valid() || $this->license_constant_is_defined );
require dirname( __FILE__ ) . ‘/views/form.php’;
// enqueue script in the footer
add_action( ‘admin_footer’, array( $this, ‘output_script’ ), 99 );
}
/**
* Check if the license form has been submitted
*/
public function catch_post_request() {
$name = $this->prefix . ‘license_key’;
// check if license key was posted and not empty
if ( ! isset( $_POST[ $name ] ) ) {
return;
}
// run a quick security check
$nonce_name = $this->prefix . ‘license_nonce’;
if ( ! check_admin_referer( $nonce_name, $nonce_name ) ) {
return;
}
// @TODO: check for user cap?
// get key from posted value
$license_key = $_POST[ $name ];
// check if license key doesn’t accidentally contain asterisks
if ( strstr( $license_key, ‘*’ ) === false ) {
// sanitize key
$license_key = trim( sanitize_key( $_POST[ $name ] ) );
// save license key
$this->set_license_key( $license_key );
}
// does user have an activated valid license
if ( ! $this->license_is_valid() ) {
// try to auto-activate license
return $this->activate_license();
}
$action_name = $this->prefix . ‘license_action’;
// was one of the action buttons clicked?
if ( isset( $_POST[ $action_name ] ) ) {
$action = trim( $_POST[ $action_name ] );
switch ( $action ) {
case ‘activate’:
return $this->activate_license();
case ‘deactivate’:
return $this->deactivate_license();
}
}
}
/**
* Output the script containing the YoastLicenseManager JS Object
*
* This takes care of disabling the ‘activate’ and ‘deactivate’ buttons
*/
public function output_script() {
require_once dirname( __FILE__ ) . ‘/views/script.php’;
}
/**
* Set the constant used to define the license
*
* @param string $license_constant_name The license constant name
*/
public function set_license_constant_name( $license_constant_name ) {
$this->license_constant_name = trim( $license_constant_name );
$this->maybe_set_license_key_from_constant();
}
/**
* Get the API availability information
*
* @return array
*/
protected function get_api_availability() {
return array(
‘url’ => $this->product->get_api_url(),
‘availability’ => $this->check_api_host_availability(),
‘curl_version’ => $this->get_curl_version(),
);
}
/**
* Check if the API host address is available from this server
*
* @return bool
*/
private function check_api_host_availability() {
$wp_http = new WP_Http();
if ( $wp_http->block_request( $this->product->get_api_url() ) === false ) {
return true;
}
return false;
}
/**
* Get the current curl version, or false
*
* @return mixed
*/
protected function get_curl_version() {
if ( function_exists( ‘curl_version’ ) ) {
$curl_version = curl_version();
if ( isset( $curl_version[‘version’] ) ) {
return $curl_version[‘version’];
}
}
return false;
}
/**
* Maybe set license key from a defined constant
*/
private function maybe_set_license_key_from_constant() {
if ( empty( $this->license_constant_name ) ) {
// generate license constant name
$this->set_license_constant_name( strtoupper( str_replace( array(
‘ ‘,
‘-‘
), ”, sanitize_key( $this->product->get_item_name() ) ) ) . ‘_LICENSE’ );
}
// set license key from constant
if ( defined( $this->license_constant_name ) ) {
$license_constant_value = constant( $this->license_constant_name );
// update license key value with value of constant
if ( $this->get_license_key() !== $license_constant_value ) {
$this->set_license_key( $license_constant_value );
}
$this->license_constant_is_defined = true;
}
}
/**
* Determine what message should be shown for a successful license activation
*
* @param Object $result Result of a request.
*
* @return string
*/
protected function get_successful_activation_message( $result ) {
// Get expiry date.
if ( isset( $result->expires ) ) {
$this->set_license_expiry_date( $result->expires );
$expiry_date = strtotime( $result->expires );
} else {
$expiry_date = false;
}
// Always show that it was successful.
$message = sprintf( __( “Your %s license has been activated. “, $this->product->get_text_domain() ), $this->product->get_item_name() );
// Show a custom notice it is an unlimited license.
if ( $result->license_limit == 0 ) {
$message .= __( “You have an unlimited license. “, $this->product->get_text_domain() );
} else {
$message .= sprintf( _n( “You have used %d/%d activation. “, “You have used %d/%d activations. “, $result->license_limit, $this->product->get_text_domain() ), $result->site_count, $result->license_limit );
}
// add upgrade notice if user has less than 3 activations left
if ( $result->license_limit > 0 && ( $result->license_limit – $result->site_count ) <= 3 ) {
$message .= sprintf( __( ‘<a href=”%s”>Did you know you can upgrade your license?</a> ‘, $this->product->get_text_domain() ), $this->product->get_extension_url( ‘license-nearing-limit-notice’ ) );
}
if ( $expiry_date !== false && $expiry_date < strtotime( “+1 month” ) ) {
// Add extend notice if license is expiring in less than 1 month.
$days_left = round( ( $expiry_date – time() ) / 86400 );
$message .= sprintf( _n( ‘<a href=”%s”>Your license is expiring in %d day, would you like to extend it?</a> ‘, ‘<a href=”%s”>Your license is expiring in %d days, would you like to extend it?</a> ‘, $days_left, $this->product->get_text_domain() ), $this->product->get_extension_url( ‘license-expiring-notice’ ), $days_left );
}
return $message;
}
/**
* Determine what message should be shown for an unsuccessful activation
*
* @param Object $result Result of a request.
*
* @return string
*/
protected function get_unsuccessful_activation_message( $result ) {
// Default message if we cannot detect anything more specific.
$message = __( ‘Failed to activate your license, your license key seems to be invalid.’, $this->product->get_text_domain() );
if ( ! empty( $result->error ) ) {
switch ( $result->error ) {
// Show notice if user is at their activation limit.
case ‘no_activations_left’:
$message = sprintf( __( ‘You\’ve reached your activation limit. You must <a href=”%s”>upgrade your license</a> to use it on this site.’, $this->product->get_text_domain() ), $this->product->get_extension_url( ‘license-at-limit-notice’ ) );
break;
// Show notice if the license is expired.
case ‘expired’:
$message = sprintf( __( ‘Your license has expired. You must <a href=”%s”>extend your license</a> in order to use it again.’, $this->product->get_text_domain() ), $this->product->get_extension_url( ‘license-expired-notice’ ) );
break;
}
}
return $message;
}
/**
* Get the locale for the current user
*
* @return string
*/
protected function get_user_locale() {
if ( function_exists( ‘get_user_locale’ ) ) {
return get_user_locale();
}
return get_locale();
}
/**
* Parse custom HTML message from response
*
* @param Object $result Result of the request.
*
* @return string
*/
protected function get_custom_message( $result ) {
$message = ”;
// Allow for translated messages to be used.
$localizedDescription = ‘custom_message_’ . $this->get_user_locale();
if ( ! empty( $result->{$localizedDescription} ) ) {
$message = $result->{$localizedDescription};
}
// Fall back to non-localized custom message if no locale has been provided.
if ( empty( $message ) && ! empty( $result->custom_message ) ) {
$message = $result->custom_message;
}
// Make sure we limit the type of HTML elements to be displayed.
if ( ! empty( $message ) ) {
$message = wp_kses( $message, array(
‘a’ => array(
‘href’ => array(),
‘target’ => array(),
‘title’ => array()
),
‘br’ => array(),
) );
// Make sure we are on a new line.
$message = ‘<br />’ . $message;
}
return $message;
}
}
}[/code]
ব্যস আপনার কাজ শেষ এখন সহযেই আপনার পোষ্টকে SEO friendly করেন।
আজ এইপর্যন্তই যদি কোন সমস্যা হয় কমেন্টে জানান ।
সবাই ভালো থাকেন সুস্থ থাকেন এবং নতুন কিছু পেতে হলে আমাদের সাথেই থাকেন
আসসালামু আলাইকুম