Skip to content

Commit

Permalink
publish new tag 5.0 to wordpress plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
Lwangaman authored and Lwangaman committed Mar 27, 2020
1 parent 2033620 commit 67eea2b
Show file tree
Hide file tree
Showing 11 changed files with 1,240 additions and 441 deletions.
248 changes: 124 additions & 124 deletions bibleget-io.php

Large diffs are not rendered by default.

39 changes: 38 additions & 1 deletion css/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,41 @@ form input[type=color] {
color: white;
text-decoration: none;
font-weight: bold;
}
}

#gfontsBatchRunProgressBarOverlay {
background-color: black;
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
opacity: 0.5; /* also -moz-opacity, etc. */
}

#gfontsBatchRunProgressBarWrapper {
position: fixed;
top: 50%;
width: 100%;
}

#gfontsBatchRunProgressbar{
position:relative;
width: 50%;
margin: 0px auto;
}

#gfontsBatchRunProgressbarLabelWrapper {
position: absolute;
top: 5px;
width: 100%;
text-align: center;
}

#gfontsBatchRunProgressbarLabel {
position: relative;
color:#000;
font-weight: bold;
top: 4px;
margin: 0px auto;
}
7 changes: 3 additions & 4 deletions css/popup.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
height: auto;
}


.ui-dialog .ui-dialog-titlebar-close {
height: 30px;
padding: 0px;
margin: -20px 0 0 0;
}
background-color: transparent !important;
}
32 changes: 25 additions & 7 deletions custom_controls.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ class BibleGet_Customize_FontSelect_Control extends WP_Customize_Control {
public function __construct($manager, $id, $args = array() ){
parent::__construct( $manager, $id, $args );
}
*/
public function enqueue() {

wp_enqueue_script ( 'bibleget-fontselect-library', // Give the script a unique ID
plugins_url ( 'js/jquery.fontselect.js', __FILE__ ), // Define the path to the JS file
array ( 'jquery' ), // Define dependencies
'', // Define a version (optional)
true ); // Specify whether to put in footer (leave this true)
true ); // Specify whether to put in footer (leave this true)
wp_enqueue_script ( 'bibleget-fontselect-control', // Give the script a unique ID
plugins_url ( 'js/fontselect-control.js', __FILE__ ), // Define the path to the JS file
array ( 'bibleget-fontselect-library' ), // Define dependencies
Expand All @@ -76,7 +76,25 @@ public function enqueue() {
wp_enqueue_style ( 'bibleget-fontselect-control-style',
plugins_url ( 'css/fontselect.css', __FILE__ ) // Define the path to the CSS file
);


if( file_exists( plugin_dir_path( __FILE__ ) . 'css/gfonts_preview/gfonts_preview.css' ) ){
wp_enqueue_style( 'bibleget-fontselect-preview',
plugins_url ('css/gfonts_preview/gfonts_preview.css', __FILE__ )
);
}
else{
echo '<!-- gfonts_preview.css not found -->';
}

//I'm guessing this is where we do our background checks on the Google Fonts API key?
$bibleget_settings = get_option( 'bibleget_settings' );
if(isset( $bibleget_settings['googlefontsapi_key'] ) && $bibleget_settings['googlefontsapi_key'] != ""){
if(get_transient ( md5 ( $bibleget_settings['googlefontsapi_key'] ) ) == "SUCCESS"){
//We have a google fonts key that has been tested successfully in the past 3 months
wp_localize_script('bibleget-fontselect-library','FontSelect_Control',array('bibleget_settings' => $bibleget_settings,'pluginUrl' => plugins_url("", __FILE__ )));
}
}

}

public function render_content() {
Expand All @@ -85,10 +103,10 @@ public function render_content() {
<?php if (! empty ( $this->description )) : ?>
<span class="description customize-control-description"><?php echo esc_html( $this->description ); ?></span>
<?php endif; ?>
<input id="bibleget-googlefonts" <?php $this->link(); ?> type="hidden" value="<?php $this->value(); ?>" />
<input id="bibleget-googlefonts" <?php $this->link(); ?> type="hidden" data-fonttype="websafe" value="<?php $this->value(); ?>" />

<?php
<?php
} // end public function render_content
} // end class BibleGet_Customize_FontSelect_Control

} // end if class exists WP_Customize_Control
Loading

0 comments on commit 67eea2b

Please sign in to comment.