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
<?php | |
/** | |
* Enqueue upload modal | |
*/ | |
function dgv_823828_enqueue_scripts() { | |
if(is_page(1111)) { // check by page or perhaps other condition to avoid enqueuing the script globally. | |
wp_enqueue_style('dgv-upload-modal'); | |
wp_enqueue_script('dgv-upload-modal'); | |
wp_enqueue_script('your-custom-script', 'https://url-to-script/script.js', array('jquery', 'dgv-upload-modal'), null, true); |
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
<?php | |
/** | |
* Print vimeo.com link instead of embed link using the [dgv_vimeo_video] shortcode | |
* @param string $content | |
* @param string $vimeo_id | |
* @return string | |
*/ | |
function dgv_shortcode_output_891281($content, $vimeo_id) { | |
return sprintf('https://vimeo.com/%s', $vimeo_id); |
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
<?php | |
/** | |
* Modify the allowed extensions on WP Vimeo Videos | |
* @return string[] | |
*/ | |
function filter_dgv_allowed_extensions() { | |
return array( 'mp4', 'mov', 'flv' ); | |
} | |
add_filter('dgv_allowed_extensions', 'filter_dgv_allowed_extensions'); |
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
###################################################################### | |
#PLEASE customise the settings before rehashing your bot! # | |
###################################################################### | |
# The full path to the file containing the questions and answers. | |
# The account the bot runs on must have read access to this file. | |
set tgqdb "/home/kaka/lidy/eggdrop/scripts/triv.questions.txt" | |
# The character that seperates the question and the answer in the | |
# question/answer file. |
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
<?php | |
# Example 1 - Upload local video | |
$api = new WP_DGV_Api_Helper(); | |
$path = '/home/user/video.mp4'; | |
$params = array( | |
'name' => 'Cool Video', | |
'description' => 'Some description', | |
); |
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
<div class="gs-stats silverprice"> | |
<img src="http://www.kitconet.com/images/sp_en_6.gif"> | |
</div> |
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
<?php | |
/** | |
* Hide embed privacy in WP Vimeo Videos | |
* @return void | |
*/ | |
function wvv_edit_hide_embed_privacy() { | |
if(isset($_GET['page']) && $_GET['page'] === 'dgv-library') { | |
echo '<style>#dgv-video-save-embed-privacy {display:none !important;}</style>'; | |
} |
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
<?php | |
/** | |
* Hide search option in WP Vimeo Videos | |
* @return void | |
*/ | |
function wvv_disable_upload_options() { | |
echo '<style>.dgv-vimeo-upload-form > .dgv-vimeo-form-row > label:last-child { display: none !important;}</style>'; | |
} | |
add_action('admin_head', 'wvv_disable_search_option'); |
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
<?php | |
/** | |
* Hide Upload options on WP Vimeo Videos | |
* @return void | |
*/ | |
function wvv_disable_upload_options() { | |
echo '<style>.dgv-vimeo-form-row label {display:none !important;}</style>'; | |
} | |
add_action('admin_head', 'wvv_disable_upload_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
<?php | |
/** | |
* Change the default view privacy in WP Vimeo Videos PRO | |
* This only applies if you have Vimeo Plus, Vimeo PRO, Vimeo Business (or higher level) account. | |
* @url https://developer.vimeo.com/api/guides/videos/interact#set-vimeo-privacy | |
*/ | |
function dgv_default_privacy_1821210($privacy) { | |
$privacy = 'unlisted'; | |
return $privacy; |