Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

local acf json #8

Merged
merged 9 commits into from
Jul 14, 2015
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
bower_components
assets/dist
*.sublime-*
3 changes: 3 additions & 0 deletions assets/acf_local_json/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php

// Silence is Golden
21 changes: 20 additions & 1 deletion lib/init.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function widgets_init() {
* Registers nav menus
*/
function nav_menus_init() {
register_nav_menus(array (
register_nav_menus(array(
'header' => 'Site Navigation',
'footer_social' => 'Social Links',
'footer_organize' => 'Organize Links'
Expand All @@ -47,3 +47,22 @@ function admin_menu_overrides() {
'menu' => 'Theme Options'
));
}

/**
* ACF Local JSON
*/

// save custom fields
function acf_json_save($path) {
$path = get_stylesheet_directory() . '/assets/acf_local_json';
return $path;
}
add_filter('acf/settings/save_json', __NAMESPACE__ . '\\acf_json_save');

// load custom fields
function acf_json_load($paths) {
unset($paths[0]);
$paths[] = get_stylesheet_directory() . '/assets/acf_local_json';
return $paths;
}
add_filter('acf/settings/load_json', __NAMESPACE__ . '\\acf_json_load');
8 changes: 8 additions & 0 deletions sanders.sublime-project
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"folders":
[
{
"path": "."
}
]
}
319 changes: 319 additions & 0 deletions sanders.sublime-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,319 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file shouldn't be in here

"auto_complete":
{
"selected_items":
[
[
"wp_rese",
"wp_reset_query"
]
]
},
"buffers":
[
{
"file": "/home/zack/vagrant-wordpress/www/theme-testing/htdocs/wp-content/themes/index.php",
"settings":
{
"buffer_size": 28,
"line_ending": "Unix"
}
}
],
"build_system": "",
"build_system_choices":
[
],
"build_varint": "",
"command_palette":
{
"height": 368.0,
"last_filter": "packa",
"selected_items":
[
[
"packa",
"Package Control: Install Package"
],
[
"install",
"Package Control: Install Package"
],
[
"html",
"Set Syntax: HTML"
]
],
"width": 561.0
},
"console":
{
"height": 139.0,
"history":
[
"import urllib.request,os,hashlib; h = 'eb2297e1a458f27d836c04bb0cbaf282' + 'd0e7a3098092775ccb37ca9d6b2e4b7d'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)"
]
},
"distraction_free":
{
"menu_visible": true,
"show_minimap": false,
"show_open_files": false,
"show_tabs": false,
"side_bar_visible": false,
"status_bar_visible": false
},
"expanded_folders":
[
"/home/zack/vagrant-wordpress/www/theme-testing/htdocs/wp-content/themes/SandersTheme"
],
"file_history":
[
"/home/zack/.config/sublime-text-3/Packages/Terminal/Default (Linux).sublime-keymap",
"/home/zack/.config/sublime-text-3/Packages/User/Terminal.sublime-settings",
"/home/zack/.config/sublime-text-3/Packages/User/Preferences.sublime-settings",
"/home/zack/vagrant-wordpress/www/theme-testing/htdocs/wp-content/themes/SandersTheme/.gitignore",
"/usr/share/doc/autojump/README.Debian",
"/home/zack/.ssh/github_rsa.pub",
"/tmp/fz3temp-1/education-index.php",
"/home/zack/vagrant-local/www/default/dashboard/index.php",
"/home/zack/vagrant-local/www/default/dashboard-custom.php",
"/home/zack/.themes/Arc/gtk-3.0/gtk-contained.css",
"/tmp/fz3temp-2/education-index.php",
"/tmp/fz3temp-2/main.js",
"/home/zack/.xbindkeysrc",
"/tmp/fz3temp-2/content-browse.php",
"/tmp/fz3temp-2/browse.php",
"/tmp/fz3temp-2/content-gallery.php",
"/tmp/fz3temp-2/archive.php",
"/tmp/fz3temp-2/taxonomy-post_format.php",
"/usr/share/applications/defaults.list",
"/home/zack/Documents/WordPress/archive.php",
"/home/zack/.bashrc",
"/home/zack/.config/sublime-text-3/Packages/User/Default (Linux).sublime-keymap"
],
"find":
{
"height": 30.0
},
"find_in_files":
{
"height": 0.0,
"where_history":
[
]
},
"find_state":
{
"case_sensitive": false,
"find_history":
[
"menu",
"MENU",
"cool_args",
"span",
"parent()",
"motion",
"get_field",
"get_Field",
"_text",
"gedit",
"alias"
],
"highlight": true,
"in_selection": false,
"preserve_case": false,
"regex": false,
"replace_history":
[
],
"reverse": false,
"show_context": true,
"use_buffer2": true,
"whole_word": false,
"wrap": true
},
"groups":
[
{
"selected": 0,
"sheets":
[
{
"buffer": 0,
"file": "/home/zack/vagrant-wordpress/www/theme-testing/htdocs/wp-content/themes/index.php",
"semi_transient": false,
"settings":
{
"buffer_size": 28,
"regions":
{
},
"selection":
[
[
28,
28
]
],
"settings":
{
"BracketHighlighterBusy": false,
"bh_regions":
[
"bh_round",
"bh_round_center",
"bh_round_open",
"bh_round_close",
"bh_round_content",
"bh_default",
"bh_default_center",
"bh_default_open",
"bh_default_close",
"bh_default_content",
"bh_double_quote",
"bh_double_quote_center",
"bh_double_quote_open",
"bh_double_quote_close",
"bh_double_quote_content",
"bh_square",
"bh_square_center",
"bh_square_open",
"bh_square_close",
"bh_square_content",
"bh_c_define",
"bh_c_define_center",
"bh_c_define_open",
"bh_c_define_close",
"bh_c_define_content",
"bh_regex",
"bh_regex_center",
"bh_regex_open",
"bh_regex_close",
"bh_regex_content",
"bh_curly",
"bh_curly_center",
"bh_curly_open",
"bh_curly_close",
"bh_curly_content",
"bh_single_quote",
"bh_single_quote_center",
"bh_single_quote_open",
"bh_single_quote_close",
"bh_single_quote_content",
"bh_angle",
"bh_angle_center",
"bh_angle_open",
"bh_angle_close",
"bh_angle_content",
"bh_tag",
"bh_tag_center",
"bh_tag_open",
"bh_tag_close",
"bh_tag_content",
"bh_unmatched",
"bh_unmatched_center",
"bh_unmatched_open",
"bh_unmatched_close",
"bh_unmatched_content"
],
"function_name_status_row": 2,
"syntax": "Packages/php-grammar/PHP.tmLanguage"
},
"translation.x": 0.0,
"translation.y": 44.0,
"zoom_level": 1.0
},
"stack_index": 0,
"type": "text"
}
]
}
],
"incremental_find":
{
"height": 30.0
},
"input":
{
"height": 0.0
},
"layout":
{
"cells":
[
[
0,
0,
1,
1
]
],
"cols":
[
0.0,
1.0
],
"rows":
[
0.0,
1.0
]
},
"menu_visible": true,
"output.CSS Extended Completions":
{
"height": 0.0
},
"output.find_results":
{
"height": 0.0
},
"pinned_build_system": "",
"project": "sanders.sublime-project",
"replace":
{
"height": 56.0
},
"save_all_on_build": true,
"select_file":
{
"height": 0.0,
"last_filter": "",
"selected_items":
[
],
"width": 0.0
},
"select_project":
{
"height": 500.0,
"last_filter": "",
"selected_items":
[
],
"width": 380.0
},
"select_symbol":
{
"height": 0.0,
"last_filter": "",
"selected_items":
[
],
"width": 0.0
},
"selected_group": 0,
"settings":
{
},
"show_minimap": true,
"show_open_files": true,
"show_tabs": true,
"side_bar_visible": true,
"side_bar_width": 232.0,
"status_bar_visible": true,
"template_settings":
{
}
}