Skip to content

Commit

Permalink
style: applies PHPCS rules
Browse files Browse the repository at this point in the history
  • Loading branch information
Genyus committed Apr 25, 2023
1 parent 3281eec commit 0802b2b
Show file tree
Hide file tree
Showing 9 changed files with 152 additions and 158 deletions.
1 change: 1 addition & 0 deletions web/app/plugins/cbf-academy/includes/Admin/Main.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public static function hooks() {
*
* @return void
*/
// phpcs:ignore Generic.Metrics.CyclomaticComplexity.MaxExceeded
public static function conditional_includes() {

$screen = get_current_screen();
Expand Down
1 change: 1 addition & 0 deletions web/app/plugins/cbf-academy/includes/Assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ private static function enqueue_style( $handle, $path = '', $deps = array(), $ve
*
* @return void
*/
// phpcs:ignore Generic.Metrics.CyclomaticComplexity.MaxExceeded
public static function load_scripts() {

if ( ! did_action( 'before__init' ) ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ public static function hooks() {
* @return string
*/
public static function bp_core_get_table_prefix( $base_prefix ) {
if(is_multisite()){
$base_prefix .= get_current_blog_id() . "_";
if ( is_multisite() ) {
$base_prefix .= get_current_blog_id() . '_';
}

return $base_prefix;
Expand Down
1 change: 0 additions & 1 deletion web/app/plugins/cbf-academy/includes/Install.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ final class Install {
public static function install() {

// Perform install actions here.

// Trigger action.
do_action( '_installed' );
}
Expand Down
4 changes: 2 additions & 2 deletions web/app/plugins/cbf-academy/includes/Main.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ public static function init() {
do_action( 'before__init' );

// Add needed hooks here.

// After init action.
do_action( '_init' );
}
Expand All @@ -115,6 +114,7 @@ public static function init() {
*
* @return boolean
*/
// phpcs:ignore Generic.Metrics.CyclomaticComplexity.MaxExceeded
private static function check_plugin_requirements() {

$errors = array();
Expand Down Expand Up @@ -179,6 +179,6 @@ private static function load_plugin_textdomain() {

load_textdomain( 'cbf-academy', WP_LANG_DIR . '/cbf-academy/cbf-academy-' . $locale . '.mo' );

load_plugin_textdomain( 'cbf-academy', false, plugin_basename( dirname( __FILE__ ) ) . '/i18n/languages' );
load_plugin_textdomain( 'cbf-academy', false, plugin_basename( __DIR__ ) . '/i18n/languages' );
}
}
12 changes: 6 additions & 6 deletions web/app/plugins/cbf-academy/vendor/composer/installed.php
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<?php return array(
'root' => array(
'name' => 'author-slug/cbf-academy',
'pretty_version' => '1.0.0+no-version-set',
'version' => '1.0.0.0',
'reference' => NULL,
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'reference' => '813f9304e02c3c2b68c195148a1114da17cc76c1',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'dev' => true,
),
'versions' => array(
'author-slug/cbf-academy' => array(
'pretty_version' => '1.0.0+no-version-set',
'version' => '1.0.0.0',
'reference' => NULL,
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'reference' => '813f9304e02c3c2b68c195148a1114da17cc76c1',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand Down
63 changes: 30 additions & 33 deletions web/app/themes/cbf-academy/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,18 @@
*
* @since CBF Academy 1.0.0
*/
function cbf_academy_theme_languages()
{
/**
* Makes child theme available for translation.
* Translations can be added into the /languages/ directory.
*/
function cbf_academy_theme_languages() {
/**
* Makes child theme available for translation.
* Translations can be added into the /languages/ directory.
*/

// Translate text from the PARENT theme.
load_theme_textdomain( 'buddyboss-theme', get_stylesheet_directory() . '/languages' );

// Translate text from the CHILD theme only.
// Change 'buddyboss-theme' instances in all child theme files to 'buddyboss-theme-child'.
// load_theme_textdomain( 'buddyboss-theme-child', get_stylesheet_directory() . '/languages' );
// Translate text from the PARENT theme.
load_theme_textdomain( 'buddyboss-theme', get_stylesheet_directory() . '/languages' );

// Translate text from the CHILD theme only.
// Change 'buddyboss-theme' instances in all child theme files to 'buddyboss-theme-child'.
// load_theme_textdomain( 'buddyboss-theme-child', get_stylesheet_directory() . '/languages' );
}
add_action( 'after_setup_theme', 'cbf_academy_theme_languages' );

Expand All @@ -35,23 +33,22 @@ function cbf_academy_theme_languages()
*
* @since CBF Academy Theme 1.0.0
*/
function cbf_academy_theme_scripts_styles()
{
/**
* Scripts and Styles loaded by the parent theme can be unloaded if needed
* using wp_deregister_script or wp_deregister_style.
*
* See the WordPress Codex for more information about those functions:
* http://codex.wordpress.org/Function_Reference/wp_deregister_script
* http://codex.wordpress.org/Function_Reference/wp_deregister_style
**/
$version = wp_get_theme( 'cbf-academy' )->get( 'Version' );
function cbf_academy_theme_scripts_styles() {
/**
* Scripts and Styles loaded by the parent theme can be unloaded if needed
* using wp_deregister_script or wp_deregister_style.
*
* See the WordPress Codex for more information about those functions:
* http://codex.wordpress.org/Function_Reference/wp_deregister_script
* http://codex.wordpress.org/Function_Reference/wp_deregister_style
**/
$version = wp_get_theme( 'cbf-academy' )->get( 'Version' );

// Styles
wp_enqueue_style( 'cbf-academy-css', get_stylesheet_directory_uri().'/assets/css/custom.css', false, $version );
// Styles
wp_enqueue_style( 'cbf-academy-css', get_stylesheet_directory_uri() . '/assets/css/custom.css', false, $version );

// Javascript
wp_enqueue_script( 'cbf-academy-js', get_stylesheet_directory_uri().'/assets/js/custom.js', false, $version );
// Javascript
wp_enqueue_script( 'cbf-academy-js', get_stylesheet_directory_uri() . '/assets/js/custom.js', false, $version );
}
add_action( 'wp_enqueue_scripts', 'cbf_academy_theme_scripts_styles', 9999 );

Expand All @@ -67,13 +64,13 @@ function cbf_academy_theme_scripts_styles()
* @return string
*/
function cbf_academy_bp_core_get_table_prefix( $base_prefix ) {
if(is_multisite()){
$blog_id = get_current_blog_id();
$base_prefix .= "{$blog_id}_";
}
if ( is_multisite() ) {
$blog_id = get_current_blog_id();
$base_prefix .= "{$blog_id}_";
}

return $base_prefix;
return $base_prefix;
}
add_filter( 'bp_core_get_table_prefix', 'cbf_academy_bp_core_get_table_prefix' );

?>

162 changes: 81 additions & 81 deletions web/app/themes/cbf-jobs/footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,96 +12,96 @@
$hide_footer = false;
$page_id = get_the_ID();

if ( is_page() ){
$hide_footer = get_post_meta( $page_id, '_hide_footer', true );
if ( is_page() ) {
$hide_footer = get_post_meta( $page_id, '_hide_footer', true );
}

if ( onepress_is_wc_active() ) {
if ( is_shop() ) {
$page_id = wc_get_page_id('shop');
$hide_footer = get_post_meta( $page_id, '_hide_footer', true );
}
if ( is_shop() ) {
$page_id = wc_get_page_id( 'shop' );
$hide_footer = get_post_meta( $page_id, '_hide_footer', true );
}
}

if ( ! $hide_footer ) {
?>
<!-- Footer -->
<footer class="pt-4 my-md-5 pt-md-5 border-top">
<div class="container">
<div class="row">
<div class="col-12 col-md">
<img id="footer-img" class="mb-2" src="https://cbf-test-a847f.firebaseapp.com/img/logo-grey-yellow.png" alt="" height="50">
<small class="d-block mb-3 text-muted">Copyright &copy; Coding Black Females Ltd 2020</small>
?>
<!-- Footer -->
<footer class="pt-4 my-md-5 pt-md-5 border-top">
<div class="container">
<div class="row">
<div class="col-12 col-md">
<img id="footer-img" class="mb-2" src="https://cbf-test-a847f.firebaseapp.com/img/logo-grey-yellow.png" alt="" height="50">
<small class="d-block mb-3 text-muted">Copyright &copy; Coding Black Females Ltd 2020</small>

<ul class="list-inline button-section-area">
<li class="list-inline-item">
<a href="https://www.instagram.com/codingblackfemales/" target="_blank">
<i class="fab fa-instagram"></i>
</a>
</li>
<li class="list-inline-item">
<a href="https://twitter.com/codingblackfems" target="_blank">
<i class="fab fa-twitter"></i>
</a>
</li>
<li class="list-inline-item">
<a href="https://facebook.com/codingblackfemales" target="_blank">
<i class="fab fa-facebook"></i>
</a>
</li>
<li class="list-inline-item">
<a href="https://linkedin.com/company/codingblackfemales" target="_blank">
<i class="fab fa-linkedin"></i>
</a>
</li>
</ul>
<ul class="list-inline button-section-area">
<li class="list-inline-item">
<a href="https://www.instagram.com/codingblackfemales/" target="_blank">
<i class="fab fa-instagram"></i>
</a>
</li>
<li class="list-inline-item">
<a href="https://twitter.com/codingblackfems" target="_blank">
<i class="fab fa-twitter"></i>
</a>
</li>
<li class="list-inline-item">
<a href="https://facebook.com/codingblackfemales" target="_blank">
<i class="fab fa-facebook"></i>
</a>
</li>
<li class="list-inline-item">
<a href="https://linkedin.com/company/codingblackfemales" target="_blank">
<i class="fab fa-linkedin"></i>
</a>
</li>
</ul>

</div>
<div class="col-sm-3 col-md">
<h6>Companies</h6>
<ul class="list-unstyled text-small">
<li><a class="text-muted" href="https://jobs.codingblackfemales.com/for-companies/">Post A Job</a></li>
<li><a class="text-muted" href="https://jobs.codingblackfemales.com/my-account/">Account</a></li>
<li><a class="text-muted" href="https://jobs.codingblackfemales.com/basket/">Basket</a></li>
<li><a class="text-muted" href="https://codingblackfemales.com/supportus.html">Support Us</a></li>
<li><a class="text-muted" href="https://codingblackfemales.com/companyprofile.html">Company Profiles</a></li>
</div>
<div class="col-sm-3 col-md">
<h6>Companies</h6>
<ul class="list-unstyled text-small">
<li><a class="text-muted" href="https://jobs.codingblackfemales.com/for-companies/">Post A Job</a></li>
<li><a class="text-muted" href="https://jobs.codingblackfemales.com/my-account/">Account</a></li>
<li><a class="text-muted" href="https://jobs.codingblackfemales.com/basket/">Basket</a></li>
<li><a class="text-muted" href="https://codingblackfemales.com/supportus.html">Support Us</a></li>
<li><a class="text-muted" href="https://codingblackfemales.com/companyprofile.html">Company Profiles</a></li>

</ul>
</div>
<div class="col-sm-3 col-md">
<h6>Members</h6>
<ul class="list-unstyled text-small">
<li><a class="text-muted" href="https://codingblackfemales.com/memberzone.html">Member Zone</a></li>
<li><a class="text-muted" href="https://codingblackfemales.com/events.html">Events</a></li>
<li><a class="text-muted" href="https://codingblackfemales.com/pinboard.html">Open Projects</a></li>
<li><a class="text-muted" href="https://codingblackfemales.com/community.html">Community</a></li>
<li><a class="text-muted" href="https://codingblackfemales.com/directory.html">Business Directory</a></li>
<li><a class="text-muted" href="https://codingblackfemales.com/shop.html">Shop</a></li>
</ul>
</div>
<div class="col-sm-3 col-md">
<h6>Content</h6>
<ul class="list-unstyled text-small">
<li><a class="text-muted" href="https://codingblackfemales.com/blog.html">Blog</a></li>
<li><a class="text-muted" href="https://codingblackfemales.com/youtube.html">YouTube Channel</a></li>
<li><a class="text-muted" href="https://codingblackfemales.com/podcast.html">Podcast</a></li>
<li><a class="text-muted" href="https://codingblackfemales.com/visibleintech.html">#VisibleInTech</a></li>
</ul>
</div>
<div class="col-sm-3 col-md">
<h6>About</h6>
<ul class="list-unstyled text-small">
<li><a class="text-muted" href="https://mailchi.mp/59b1f57bb4e2/landing-page">Join Mailing List</a></li>
<li><a class="text-muted" href="https://codingblackfemales.com/coc.html">Code Of Conduct</a></li>
<li><a class="text-muted" href="https://codingblackfemales.com/privacy.html">Privacy Policy</a></li>
<li><a class="text-muted" href="https://codingblackfemales.com/press.html">Press</a></li>
<li><a class="text-muted" href="https://codingblackfemales.com/team.html">Team</a></li>
</ul>
</div>
</div>
</div>
</footer><!-- #colophon -->
<?php
</ul>
</div>
<div class="col-sm-3 col-md">
<h6>Members</h6>
<ul class="list-unstyled text-small">
<li><a class="text-muted" href="https://codingblackfemales.com/memberzone.html">Member Zone</a></li>
<li><a class="text-muted" href="https://codingblackfemales.com/events.html">Events</a></li>
<li><a class="text-muted" href="https://codingblackfemales.com/pinboard.html">Open Projects</a></li>
<li><a class="text-muted" href="https://codingblackfemales.com/community.html">Community</a></li>
<li><a class="text-muted" href="https://codingblackfemales.com/directory.html">Business Directory</a></li>
<li><a class="text-muted" href="https://codingblackfemales.com/shop.html">Shop</a></li>
</ul>
</div>
<div class="col-sm-3 col-md">
<h6>Content</h6>
<ul class="list-unstyled text-small">
<li><a class="text-muted" href="https://codingblackfemales.com/blog.html">Blog</a></li>
<li><a class="text-muted" href="https://codingblackfemales.com/youtube.html">YouTube Channel</a></li>
<li><a class="text-muted" href="https://codingblackfemales.com/podcast.html">Podcast</a></li>
<li><a class="text-muted" href="https://codingblackfemales.com/visibleintech.html">#VisibleInTech</a></li>
</ul>
</div>
<div class="col-sm-3 col-md">
<h6>About</h6>
<ul class="list-unstyled text-small">
<li><a class="text-muted" href="https://mailchi.mp/59b1f57bb4e2/landing-page">Join Mailing List</a></li>
<li><a class="text-muted" href="https://codingblackfemales.com/coc.html">Code Of Conduct</a></li>
<li><a class="text-muted" href="https://codingblackfemales.com/privacy.html">Privacy Policy</a></li>
<li><a class="text-muted" href="https://codingblackfemales.com/press.html">Press</a></li>
<li><a class="text-muted" href="https://codingblackfemales.com/team.html">Team</a></li>
</ul>
</div>
</div>
</div>
</footer><!-- #colophon -->
<?php
}
/**
* Hooked: onepress_site_footer
Expand Down
Loading

0 comments on commit 0802b2b

Please sign in to comment.