Version Description
This version updates a library used by the plugin to increase compatibility with the other plugins in my restaurant plugin suite.
Download this release
Release Info
Developer | NateWr |
Plugin | Business Profile |
Version | 1.0.2 |
Comparing to | |
See all releases |
Code changes from version 1.0.1 to 1.0.2
- business-profile.php +3 -3
- includes/Settings.class.php +1 -1
- lib/simple-admin-pages/README.md +2 -2
- lib/simple-admin-pages/classes/AdminPage.Menu.class.php +1 -1
- lib/simple-admin-pages/classes/AdminPage.Submenu.class.php +1 -1
- lib/simple-admin-pages/classes/AdminPage.Themes.class.php +1 -1
- lib/simple-admin-pages/classes/AdminPage.class.php +1 -1
- lib/simple-admin-pages/classes/AdminPageSection.class.php +1 -1
- lib/simple-admin-pages/classes/AdminPageSetting.Address.class.php +2 -2
- lib/simple-admin-pages/classes/AdminPageSetting.Editor.class.php +1 -1
- lib/simple-admin-pages/classes/AdminPageSetting.HTML.class.php +1 -1
- lib/simple-admin-pages/classes/AdminPageSetting.OpeningHours.class.php +1 -1
- lib/simple-admin-pages/classes/AdminPageSetting.Scheduler.class.php +1 -1
- lib/simple-admin-pages/classes/AdminPageSetting.Select.class.php +1 -1
- lib/simple-admin-pages/classes/AdminPageSetting.SelectPost.class.php +1 -1
- lib/simple-admin-pages/classes/AdminPageSetting.SelectTaxonomy.class.php +1 -1
- lib/simple-admin-pages/classes/AdminPageSetting.Text.class.php +1 -1
- lib/simple-admin-pages/classes/AdminPageSetting.Textarea.class.php +1 -1
- lib/simple-admin-pages/classes/AdminPageSetting.Toggle.class.php +1 -1
- lib/simple-admin-pages/classes/AdminPageSetting.class.php +1 -1
- lib/simple-admin-pages/classes/Library.class.php +25 -17
- lib/simple-admin-pages/js/scheduler.js +56 -13
- lib/simple-admin-pages/lib/pickadate/translations/ar.js +1 -1
- readme.txt +9 -3
business-profile.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Business Profile
|
4 |
* Plugin URI: http://themeofthecrop.com
|
5 |
* Description: Contact information, Google Maps and opening hours made easy for businesses.
|
6 |
-
* Version: 1.0.
|
7 |
* Author: Theme of the Crop
|
8 |
* Author URI: http://themeofthecrop.com
|
9 |
* License: GNU General Public License v2.0 or later
|
@@ -75,7 +75,7 @@ class bpfwpInit {
|
|
75 |
* @since 0.0.1
|
76 |
*/
|
77 |
public function load_textdomain() {
|
78 |
-
load_plugin_textdomain( BPFWP_TEXTDOMAIN, false, plugin_basename( dirname( __FILE__ ) ) . "/languages" );
|
79 |
}
|
80 |
|
81 |
/**
|
@@ -114,4 +114,4 @@ class bpfwpInit {
|
|
114 |
}
|
115 |
} // endif;
|
116 |
|
117 |
-
$bpfwp_controller = new bpfwpInit();
|
3 |
* Plugin Name: Business Profile
|
4 |
* Plugin URI: http://themeofthecrop.com
|
5 |
* Description: Contact information, Google Maps and opening hours made easy for businesses.
|
6 |
+
* Version: 1.0.2
|
7 |
* Author: Theme of the Crop
|
8 |
* Author URI: http://themeofthecrop.com
|
9 |
* License: GNU General Public License v2.0 or later
|
75 |
* @since 0.0.1
|
76 |
*/
|
77 |
public function load_textdomain() {
|
78 |
+
load_plugin_textdomain( BPFWP_TEXTDOMAIN, false, plugin_basename( dirname( __FILE__ ) ) . "/languages/" );
|
79 |
}
|
80 |
|
81 |
/**
|
114 |
}
|
115 |
} // endif;
|
116 |
|
117 |
+
$bpfwp_controller = new bpfwpInit();
|
includes/Settings.class.php
CHANGED
@@ -74,7 +74,7 @@ class bpfwpSettings {
|
|
74 |
require_once( BPFWP_PLUGIN_DIR . '/lib/simple-admin-pages/simple-admin-pages.php' );
|
75 |
$sap = sap_initialize_library(
|
76 |
$args = array(
|
77 |
-
'version' => '2.0.a.
|
78 |
'lib_url' => BPFWP_PLUGIN_URL . '/lib/simple-admin-pages/',
|
79 |
)
|
80 |
);
|
74 |
require_once( BPFWP_PLUGIN_DIR . '/lib/simple-admin-pages/simple-admin-pages.php' );
|
75 |
$sap = sap_initialize_library(
|
76 |
$args = array(
|
77 |
+
'version' => '2.0.a.7',
|
78 |
'lib_url' => BPFWP_PLUGIN_URL . '/lib/simple-admin-pages/',
|
79 |
)
|
80 |
);
|
lib/simple-admin-pages/README.md
CHANGED
@@ -38,7 +38,7 @@ Here's a simple example of how you can use this library to create an admin page.
|
|
38 |
require_once( 'path/to/simple-admin-pages/simple-admin-pages.php' );
|
39 |
$sap = sap_initialize_library(
|
40 |
array(
|
41 |
-
'version' => '2.0.a.
|
42 |
'lib_url' => PLUGIN_URL . '/lib/simple-admin-pages/', // URL path to sap library
|
43 |
)
|
44 |
);
|
@@ -127,7 +127,7 @@ The lib_url is used to print stylesheets or scripts attached to the library.
|
|
127 |
require_once( 'path/to/simple-admin-pages/simple-admin-pages.php' );
|
128 |
$sap = sap_initialize_library(
|
129 |
$args = array(
|
130 |
-
'version' => '2.0.a.
|
131 |
'lib_url' => PLUGIN_URL . '/lib/simple-admin-pages/', // URL path to sap library
|
132 |
)
|
133 |
);
|
38 |
require_once( 'path/to/simple-admin-pages/simple-admin-pages.php' );
|
39 |
$sap = sap_initialize_library(
|
40 |
array(
|
41 |
+
'version' => '2.0.a.7', // Version of the library
|
42 |
'lib_url' => PLUGIN_URL . '/lib/simple-admin-pages/', // URL path to sap library
|
43 |
)
|
44 |
);
|
127 |
require_once( 'path/to/simple-admin-pages/simple-admin-pages.php' );
|
128 |
$sap = sap_initialize_library(
|
129 |
$args = array(
|
130 |
+
'version' => '2.0.a.7', // Version of the library
|
131 |
'lib_url' => PLUGIN_URL . '/lib/simple-admin-pages/', // URL path to sap library
|
132 |
)
|
133 |
);
|
lib/simple-admin-pages/classes/AdminPage.Menu.class.php
CHANGED
@@ -8,7 +8,7 @@
|
|
8 |
* @package Simple Admin Pages
|
9 |
*/
|
10 |
|
11 |
-
class
|
12 |
|
13 |
public $setup_function = 'add_menu_page'; // WP function to register the page
|
14 |
|
8 |
* @package Simple Admin Pages
|
9 |
*/
|
10 |
|
11 |
+
class sapAdminPageMenu_2_0_a_7 extends sapAdminPage_2_0_a_7 {
|
12 |
|
13 |
public $setup_function = 'add_menu_page'; // WP function to register the page
|
14 |
|
lib/simple-admin-pages/classes/AdminPage.Submenu.class.php
CHANGED
@@ -8,7 +8,7 @@
|
|
8 |
* @package Simple Admin Pages
|
9 |
*/
|
10 |
|
11 |
-
class
|
12 |
|
13 |
public $setup_function = 'add_submenu_page'; // WP function to register the page
|
14 |
|
8 |
* @package Simple Admin Pages
|
9 |
*/
|
10 |
|
11 |
+
class sapAdminPageSubmenu_2_0_a_7 extends sapAdminPage_2_0_a_7 {
|
12 |
|
13 |
public $setup_function = 'add_submenu_page'; // WP function to register the page
|
14 |
|
lib/simple-admin-pages/classes/AdminPage.Themes.class.php
CHANGED
@@ -8,7 +8,7 @@
|
|
8 |
* @package Simple Admin Pages
|
9 |
*/
|
10 |
|
11 |
-
class
|
12 |
|
13 |
public $setup_function = 'add_theme_page'; // WP function to register the page
|
14 |
|
8 |
* @package Simple Admin Pages
|
9 |
*/
|
10 |
|
11 |
+
class sapAdminPageThemes_2_0_a_7 extends sapAdminPage_2_0_a_7 {
|
12 |
|
13 |
public $setup_function = 'add_theme_page'; // WP function to register the page
|
14 |
|
lib/simple-admin-pages/classes/AdminPage.class.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
* @package Simple Admin Pages
|
8 |
*/
|
9 |
|
10 |
-
class
|
11 |
|
12 |
public $title;
|
13 |
public $menu_title;
|
7 |
* @package Simple Admin Pages
|
8 |
*/
|
9 |
|
10 |
+
class sapAdminPage_2_0_a_7 {
|
11 |
|
12 |
public $title;
|
13 |
public $menu_title;
|
lib/simple-admin-pages/classes/AdminPageSection.class.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
* @package Simple Admin Pages
|
8 |
*/
|
9 |
|
10 |
-
class
|
11 |
|
12 |
// Page defaults
|
13 |
public $id; // unique id for this section
|
7 |
* @package Simple Admin Pages
|
8 |
*/
|
9 |
|
10 |
+
class sapAdminPageSection_2_0_a_7 {
|
11 |
|
12 |
// Page defaults
|
13 |
public $id; // unique id for this section
|
lib/simple-admin-pages/classes/AdminPageSetting.Address.class.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
* @package Simple Admin Pages
|
8 |
*/
|
9 |
|
10 |
-
class
|
11 |
|
12 |
/*
|
13 |
* Size of this textarea
|
@@ -135,4 +135,4 @@ class sapAdminPageSettingAddress_2_0_a_5 extends sapAdminPageSetting_2_0_a_5 {
|
|
135 |
<?php
|
136 |
}
|
137 |
|
138 |
-
}
|
7 |
* @package Simple Admin Pages
|
8 |
*/
|
9 |
|
10 |
+
class sapAdminPageSettingAddress_2_0_a_7 extends sapAdminPageSetting_2_0_a_7 {
|
11 |
|
12 |
/*
|
13 |
* Size of this textarea
|
135 |
<?php
|
136 |
}
|
137 |
|
138 |
+
}
|
lib/simple-admin-pages/classes/AdminPageSetting.Editor.class.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
* @package Simple Admin Pages
|
8 |
*/
|
9 |
|
10 |
-
class
|
11 |
|
12 |
public $sanitize_callback = 'wp_kses_post';
|
13 |
|
7 |
* @package Simple Admin Pages
|
8 |
*/
|
9 |
|
10 |
+
class sapAdminPageSettingEditor_2_0_a_7 extends sapAdminPageSetting_2_0_a_7 {
|
11 |
|
12 |
public $sanitize_callback = 'wp_kses_post';
|
13 |
|
lib/simple-admin-pages/classes/AdminPageSetting.HTML.class.php
CHANGED
@@ -14,7 +14,7 @@
|
|
14 |
* @package Simple Admin Pages
|
15 |
*/
|
16 |
|
17 |
-
class
|
18 |
|
19 |
public $sanitize_callback = 'sanitize_text_field';
|
20 |
|
14 |
* @package Simple Admin Pages
|
15 |
*/
|
16 |
|
17 |
+
class sapAdminPageSettingHTML_2_0_a_7 extends sapAdminPageSetting_2_0_a_7 {
|
18 |
|
19 |
public $sanitize_callback = 'sanitize_text_field';
|
20 |
|
lib/simple-admin-pages/classes/AdminPageSetting.OpeningHours.class.php
CHANGED
@@ -25,7 +25,7 @@
|
|
25 |
* @package Simple Admin Pages
|
26 |
*/
|
27 |
|
28 |
-
class
|
29 |
|
30 |
public $sanitize_callback = 'sanitize_text_field';
|
31 |
|
25 |
* @package Simple Admin Pages
|
26 |
*/
|
27 |
|
28 |
+
class sapAdminPageSettingOpeningHours_2_0_a_7 extends sapAdminPageSetting_2_0_a_7 {
|
29 |
|
30 |
public $sanitize_callback = 'sanitize_text_field';
|
31 |
|
lib/simple-admin-pages/classes/AdminPageSetting.Scheduler.class.php
CHANGED
@@ -10,7 +10,7 @@
|
|
10 |
* @package Simple Admin Pages
|
11 |
*/
|
12 |
|
13 |
-
class
|
14 |
|
15 |
public $sanitize_callback = 'sanitize_text_field';
|
16 |
|
10 |
* @package Simple Admin Pages
|
11 |
*/
|
12 |
|
13 |
+
class sapAdminPageSettingScheduler_2_0_a_7 extends sapAdminPageSetting_2_0_a_7 {
|
14 |
|
15 |
public $sanitize_callback = 'sanitize_text_field';
|
16 |
|
lib/simple-admin-pages/classes/AdminPageSetting.Select.class.php
CHANGED
@@ -21,7 +21,7 @@
|
|
21 |
* @package Simple Admin Pages
|
22 |
*/
|
23 |
|
24 |
-
class
|
25 |
|
26 |
public $sanitize_callback = 'sanitize_text_field';
|
27 |
|
21 |
* @package Simple Admin Pages
|
22 |
*/
|
23 |
|
24 |
+
class sapAdminPageSettingSelect_2_0_a_7 extends sapAdminPageSetting_2_0_a_7 {
|
25 |
|
26 |
public $sanitize_callback = 'sanitize_text_field';
|
27 |
|
lib/simple-admin-pages/classes/AdminPageSetting.SelectPost.class.php
CHANGED
@@ -17,7 +17,7 @@
|
|
17 |
* @package Simple Admin Pages
|
18 |
*/
|
19 |
|
20 |
-
class
|
21 |
|
22 |
public $sanitize_callback = 'intval';
|
23 |
|
17 |
* @package Simple Admin Pages
|
18 |
*/
|
19 |
|
20 |
+
class sapAdminPageSettingSelectPost_2_0_a_7 extends sapAdminPageSetting_2_0_a_7 {
|
21 |
|
22 |
public $sanitize_callback = 'intval';
|
23 |
|
lib/simple-admin-pages/classes/AdminPageSetting.SelectTaxonomy.class.php
CHANGED
@@ -19,7 +19,7 @@
|
|
19 |
* @package Simple Admin Pages
|
20 |
*/
|
21 |
|
22 |
-
class
|
23 |
|
24 |
public $sanitize_callback = 'intval';
|
25 |
|
19 |
* @package Simple Admin Pages
|
20 |
*/
|
21 |
|
22 |
+
class sapAdminPageSettingSelectTaxonomy_2_0_a_7 extends sapAdminPageSetting_2_0_a_7 {
|
23 |
|
24 |
public $sanitize_callback = 'intval';
|
25 |
|
lib/simple-admin-pages/classes/AdminPageSetting.Text.class.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
* @package Simple Admin Pages
|
8 |
*/
|
9 |
|
10 |
-
class
|
11 |
|
12 |
public $sanitize_callback = 'sanitize_text_field';
|
13 |
|
7 |
* @package Simple Admin Pages
|
8 |
*/
|
9 |
|
10 |
+
class sapAdminPageSettingText_2_0_a_7 extends sapAdminPageSetting_2_0_a_7 {
|
11 |
|
12 |
public $sanitize_callback = 'sanitize_text_field';
|
13 |
|
lib/simple-admin-pages/classes/AdminPageSetting.Textarea.class.php
CHANGED
@@ -9,7 +9,7 @@
|
|
9 |
* @todo textareas should have an option to swap new lines for <br>s
|
10 |
*/
|
11 |
|
12 |
-
class
|
13 |
|
14 |
/*
|
15 |
* Size of this textarea
|
9 |
* @todo textareas should have an option to swap new lines for <br>s
|
10 |
*/
|
11 |
|
12 |
+
class sapAdminPageSettingTextarea_2_0_a_7 extends sapAdminPageSetting_2_0_a_7 {
|
13 |
|
14 |
/*
|
15 |
* Size of this textarea
|
lib/simple-admin-pages/classes/AdminPageSetting.Toggle.class.php
CHANGED
@@ -17,7 +17,7 @@
|
|
17 |
* @package Simple Admin Pages
|
18 |
*/
|
19 |
|
20 |
-
class
|
21 |
|
22 |
public $sanitize_callback = 'sanitize_text_field';
|
23 |
|
17 |
* @package Simple Admin Pages
|
18 |
*/
|
19 |
|
20 |
+
class sapAdminPageSettingToggle_2_0_a_7 extends sapAdminPageSetting_2_0_a_7 {
|
21 |
|
22 |
public $sanitize_callback = 'sanitize_text_field';
|
23 |
|
lib/simple-admin-pages/classes/AdminPageSetting.class.php
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
* @package Simple Admin Pages
|
16 |
*/
|
17 |
|
18 |
-
abstract class
|
19 |
|
20 |
// Page defaults
|
21 |
public $id; // used in form fields and database to track and store setting
|
15 |
* @package Simple Admin Pages
|
16 |
*/
|
17 |
|
18 |
+
abstract class sapAdminPageSetting_2_0_a_7 {
|
19 |
|
20 |
// Page defaults
|
21 |
public $id; // used in form fields and database to track and store setting
|
lib/simple-admin-pages/classes/Library.class.php
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<?php
|
2 |
-
if ( !class_exists( '
|
3 |
/**
|
4 |
* This library class loads and provides access to the correct version of the
|
5 |
* Simple Admin Pages library.
|
@@ -7,10 +7,10 @@ if ( !class_exists( 'sapLibrary_2_0_a_5' ) ) {
|
|
7 |
* @since 1.0
|
8 |
* @package Simple Admin Pages
|
9 |
*/
|
10 |
-
class
|
11 |
|
12 |
// Version of the library
|
13 |
-
private $version = '2.0.a.
|
14 |
|
15 |
// A full URL to the library which is used to correctly link scripts and
|
16 |
// stylesheets.
|
@@ -180,6 +180,11 @@ class sapLibrary_2_0_a_5 {
|
|
180 |
require_once( $type['filename'] );
|
181 |
} elseif ( isset( $this->lib_extension_path ) && file_exists( $this->lib_extension_path . $type['filename'] ) ) {
|
182 |
require_once( $this->lib_extension_path . '/' . $type['filename'] );
|
|
|
|
|
|
|
|
|
|
|
183 |
} else {
|
184 |
return false;
|
185 |
}
|
@@ -264,7 +269,7 @@ class sapLibrary_2_0_a_5 {
|
|
264 |
}
|
265 |
|
266 |
$class = $this->get_setting_classname( $type );
|
267 |
-
if (
|
268 |
$this->pages[ $page ]->sections[ $section ]->add_setting( new $class( $args ) );
|
269 |
}
|
270 |
|
@@ -374,26 +379,29 @@ class sapLibrary_2_0_a_5 {
|
|
374 |
/**
|
375 |
* Enqueue the stylesheets and scripts
|
376 |
* @since 1.0
|
377 |
-
* @todo complex settings should enqueue their assets only when loaded
|
378 |
*/
|
379 |
public function enqueue_scripts() {
|
|
|
|
|
380 |
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
foreach( $
|
389 |
-
|
|
|
|
|
|
|
|
|
|
|
390 |
}
|
391 |
}
|
392 |
}
|
393 |
}
|
394 |
-
|
395 |
-
// Default styles and scripts
|
396 |
-
wp_enqueue_style( 'sap-admin-style-' . $this->version, $this->lib_url . 'css/admin.css' );
|
397 |
}
|
398 |
|
399 |
/**
|
1 |
<?php
|
2 |
+
if ( !class_exists( 'sapLibrary_2_0_a_7' ) ) {
|
3 |
/**
|
4 |
* This library class loads and provides access to the correct version of the
|
5 |
* Simple Admin Pages library.
|
7 |
* @since 1.0
|
8 |
* @package Simple Admin Pages
|
9 |
*/
|
10 |
+
class sapLibrary_2_0_a_7 {
|
11 |
|
12 |
// Version of the library
|
13 |
+
private $version = '2.0.a.7';
|
14 |
|
15 |
// A full URL to the library which is used to correctly link scripts and
|
16 |
// stylesheets.
|
180 |
require_once( $type['filename'] );
|
181 |
} elseif ( isset( $this->lib_extension_path ) && file_exists( $this->lib_extension_path . $type['filename'] ) ) {
|
182 |
require_once( $this->lib_extension_path . '/' . $type['filename'] );
|
183 |
+
if ( !class_exists( $type['class'] ) ) {
|
184 |
+
return false;
|
185 |
+
} else {
|
186 |
+
return $type['class'];
|
187 |
+
}
|
188 |
} else {
|
189 |
return false;
|
190 |
}
|
269 |
}
|
270 |
|
271 |
$class = $this->get_setting_classname( $type );
|
272 |
+
if ( $class && class_exists( $class ) ) {
|
273 |
$this->pages[ $page ]->sections[ $section ]->add_setting( new $class( $args ) );
|
274 |
}
|
275 |
|
379 |
/**
|
380 |
* Enqueue the stylesheets and scripts
|
381 |
* @since 1.0
|
|
|
382 |
*/
|
383 |
public function enqueue_scripts() {
|
384 |
+
|
385 |
+
$screen = get_current_screen();
|
386 |
|
387 |
+
foreach ( $this->pages as $page_id => $page ) {
|
388 |
+
|
389 |
+
// Only enqueue assets for the current page
|
390 |
+
if ( strpos( $screen->base, $page_id ) !== false ) {
|
391 |
+
wp_enqueue_style( 'sap-admin-style-' . $this->version, $this->lib_url . 'css/admin.css' );
|
392 |
+
|
393 |
+
foreach ( $page->sections as $section ) {
|
394 |
+
foreach ( $section->settings as $setting ) {
|
395 |
+
foreach( $setting->scripts as $handle => $script ) {
|
396 |
+
wp_enqueue_script( $handle, $this->lib_url . $script['path'], $script['dependencies'], $script['version'], $script['footer'] );
|
397 |
+
}
|
398 |
+
foreach( $setting->styles as $handle => $style ) {
|
399 |
+
wp_enqueue_style( $handle, $this->lib_url . $style['path'], $style['dependencies'], $style['version'], $style['media'] );
|
400 |
+
}
|
401 |
}
|
402 |
}
|
403 |
}
|
404 |
}
|
|
|
|
|
|
|
405 |
}
|
406 |
|
407 |
/**
|
lib/simple-admin-pages/js/scheduler.js
CHANGED
@@ -284,6 +284,54 @@ jQuery(document).ready(function ($) {
|
|
284 |
}
|
285 |
}
|
286 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
287 |
/**
|
288 |
* Register click events on load
|
289 |
*/
|
@@ -295,12 +343,12 @@ jQuery(document).ready(function ($) {
|
|
295 |
if ( typeof sap_scheduler.settings != 'undefined' ) {
|
296 |
for ( var key in sap_scheduler.settings ) {
|
297 |
var obj = sap_scheduler.settings[key];
|
298 |
-
$( '#' + key + ' .sap-scheduler-date-input input' )
|
299 |
-
|
300 |
-
|
301 |
-
$( '#' + key + ' .sap-scheduler-
|
302 |
-
|
303 |
-
|
304 |
});
|
305 |
}
|
306 |
}
|
@@ -313,13 +361,8 @@ jQuery(document).ready(function ($) {
|
|
313 |
var scheduler_id = scheduler.attr( 'id' );
|
314 |
var scheduler_settings = sap_scheduler.settings[ scheduler_id ];
|
315 |
scheduler.append( scheduler_settings.template.replace( /\[0\]/g, '[' + scheduler.children( '.sap-scheduler-rule' ).length + ']' ) );
|
316 |
-
scheduler.last( '#' + scheduler_id + ' .sap-scheduler-rule' ).find( '.sap-scheduler-date-input input' )
|
317 |
-
|
318 |
-
});
|
319 |
-
scheduler.last( '#' + scheduler_id + ' .sap-scheduler-rule' ).find( '.sap-scheduler-time-input input' ).pickatime({
|
320 |
-
interval: scheduler_settings.time_interval,
|
321 |
-
format: scheduler_settings.time_format,
|
322 |
-
});
|
323 |
sap_scheduler_register_events();
|
324 |
|
325 |
return false;
|
284 |
}
|
285 |
}
|
286 |
|
287 |
+
/**
|
288 |
+
* Register a new datepicker on an element
|
289 |
+
*/
|
290 |
+
function sap_scheduler_register_datepicker( el ) {
|
291 |
+
|
292 |
+
el.pickadate({
|
293 |
+
format: obj.date_format,
|
294 |
+
formatSubmit: 'yyyy/mm/dd',
|
295 |
+
hiddenName: true,
|
296 |
+
|
297 |
+
// Select the value when loaded if a value has been set
|
298 |
+
onStart: function() {
|
299 |
+
if ( this.get() !== '' ) {
|
300 |
+
var date = new Date( this.get() );
|
301 |
+
if ( Object.prototype.toString.call( date ) === "[object Date]" ) {
|
302 |
+
this.set( 'select', date );
|
303 |
+
}
|
304 |
+
}
|
305 |
+
}
|
306 |
+
});
|
307 |
+
}
|
308 |
+
|
309 |
+
/**
|
310 |
+
* Register a new timepicker on an element
|
311 |
+
*/
|
312 |
+
function sap_scheduler_register_timepicker( el ) {
|
313 |
+
|
314 |
+
el.pickatime({
|
315 |
+
interval: obj.time_interval,
|
316 |
+
format: obj.time_format,
|
317 |
+
formatSubmit: 'h:i A',
|
318 |
+
hiddenName: true,
|
319 |
+
|
320 |
+
// Select the value when loaded if a value has been set
|
321 |
+
onStart: function() {
|
322 |
+
if ( this.get() !== '' ) {
|
323 |
+
var today = new Date();
|
324 |
+
var today_date = today.getFullYear() + '/' + ( today.getMonth() + 1 ) + '/' + today.getDate();
|
325 |
+
var time = new Date( today_date + ' ' + this.get() );
|
326 |
+
if ( Object.prototype.toString.call( time ) === "[object Date]" ) {
|
327 |
+
this.set( 'select', time );
|
328 |
+
}
|
329 |
+
}
|
330 |
+
}
|
331 |
+
});
|
332 |
+
}
|
333 |
+
|
334 |
+
|
335 |
/**
|
336 |
* Register click events on load
|
337 |
*/
|
343 |
if ( typeof sap_scheduler.settings != 'undefined' ) {
|
344 |
for ( var key in sap_scheduler.settings ) {
|
345 |
var obj = sap_scheduler.settings[key];
|
346 |
+
sap_scheduler_register_datepicker( $( '#' + key + ' .sap-scheduler-date-input input[type="text"]' ) );
|
347 |
+
sap_scheduler_register_timepicker( $( '#' + key + ' .sap-scheduler-time-input input[type="text"]' ) );
|
348 |
+
|
349 |
+
$( '#' + key + ' .sap-scheduler-rule' ).each( function() {
|
350 |
+
sap_scheduler_set_date_phrase( $(this), $( '#' + key ).attr( 'id' ) );
|
351 |
+
sap_scheduler_set_time_phrase( $(this), $( '#' + key ).attr( 'id' ) );
|
352 |
});
|
353 |
}
|
354 |
}
|
361 |
var scheduler_id = scheduler.attr( 'id' );
|
362 |
var scheduler_settings = sap_scheduler.settings[ scheduler_id ];
|
363 |
scheduler.append( scheduler_settings.template.replace( /\[0\]/g, '[' + scheduler.children( '.sap-scheduler-rule' ).length + ']' ) );
|
364 |
+
sap_scheduler_register_datepicker( scheduler.last( '#' + scheduler_id + ' .sap-scheduler-rule' ).find( '.sap-scheduler-date-input input[type="text"]' ) );
|
365 |
+
sap_scheduler_register_timepicker( scheduler.last( '#' + scheduler_id + ' .sap-scheduler-rule' ).find( '.sap-scheduler-time-input input[type="text"]' ) );
|
|
|
|
|
|
|
|
|
|
|
366 |
sap_scheduler_register_events();
|
367 |
|
368 |
return false;
|
lib/simple-admin-pages/lib/pickadate/translations/ar.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
|
1 |
+
jQuery.extend(jQuery.fn.pickadate.defaults,{monthsFull:["يناير","فبراير","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر"],monthsShort:["يناير","فبراير","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر"],weekdaysFull:["الاحد","الاثنين","الثلاثاء","الاربعاء","الخميس","الجمعة","السبت"],weekdaysShort:["الاحد","الاثنين","الثلاثاء","الاربعاء","الخميس","الجمعة","السبت"],today:"اليوم",clear:"مسح",format:"yyyy mmmm dd",formatSubmit:"yyyy/mm/dd"});
|
readme.txt
CHANGED
@@ -3,9 +3,9 @@ Contributors: NateWr
|
|
3 |
Author URI: https://github.com/NateWr
|
4 |
Plugin URL: http://themeofthecrop.com
|
5 |
Requires at Least: 3.9
|
6 |
-
Tested Up To:
|
7 |
Tags: business profile, address, google map, schema, contact, phone, address, seo
|
8 |
-
Stable tag: 1.0.
|
9 |
License: GPLv2 or later
|
10 |
Donate link: http://themeofthecrop.com
|
11 |
|
@@ -52,6 +52,9 @@ This plugin is packed with hooks so you can extend it as needed. Development tak
|
|
52 |
|
53 |
== Changelog ==
|
54 |
|
|
|
|
|
|
|
55 |
= 1.0.1 (2014-07-16) =
|
56 |
* Fix character-case error and rename integrations file for better standardization
|
57 |
|
@@ -65,8 +68,11 @@ This plugin is packed with hooks so you can extend it as needed. Development tak
|
|
65 |
|
66 |
== Upgrade Notice ==
|
67 |
|
|
|
|
|
|
|
68 |
= 1.0.1 =
|
69 |
This update fixes a letter-case bug that may effect some installations.
|
70 |
|
71 |
= 1.0 =
|
72 |
-
This initial public release adds an integration with the Restaurant Reservations plugin. If the plugin is active it will now let you display a link to the booking form.
|
3 |
Author URI: https://github.com/NateWr
|
4 |
Plugin URL: http://themeofthecrop.com
|
5 |
Requires at Least: 3.9
|
6 |
+
Tested Up To: 4.0
|
7 |
Tags: business profile, address, google map, schema, contact, phone, address, seo
|
8 |
+
Stable tag: 1.0.2
|
9 |
License: GPLv2 or later
|
10 |
Donate link: http://themeofthecrop.com
|
11 |
|
52 |
|
53 |
== Changelog ==
|
54 |
|
55 |
+
= 1.0.2 (2014-07-16) =
|
56 |
+
* Update Simple Admin Pages library to v2.0.a.7
|
57 |
+
|
58 |
= 1.0.1 (2014-07-16) =
|
59 |
* Fix character-case error and rename integrations file for better standardization
|
60 |
|
68 |
|
69 |
== Upgrade Notice ==
|
70 |
|
71 |
+
= 1.0.2 =
|
72 |
+
This version updates a library used by the plugin to increase compatibility with the other plugins in my restaurant plugin suite.
|
73 |
+
|
74 |
= 1.0.1 =
|
75 |
This update fixes a letter-case bug that may effect some installations.
|
76 |
|
77 |
= 1.0 =
|
78 |
+
This initial public release adds an integration with the Restaurant Reservations plugin. If the plugin is active it will now let you display a link to the booking form.
|