Skip to content

Commit c2191f1

Browse files
committed
Bugs fixed
1 parent 35cfffb commit c2191f1

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

src/install.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function text_domain_cb() {
3939
$locale = apply_filters('plugin_locale', $locale, $this->textDomin);
4040

4141
unload_textdomain($this->textDomin);
42-
load_textdomain($this->textDomin, PLUGIN_LN . 'quize-custom-ads-' . $locale . '.mo');
42+
load_textdomain($this->textDomin, PLUGIN_LN . 'textdomain-' . $locale . '.mo');
4343
load_plugin_textdomain( $this->textDomin, false, PLUGIN_LN );
4444
}
4545

src/settings.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public function menu_page_callback() { ?>
136136
* Following is the settings form
137137
*/ ?>
138138
<form method="post" action="">
139-
<?php settings_fields("settings_name");
139+
<?php settings_fields("settings_id");
140140
do_settings_sections("settings_name");
141141
submit_button( __( 'Save', 'textdomain' ), 'primary', 'id' ); ?>
142142
</form>
@@ -178,7 +178,8 @@ public function help_tabs() {
178178
public function add_settings() {
179179

180180
add_settings_section( 'settings_id', __( 'Section Name', 'textdomain' ), array( $this,'section_cb' ), 'settings_name' );
181-
register_setting( 'settings_name', 'settings_field' );
181+
182+
register_setting( 'settings_id', 'settings_field_name' );
182183
add_settings_field( 'settings_field_name', __( 'Field Name', 'textdomain' ), array( $this, 'settings_field_cb' ), 'settings_name', 'settings_id' );
183184
}
184185

wp-plugin-framework.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Plugin Name: WordPress Plugin Framework
44
Plugin URI: https://github.com/nirjharlo/wp-plugin-framework/
55
Description: Simple and Light WordPress plugin development framework for organized Object Oriented code for Developers.
6-
Version: 1.1
6+
Version: 1.2
77
Author: Nirjhar Lo
88
Author URI: http://nirjharlo.com
99
Text Domain: textdomain
@@ -26,11 +26,12 @@
2626
defined('PLUGIN_TRANSLATE') or define('PLUGIN_TRANSLATE', plugin_basename( plugin_dir_path(__FILE__).'asset/ln/'));
2727

2828
//change /wp-plugin-framework/ with your /plugin-name/
29-
defined('PLUGIN_JS') or define('PLUGIN_JS', plugins_url().'/wp-plugin-framework/asset/js/');
30-
defined('PLUGIN_CSS') or define('PLUGIN_CSS', plugins_url().'/wp-plugin-framework/asset/css/');
31-
defined('PLUGIN_IMAGE') or define('PLUGIN_IMAGE', plugins_url().'/wp-plugin-framework/asset/img/');
29+
$plugin_file_parts = explode('/', PLUGIN_FILE);
30+
defined('PLUGIN_JS') or define('PLUGIN_JS', plugins_url().'/' . $plugin_file_parts[0] . '/asset/js/');
31+
defined('PLUGIN_CSS') or define('PLUGIN_CSS', plugins_url().'/' . $plugin_file_parts[0] . '/asset/css/');
32+
defined('PLUGIN_IMAGE') or define('PLUGIN_IMAGE', plugins_url().'/' . $plugin_file_parts[0] . '/asset/img/');
3233

3334

3435
//The Plugin
3536
require_once('autoload.php');
36-
if ( class_exists( 'PLUGIN_BUILD' ) ) new PLUGIN_BUILD(); ?>
37+
if ( class_exists( 'PLUGIN_BUILD' ) ) new PLUGIN_BUILD(); ?>

0 commit comments

Comments
 (0)