本文整理汇总了PHP中_WP_Editors::wp_link_dialog方法的典型用法代码示例。如果您正苦于以下问题:PHP _WP_Editors::wp_link_dialog方法的具体用法?PHP _WP_Editors::wp_link_dialog怎么用?PHP _WP_Editors::wp_link_dialog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类_WP_Editors
的用法示例。
在下文中一共展示了_WP_Editors::wp_link_dialog方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: wa_fronted_footer_scripts
/**
* Adds native link modal
*/
public function wa_fronted_footer_scripts()
{
if (!class_exists('_WP_Editors')) {
require ABSPATH . WPINC . '/class-wp-editor.php';
}
_WP_Editors::wp_link_dialog();
do_action('wa_fronted_footer_scripts');
}
示例2: wp_footer
/**
* This function outputs the WordPress Link Dialog template.
*/
public function wp_footer()
{
// WordPress Link Dialog
if (!class_exists('_WP_Editors')) {
require ABSPATH . WPINC . '/class-wp-editor.php';
}
_WP_Editors::wp_link_dialog();
}
示例3: link_modal
function link_modal()
{
if (!class_exists('_WP_Editors')) {
require ABSPATH . WPINC . '/class-wp-editor.php';
}
_WP_Editors::wp_link_dialog();
}
示例4: _display_wp_link_dialog
function _display_wp_link_dialog()
{
if (!class_exists('_WP_Editors')) {
require ABSPATH . WPINC . '/class-wp-editor.php';
}
if (!has_action('admin_footer', array('_WP_Editors', 'enqueue_scripts'))) {
_WP_Editors::wp_link_dialog();
}
}
示例5: wpLink
public function wpLink()
{
if (!class_exists('_WP_Editors', false)) {
require_once ABSPATH . WPINC . '/class-wp-editor.php';
}
_WP_Editors::wp_link_dialog();
}
示例6: views_redesign_html
//.........这里部分代码省略.........
* Query type (content selection) - Priority 10
* Query options - Priority 20
* Ordering - Priority 30
* Limit and offset - Priority 40
* Filters - Priority 50
*/
?>
<div class="wpv-filter-section">
<h3 class="wpv-section-title"><?php
_e('The Filter section lets you set up pagination and parametric search, which let visitors control the View query', 'wpv-views');
?>
</h3>
<?php
wpv_get_view_filter_introduction_data();
?>
<?php
do_action('view-editor-section-filter', $view_settings, $view_id, $user_id);
?>
</div>
<?php
/*
* Pagination TODO review this. https://icanlocalize.basecamphq.com/projects/7393061-toolset/todo_items/161787682/comments - Priority 50
* Filters Meta HTML/CSS/JS TODO review this. https://icanlocalize.basecamphq.com/projects/7393061-toolset/todo_items/161787682/comments - Priority 80
*/
?>
<div class="wpv-layout-section">
<h3 class="wpv-section-title"><?php
_e('The Loop Output section styles the View output on the page.', 'wpv-views');
?>
</h3>
<?php
$data = wpv_get_view_layout_introduction_data();
wpv_toolset_help_box($data);
?>
<?php
do_action('view-editor-section-layout', $view_settings, $view_layout_settings, $view_id, $user_id);
?>
<?php
do_action('view-editor-section-extra', $view_settings, $view_id, $user_id);
?>
</div>
<?php
$display_help = isset($_GET['in-iframe-for-layout']) && $_GET['in-iframe-for-layout'] == 1 ? false : true;
if ($display_help === true) {
?>
<div class="wpv-help-section">
<?php
wpv_display_view_howto_help_box();
?>
</div>
<?php
}
?>
<script type="text/javascript">
jQuery( function( $ ) {
jQuery('li.current a').attr('href',jQuery('li.current a').attr('href')+'&view_id=<?php
echo esc_attr($view_id);
?>
');
});
</script>
<?php
/*
* Output (layout) type - TODO review this https://icanlocalize.basecamphq.com/projects/7393061-toolset/todo_items/162512599/comments - Priority 10 - To remove
* Output fields TODO this has been reviewed and may be used as training - Priority 20 - To remove
* Layout templates TODO insert here the new Content Templates editor. https://icanlocalize.basecamphq.com/projects/7393061-toolset/todo_items/161787695/comments - Priority 20 - To review
* Layout Meta HTML/CSS/JS TODO this has been reviewed and needs some changes. https://icanlocalize.basecamphq.com/projects/7393061-toolset/todo_items/161787640/comments - Priority 40
* Aditional Javascript files TODO move to its own file - Priority 50
* Extra sections:
* 1. Complete output (the_content)
* 2. Module manager TODO needs to be added
*/
?>
</div>
<?php
/**
* view-editor-section-hidden
*
* Show hidden container for dialogs, pointers and messages that need to be taken by ColorBox from an existing HTML element
*
* @param $view_settings
* @param $view_laqyout_settings
* @param $view_id
* @param $user_id
*
* @note that you can use the .popup-window-container classname to hide the containers added here
*
* @since 1.7
*/
do_action('view-editor-section-hidden', $view_settings, $view_layout_settings, $view_id, $user_id);
if (!class_exists('_WP_Editors')) {
require ABSPATH . WPINC . '/class-wp-editor.php';
}
_WP_Editors::wp_link_dialog();
}
示例7: wp_footer
/**
* This function outputs the WordPress Link Dialog template.
*/
public function wp_footer()
{
// WordPress Link Dialog
if (!class_exists('_WP_Editors')) {
require ABSPATH . WPINC . '/class-wp-editor.php';
}
_WP_Editors::wp_link_dialog();
// Note Modal Templates
self::note_modal_templates();
}
示例8: wpv_ct_editor_page_edit
/**
* Render the editor page.
*
* Renders the individual sections, action bar with "Save all sections" button, collects Content Template properties
* required by the sections (as a value of #js-wpv-ct) and creates a renders nonce for updating properties
* ("wpv_ct_{$ct->id}_update_properties_by_{$uid}" stored as a value of #js-wpv-ct-update-nonce) for the main JS script.
*
* @param WPV_Content_Template|int Content Template object or ID.
*
* @since 1.9
*/
function wpv_ct_editor_page_edit( $ct ) {
// Get the Content Template
if( ! $ct instanceof WPV_Content_Template ) {
$ct = WPV_Content_Template::get_instance($ct);
if (null == $ct) {
wpv_die_toolset_alert_error(__('You attempted to edit a Content Template that doesn’t exist. Perhaps it was deleted?', 'wpv-views'));
}
}
// Do not allow editing trashed CTs
if( 'trash' == $ct->post_status ) {
wpv_die_toolset_alert_error( __( 'You can’t edit this Content Template because it is in the Trash. Please restore it and try again.', 'wpv-views' ) );
}
// Don't allow to edit CT translations
if( !apply_filters('wpml_is_original_content', true, $ct->post()->ID, 'post_' . $ct->post()->post_type) ) {
wpv_die_toolset_alert_error( __( 'You are trying to edit a Content Template translation. Only original laguage can be edited here. Please edit the translation through WPML Translation Management.', 'wpv-views' ) );
}
// Wrapper for the edit page
echo '<div class="wrap toolset-views">';
// Site title
printf( '<h2>%s</h2>', __( 'Edit Content Template', 'wpv-views' ) );
wpv_ct_editor_render_save_all_bar();
// Gather Content Template properties and pass them as l10n to JS.
/**
* Gather names of Content Template properties that should be passed as a JSON to the main JS script.
*
* @param array $property_names Array of property names that can be retrieved from an instance of
* WPV_Content_Template. If CT throws an exception while getting the property, null will be passed.
*
* @since 1.9
*/
$requested_property_names = array_unique( apply_filters( 'wpv_ct_editor_request_properties', array() ) );
// Retrieve the requested properties into $ct_data.
$ct_data = array( 'id' => $ct->id );
foreach( $requested_property_names as $property_name ) {
try {
$ct_data[ $property_name ] = $ct->$property_name;
} catch( Exception $e ) {
$ct_data[ $property_name ] = null;
}
}
// Add nonce for updating properties
$uid = get_current_user_id();
$ct_data['update_nonce'] = wp_create_nonce( "wpv_ct_{$ct->id}_update_properties_by_{$uid}" );
$ct_data['trash_nonce'] = wp_create_nonce( 'wpv_view_listing_actions_nonce' );
$ct_data['listing_page_url'] = esc_url( add_query_arg( array( 'page' => 'view-templates' ), admin_url( 'admin.php' ) ) );
/**
* Allow individual sections to attach custom data to ct_data.
*
* @param array $ct_data Associative array with CT properties (keys are property names, obviously) or other custom
* data attached by other page sections. Each section should choose keys that minimize the risk of conflict (e.g
* prepend it by "_{$section_slug}_", etc.).
* @param WPV_Content_Template $ct Content Template to be edited.
*
* @since 1.9
*/
$ct_data = apply_filters( 'wpv_ct_editor_add_custom_properties', $ct_data, $ct );
// Pass CT data as l10n variable.
wp_localize_script( 'views-ct-editor-js', 'wpv_ct_editor_ct_data', $ct_data );
/**
* Render individual sections.
*
* Each section is supposed to hook onto this action and at some point render it's content by
* calling wpv_ct_editor_render_section().
*
* @since 1.9
*/
do_action( 'wpv_ct_editor_sections', $ct );
// Render HTML template for the Insert/Edit link native WP dialog.
if ( ! class_exists( '_WP_Editors' ) ) {
require( ABSPATH . WPINC . '/class-wp-editor.php' );
}
_WP_Editors::wp_link_dialog();
//.........这里部分代码省略.........