Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OERu
blog-feed-finder
Commits
7a0bc135
Commit
7a0bc135
authored
Jul 06, 2018
by
Dave Lane
Browse files
tidying up filenames to help keep the namespace well defined, and turned off JS and PHP debugging
parent
a60290db
Changes
4
Hide whitespace changes
Inline
Side-by-side
blog-feed-finder.php
View file @
7a0bc135
...
...
@@ -58,7 +58,7 @@ define('BFF_ADMIN_MENU', 'BFF Settings');
// other useful parameters
define
(
'BFF_MAX_FILE_READ_CHAR'
,
1000000
);
// limit max size of the file to read to 1mb
// turn on debugging with true, off with false
define
(
'BFF_DEBUG'
,
tru
e
);
define
(
'BFF_DEBUG'
,
fals
e
);
define
(
'LOG_STREAM'
,
getenv
(
'LOG_STREAM'
));
// include the dependencies
...
...
css/style.css
→
css/
bff_
style.css
View file @
7a0bc135
File moved
includes/bff-app.php
View file @
7a0bc135
...
...
@@ -24,7 +24,7 @@ class BFFForm extends BFFCourse {
$this
->
create_post
(
BFF_SLUG
);
$this
->
log
(
'setting up scripts'
);
// add the ajax handlers
wp_enqueue_script
(
'bff-script'
,
BFF_URL
.
'js/script.js'
,
array
(
wp_enqueue_script
(
'bff-script'
,
BFF_URL
.
'js/
bff_
script.js'
,
array
(
'jquery'
,
'jquery-form'
));
wp_localize_script
(
'bff-script'
,
'bff_data'
,
array
(
'ajaxurl'
=>
admin_url
(
'admin-ajax.php'
),
...
...
@@ -32,7 +32,7 @@ class BFFForm extends BFFCourse {
'nonce_set'
=>
wp_create_nonce
(
'bff-set-nonce'
),
));
// our css
wp_register_style
(
'bff-style'
,
BFF_URL
.
'css/style.css'
);
wp_register_style
(
'bff-style'
,
BFF_URL
.
'css/
bff_
style.css'
);
wp_enqueue_style
(
'bff-style'
);
// this enables the feedfinder service for authenticated users...
add_action
(
'wp_ajax_bff_submit'
,
array
(
$this
,
'ajax_submit'
));
...
...
js/script.js
→
js/
bff_
script.js
View file @
7a0bc135
/* created by Dave Lane, dave@oerfoundation.org, https://oeru.org */
var
DEBUG
=
tru
e
;
// set to false to disable debugging
var
DEBUG
=
fals
e
;
// set to false to disable debugging
var
LOG
=
DEBUG
?
console
.
log
.
bind
(
console
)
:
function
()
{};
LOG
(
'
BFF DEBUG = true
'
);
// only prints if DEBUG = true
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment