Skip to content

Commit

Permalink
Added translation Capability and readability
Browse files Browse the repository at this point in the history
  • Loading branch information
samiahmedsiddiqui committed Jan 5, 2018
1 parent 1c81e41 commit 0cee67d
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 295 deletions.
167 changes: 0 additions & 167 deletions admin/class.remove-links-scripts-admin.php

This file was deleted.

15 changes: 0 additions & 15 deletions css/admin-style.css

This file was deleted.

1 change: 0 additions & 1 deletion css/admin-style.min.css

This file was deleted.

77 changes: 0 additions & 77 deletions frontend/class.remove-links-scripts-frontend.php

This file was deleted.

12 changes: 8 additions & 4 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
=== Remove Links and Scripts ===
Contributors: aliya-yasir, sasiddiqui
Donate link: https://www.paypal.me/yasglobal
Tags: shortlink, rsd_link, wlwmanifest_link, feed_links, emoji_scripts, wp_embed, wp_json, emoji_styles, generator, rel_link
Tags: shortlink, rsd_link, wlwmanifest_link, feed_links, emoji_scripts, wp_embed, wp_json, emoji_styles, generator, rel_link, disable-embeds
Requires at least: 3.5
Tested up to: 4.9
Stable tag: 0.2
Stable tag: 0.2.1
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Expand All @@ -18,7 +18,7 @@ This plugin can remove the links, scripts, styles and some other meta from the w
* rsd_link
* wlwmanifest_link
* feed_links
* emoji_scripts
* emoji_scripts
* wp_embed
* wp_json
* emoji_styles
Expand All @@ -32,7 +32,7 @@ All the above headers can be removed from this plugin. You can select them from

== Installation ==

1. Upload the `remove-links-scripts` folder to the `/wp-content/plugins/` directory or Directly install the plugin through the WordPress plugins screen.
1. Upload the `remove-links-and-scripts` folder to the `/wp-content/plugins/` directory or Directly install the plugin through the WordPress plugins screen.
2. Activate the Remove Links and Scripts plugin through the `Plugins` menu in WordPress.
3. Configure the plugin by going to the menu `Remove Links and Scripts` that appears in your admin menu

Expand All @@ -50,6 +50,10 @@ A. Yes, You can select the items you want to remove.

== Changelog ==

= 0.2.1 =

* Added translation Capability and readability

= 0.2 =

* Improve the Performance of the Plugin
Expand Down
37 changes: 17 additions & 20 deletions remove-links-scripts-main.php
Original file line number Diff line number Diff line change
@@ -1,45 +1,42 @@
<?php

/**
* @package RemoveLinksScripts\Main
*/

// Make sure we don't expose any info if called directly
if ( !defined('ABSPATH') ) {
// Make sure we don't expose any info if called directly.
if ( ! defined( 'ABSPATH' ) ) {
echo 'Hi there! I\'m just a plugin, not much I can do when called directly.';
exit;
}

if ( !function_exists("add_action") || !function_exists("add_filter") ) {
if ( ! function_exists( 'add_action' ) || ! function_exists( 'add_filter' ) ) {
header( 'Status: 403 Forbidden' );
header( 'HTTP/1.1 403 Forbidden' );
exit();
}

define('REMOVE_LINKS_SCRIPTS_PLUGIN_VERSION', '0.2');
define( 'REMOVE_LINKS_SCRIPTS_PLUGIN_VERSION', '0.2.1' );

if ( ! defined( 'REMOVE_LINKS_SCRIPTS_PATH' ) ) {
define( 'REMOVE_LINKS_SCRIPTS_PATH', plugin_dir_path( REMOVE_LINKS_SCRIPTS_FILE ) );
}

if ( !defined('REMOVE_LINKS_SCRIPTS_PATH') ) {
define('REMOVE_LINKS_SCRIPTS_PATH', plugin_dir_path( __FILE__ ));
if ( ! defined( 'REMOVE_LINKS_SCRIPTS_BASENAME' ) ) {
define( 'REMOVE_LINKS_SCRIPTS_BASENAME', plugin_basename( REMOVE_LINKS_SCRIPTS_FILE ) );
}

require_once(REMOVE_LINKS_SCRIPTS_PATH.'frontend/class.remove-links-scripts-frontend.php');

$remove_links_scripts_frontend = new Remove_Links_Scripts_Frontend();
$remove_links_scripts_frontend->init();
require_once( REMOVE_LINKS_SCRIPTS_PATH . 'frontend/class-remove-links-scripts-frontend.php' );
new Remove_Links_Scripts_Frontend();

if ( is_admin() ) {
require_once(REMOVE_LINKS_SCRIPTS_PATH.'admin/class.remove-links-scripts-admin.php');
require_once( REMOVE_LINKS_SCRIPTS_PATH . 'admin/class-remove-links-scripts-admin.php' );
new Remove_Links_Scripts_Admin();

$plugin = plugin_basename( REMOVE_LINKS_SCRIPTS_FILE );
add_filter( "plugin_action_links_$plugin", 'remove_links_scripts_settings_link' );
}

/**
* Plugin Settings Page Link on the Plugin Page under the Plugin Name
* Add textdomain hook for translation.
*/
function remove_links_scripts_settings_link($links) {
$settings_link = '<a href="admin.php?page=remove-links-scripts-settings">Settings</a>';
array_unshift($links, $settings_link);
return $links;
function remove_links_scripts_load_plugin_textdomain() {
load_plugin_textdomain( 'remove-links-scripts', FALSE, REMOVE_LINKS_SCRIPTS_BASENAME . '/languages/' );
}
add_action( 'plugins_loaded', 'remove_links_scripts_load_plugin_textdomain' );
Loading

0 comments on commit 0cee67d

Please sign in to comment.