-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add ACF include file, all ACF functions going in there from now
- Loading branch information
Showing
5 changed files
with
62 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
/** | ||
* Add ACF functions | ||
* @since 1.7.0 | ||
*/ | ||
|
||
|
||
|
||
add_action('after_switch_theme', 'bt_acf_auto_set_license_keys'); | ||
/** | ||
* ACF License - via constant defined in wp-config.php | ||
* @link https://gist.github.com/mattradford/6d5b8f3cd11ce1f62480 | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
function bt_acf_auto_set_license_keys() { | ||
|
||
if ( !get_option('acf_pro_license') && defined('ACF_PRO_KEY') ) { | ||
|
||
$save = array( | ||
'key' => ACF_PRO_KEY, | ||
'url' => home_url() | ||
); | ||
|
||
$save = maybe_serialize($save); | ||
$save = base64_encode($save); | ||
|
||
update_option('acf_pro_license', $save); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
/** | ||
* Client File - Custonm Login and Dashboard Settings | ||
* Client File - Custom Login and Dashboard Settings | ||
* | ||
* @package beavertron | ||
* @author NeilGee | ||
|
@@ -88,18 +88,19 @@ function bt_remove_dashboard_widgets() { | |
* @since 1.0.0 | ||
*/ | ||
function bt_hide_tabs() { | ||
|
||
if ( ! current_user_can( 'activate_plugins' )) { | ||
echo ' | ||
<style type="text/css"> | ||
#wp-admin-bar-wp-logo, | ||
#wp-admin-bar-comments, | ||
#wp-admin-bar-new-content, | ||
#contextual-help-link-wrap, | ||
#screen-options-link-wrap { | ||
display: none !important; | ||
} | ||
</style> | ||
'; | ||
echo ' | ||
<style type="text/css"> | ||
#wp-admin-bar-wp-logo, | ||
#wp-admin-bar-comments, | ||
#wp-admin-bar-new-content, | ||
#contextual-help-link-wrap, | ||
#screen-options-link-wrap { | ||
display: none !important; | ||
} | ||
</style> | ||
'; | ||
} | ||
} | ||
|
||
|
@@ -117,30 +118,6 @@ function wsl_edit_text() { | |
return "<em>Site by <a href='https://websitelove.com.au' rel='nofollow'>WebsiteLove</a>, contact <a href='mailto:[email protected]' rel='nofollow'>us</a></em>"; | ||
} | ||
|
||
|
||
add_action('after_switch_theme', 'bt_acf_auto_set_license_keys'); | ||
/** | ||
* ACF License - via constant defined in wp-config.php | ||
* @link https://gist.github.com/mattradford/6d5b8f3cd11ce1f62480 | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
function bt_acf_auto_set_license_keys() { | ||
|
||
if ( !get_option('acf_pro_license') && defined('ACF_PRO_KEY') ) { | ||
|
||
$save = array( | ||
'key' => ACF_PRO_KEY, | ||
'url' => home_url() | ||
); | ||
|
||
$save = maybe_serialize($save); | ||
$save = base64_encode($save); | ||
|
||
update_option('acf_pro_license', $save); | ||
} | ||
} | ||
|
||
/** | ||
* Roles & Capabilities | ||
* @link https://wordpress.stackexchange.com/questions/4191/allow-editors-to-edit-menus | ||
|
@@ -151,4 +128,4 @@ function bt_acf_auto_set_license_keys() { | |
// $role_object = get_role( 'editor' ); | ||
|
||
// add $cap capability to this role object | ||
// $role_object->add_cap( 'edit_theme_options' ); | ||
// $role_object->add_cap( 'edit_theme_options' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters