Skip to content

Commit

Permalink
Fix coding standard and phpcs error
Browse files Browse the repository at this point in the history
  • Loading branch information
devansh016 committed Jul 22, 2024
1 parent b8b790c commit 7323d35
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
11 changes: 1 addition & 10 deletions b2w-redirection.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*/
function rt_blogger_to_wordpress_add_option() {

add_management_page( __( 'Blogger To WordPress Redirection', 'blogger-to-wordpress-redirection' ), __( 'Blogger To WordPress Redirection', 'blogger-to-wordpress-redirection' ), 'administrator', 'rt-blogger-to-wordpress-redirection', 'rt_blogger_to_wordpress_administrative_page' );
add_management_page( __( 'Blogger To WordPress Redirection', 'blogger-to-wordpress-redirection' ), __( 'Blogger To WordPress Redirection', 'blogger-to-wordpress-redirection' ), 'manage_options', 'rt-blogger-to-wordpress-redirection', 'rt_blogger_to_wordpress_administrative_page' );

wp_enqueue_script( 'rt-blogger-to-wordpress-redirection-js', ( RT_B2WR_PLUGIN_URL . 'js/b2w-redirection-ajax.js' ), array( 'jquery', 'postbox' ), filemtime( RT_B2WR_PLUGIN_DIR . 'js/b2w-redirection-ajax.js' ), true );

Expand All @@ -39,7 +39,6 @@ function rt_blogger_to_wordpress_add_option() {
wp_enqueue_style( 'dashboard' );

}

}

add_action( 'admin_menu', 'rt_blogger_to_wordpress_add_option' );
Expand All @@ -50,7 +49,6 @@ function rt_blogger_to_wordpress_add_option() {
function rt_blogger_to_wordpress_administrative_page() {

require_once RT_B2WR_PLUGIN_DIR . 'templates/settings.php';

}

/**
Expand All @@ -75,12 +73,10 @@ function rt_b2wr_get_config() {
require_once RT_B2WR_PLUGIN_DIR . 'templates/get-config.php';

die();

}

add_action( 'wp_ajax_rt_b2wr_get_config', 'rt_b2wr_get_config' );


/**
* Redirection Function (!important)
*/
Expand Down Expand Up @@ -132,7 +128,6 @@ function rt_blogger_to_wordpress_redirection() {
exit;
}
}

}

add_action( 'init', 'rt_blogger_to_wordpress_redirection' );
Expand Down Expand Up @@ -169,7 +164,6 @@ function rt_b2wr_verify_config() {
require_once RT_B2WR_PLUGIN_DIR . 'templates/verify-config.php';

die();

}

add_action( 'wp_ajax_rt_b2wr_verify_config', 'rt_b2wr_verify_config' );
Expand All @@ -189,7 +183,6 @@ function rt_get_feeds_from_blogger_to_wp() {
}

require_once RT_B2WR_PLUGIN_DIR . 'templates/feeds.php';

}

/**
Expand All @@ -200,7 +193,6 @@ function rt_blogger_to_wordpress_update_notice() {
if ( empty( get_option( 'rtb2wr206' ) ) ) {
require_once RT_B2WR_PLUGIN_DIR . 'template/update-notice.php';
}

}

/**
Expand All @@ -215,7 +207,6 @@ function rt_b2wr_hide_notice_block() {
}

update_option( 'rtb2wr206', 'done' );

}

add_action( 'wp_ajax_rt_b2wr_hide_notice_block', 'rt_b2wr_hide_notice_block' );
4 changes: 2 additions & 2 deletions templates/get-config.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
?>
<br/>

<h3><u> <?php printf( '%1$s', esc_html__( 'List of Blogs' ) ); ?> </u></h3>
<h3><u> <?php printf( '%1$s', esc_html__( 'List of Blogs', 'blogger-to-wordpress-redirection' ) ); ?> </u></h3>

<?php
printf(
Expand Down Expand Up @@ -54,7 +54,7 @@
<tr>
<td width="15px"><?php echo esc_html( $site_no ); ?></td>
<td><b><?php echo esc_html( $result->meta_value ); ?> </b></td>
<td width="75px"><input type="submit" class="button" onclick = "generate_code(<?php echo sprintf( '\'%1$s\',\'%2$s\',\'%3$s\'', esc_js( $result->meta_value ), esc_js( RT_B2WR_BLOG_URL ), esc_js( $nonce ) ); ?>);" name="start" value="<?php esc_attr_e( 'Get Code', 'blogger-to-wordpress-redirection' ); ?>"/></td>
<td width="75px"><input type="submit" class="button" onclick = "generate_code(<?php printf( '\'%1$s\',\'%2$s\',\'%3$s\'', esc_js( $result->meta_value ), esc_js( RT_B2WR_BLOG_URL ), esc_js( $nonce ) ); ?>);" name="start" value="<?php esc_attr_e( 'Get Code', 'blogger-to-wordpress-redirection' ); ?>"/></td>
</tr>

<?php
Expand Down
2 changes: 1 addition & 1 deletion templates/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<div>
<img id="btowp_img" alt="<?php esc_attr_e( 'B2W-Redirection', 'blogger-to-wordpress-redirection' ); ?>" src="<?php echo esc_url( RT_B2WR_PLUGIN_URL ); ?>images/btowp_img.png" />
<h1 id="btowp_h2"><?php esc_html_e( 'Blogger to WordPress Redirection', 'blogger-to-wp' ); ?></h1>
<h1 id="btowp_h2"><?php esc_html_e( 'Blogger to WordPress Redirection', 'blogger-to-wordpress-redirection' ); ?></h1>
</div>

<div class="clear"></div>
Expand Down

0 comments on commit 7323d35

Please sign in to comment.